GnistAI GnistAI
Log in

Getting Started with Doffin (Norwegian Public Procurement)

Norwegian public procurement notices from Doffin — search tenders, contract awards, and planning notices across all Norwegian public sector buyers.

All Tutorials   |   Overview   |   Playground   |   MCP   |   REST API   |   Home
Government

Data source: Doffin (DFØ — Direktoratet for forvaltning og økonomistyring)

Overview

Doffin (Norwegian Public Procurement) wraps Doffin (DFØ — Direktoratet for forvaltning og økonomistyring), handling authentication, pagination, and rate limits for you. This tutorial covers all 4 tools with working code examples you can copy and run.

Prerequisites

  1. Sign up at https://context.gnist.ai/signup for a free API key (100 calls/day).
  2. Choose your integration method: MCP protocol or REST API.

Connect via MCP

Add to your MCP client config (Claude Desktop, Cursor, etc.):

MCP Config
{
  "mcpServers": {
    "gnist-doffin": {
      "url": "https://context.gnist.ai/mcp/doffin/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Tools (4)

search_notices

Search Norwegian public procurement notices on Doffin (doffin.no). Doffin is Norway's national database for public procurement (offentlige anskaffelser). Covers all Norwegian public tenders — both below and above EU/EEA threshold values. Includes municipalities, county authorities, state agencies, and public enterprises. At least one filter parameter is required. Combine filters to narrow results (e.g. text='IKT' + location='NO03' for IT procurement in Oslo). Returns: Paginated list of procurement notices with heading, buyer, deadline, estimated value, CPV codes, and Doffin URL. Use the notice ID with get_notice for full details including buyer address, procedure type, and award information.

ParameterTypeRequiredDescription
textanyoptionalFree text search across notice titles and descriptions (e.g. "IKT", "rådgivning", "konsulentbistand", "veibygging").
statusanyoptionalFilter by notice status: 'ACTIVE' (open for bids), 'EXPIRED' (deadline passed), 'AWARDED' (contract awarded), 'CANCELLED'.
notice_typeanyoptionalFilter by notice type: 'COMPETITION' (open tender), 'RESULT' (award notice), 'PLANNING' (prior information), 'MODIFICATION', 'CORRIGENDUM'.
cpv_codeanyoptionalFilter by CPV (Common Procurement Vocabulary) code — 8-digit EU classification (e.g. '72000000' for IT services, '45000000' for construction).
locationanyoptionalFilter by Norwegian NUTS region code: 'NO03' (Oslo), 'NO08' (Vestland), 'NO0A' (Trøndelag), 'NO07' (Vestfold og Telemark), etc.
pageintegeroptionalPage number, 1-based (default 1). (default: 1)
page_sizeintegeroptionalResults per page (1-50, default 20). (default: 20)
curl -X POST "https://context.gnist.ai/mcp/doffin/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_notices", "arguments": {"text": "IKT"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/doffin/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'text': 'IKT'}, 'name': 'search_notices'}},
)
print(resp.json())

get_notice

Get detailed information about a specific Doffin procurement notice. Returns the full notice including buyer details (name, org number, address), procedure type, competition documents URL, award information, and whether the notice was also published on TED (EU procurement). Returns: Detailed notice with buyer, procedure, value, and award information. Returns found=false if the notice ID is not found.

ParameterTypeRequiredDescription
notice_idstringrequiredDoffin notice ID in format YYYY-NNNNNN (e.g. "2026-105515"). Found in search results.
curl -X POST "https://context.gnist.ai/mcp/doffin/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_notice", "arguments": {"notice_id": "2026-105515"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/doffin/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'notice_id': '2026-105515'}, 'name': 'get_notice'}},
)
print(resp.json())

get_doffin_changes

Get recent changes to Norwegian public procurement tenders from Doffin. Returns field-level diffs (before/after values) for tenders whose data changed between periodic snapshot cycles. The system monitors active, awarded, and cancelled tenders every 6 hours. Tracks: deadline changes, status transitions (active→awarded/cancelled), estimated value updates, heading/description changes. Args: since: ISO 8601 timestamp — return changes captured after this time. limit: Maximum number of changes to return (1–100, default 50). Returns: Object with count and list of change records, each containing entity_id (notice ID), changed_at timestamp, and a list of field changes with before/after values.

ParameterTypeRequiredDescription
sincestringrequiredISO 8601 timestamp — return changes captured after this time (e.g. "2026-04-01T00:00:00Z").
limitintegeroptionalMaximum number of changes to return (1–100, default 50). (default: 50)
curl -X POST "https://context.gnist.ai/mcp/doffin/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_doffin_changes", "arguments": {"since": "2026-04-01T00:00:00Z"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/doffin/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'since': '2026-04-01T00:00:00Z'},
            'name': 'get_doffin_changes'}},
)
print(resp.json())

report_feedback

Report a bug, feature request, or general feedback for this data source. Use this when something doesn't work as expected, when you'd like a new feature, or when you have suggestions for improvement. Args: feedback: Describe the issue or suggestion. feedback_type: One of 'bug', 'feature_request', or 'general'.

ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: general)
curl -X POST "https://context.gnist.ai/mcp/doffin/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "report_feedback", "arguments": {"feedback": "example"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/doffin/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'feedback': 'example'}, 'name': 'report_feedback'}},
)
print(resp.json())

Common Patterns

Search then retrieve
Use search_notices to find items, then get_notice to get full details. This two-step pattern is common for exploring data before drilling down.
Pagination
Several tools support limit, offset, or page parameters. Start with small limits during development, then increase for production queries.

FAQ

What data does Doffin (Norwegian Public Procurement) provide?

Norwegian public procurement notices from Doffin — search tenders, contract awards, and planning notices across all Norwegian public sector buyers. It exposes 4 tools: search_notices, get_notice, get_doffin_changes, report_feedback.

What do I need to get started?

A Gnist API key (free tier: 100 calls/day). Sign up at https://context.gnist.ai/signup.

What format does the Doffin (Norwegian Public Procurement) API return?

JSON, via either MCP protocol (JSON-RPC 2.0) or REST API.

Next Steps

Related Tutorials