GnistAI GnistAI
Log in

Getting Started with eInnsyn (Norwegian Public Records)

Norwegian public records — journal entries, case folders, and meeting documents from government agencies.

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

Data source: eInnsyn (einnsyn.no)

Overview

eInnsyn (Norwegian Public Records) wraps eInnsyn (einnsyn.no), handling authentication, pagination, and rate limits for you. This tutorial covers all 6 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-einnsyn": {
      "url": "https://context.gnist.ai/mcp/einnsyn/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Tools (6)

search_records

Search Norwegian public records — journal entries, case folders, and meeting documents. eInnsyn is Norway's official public records portal. All government agencies are required to publish their correspondence journals here. This tool searches across all agencies. Args: query: Free-text search. Supports exact match with quotes, exclusion with minus. entity: Filter by type: 'Journalpost', 'Saksmappe', 'Moetemappe', or 'Moetesak'. limit: Results per page (1-100, default 25). journal_date_from: Filter by journal date start (ISO date, e.g. '2025-01-01'). journal_date_to: Filter by journal date end (ISO date). journalpost_type: Filter journal type: 'inngaaende_dokument', 'utgaaende_dokument', 'organinternt_dokument_uten_oppfoelging', 'organinternt_dokument_for_oppfoelging'. sort_by: Sort order (default 'score'). Options: 'score', 'journaldato', 'publisertDato', 'tittel', 'administrativEnhetNavn'. Returns: Dict with 'count', 'items' list, and 'next' cursor for pagination.

ParameterTypeRequiredDescription
querystringrequiredFree-text search. Supports exact match with quotes, exclusion with minus.
entityanyoptionalFilter by type: 'Journalpost', 'Saksmappe', 'Moetemappe', or 'Moetesak'.
limitintegeroptionalResults per page (1-100, default 25). (default: 25)
journal_date_fromanyoptionalFilter by journal date start (ISO date, e.g. '2025-01-01').
journal_date_toanyoptionalFilter by journal date end (ISO date).
journalpost_typeanyoptionalFilter journal type: 'inngaaende_dokument', 'utgaaende_dokument', 'organinternt_dokument_uten_oppfoelging', 'organinternt_dokument_for_oppfoelging'.
sort_bystringoptionalSort order (default 'score'). Options: 'score', 'journaldato', 'publisertDato', 'tittel', 'administrativEnhetNavn'. (default: score)
curl -X POST "https://context.gnist.ai/mcp/einnsyn/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_records", "arguments": {"query": "renewable energy"}}}'
import httpx

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

get_journal_entry

Get a specific journal entry (journalpost) from eInnsyn. Returns the full entry with correspondents (senders/recipients) and attached document metadata. Use the ID from search_records results. Args: journalpost_id: The journal entry ID (e.g. 'jp_...' or a UUID). Returns: Full journal entry with title, dates, correspondents, and documents.

ParameterTypeRequiredDescription
journalpost_idstringrequiredThe journal entry ID (e.g. 'jp_...' or a UUID).
curl -X POST "https://context.gnist.ai/mcp/einnsyn/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_journal_entry", "arguments": {"journalpost_id": "'jp_...'"}}}'
import httpx

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

get_case_folder

Get a case folder (saksmappe) from eInnsyn. A case folder groups related journal entries for a government case. Returns the case metadata and list of associated journal entry IDs. Args: saksmappe_id: The case folder ID (e.g. 'sm_...' or a UUID). Returns: Case folder with title, case number, and journal entry references.

ParameterTypeRequiredDescription
saksmappe_idstringrequiredThe case folder ID (e.g. 'sm_...' or a UUID).
curl -X POST "https://context.gnist.ai/mcp/einnsyn/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_case_folder", "arguments": {"saksmappe_id": "'sm_...'"}}}'
import httpx

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

list_organizations

List government organizations registered in eInnsyn. Returns organizational units (ministries, agencies, municipalities) that publish records to eInnsyn. Args: limit: Number of organizations to return (1-100, default 25). Returns: Dict with 'count', 'units' list (id, name, parent), and 'next' cursor.

ParameterTypeRequiredDescription
limitintegeroptionalNumber of organizations to return (1-100, default 25). (default: 25)
curl -X POST "https://context.gnist.ai/mcp/einnsyn/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "list_organizations", "arguments": {"limit": 25}}}'
import httpx

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

get_publication_statistics

Get aggregate publication statistics for eInnsyn records. Shows how many records have been published, how many include full text, and download counts. Useful for transparency reporting and trend analysis. Args: interval: Aggregation interval: 'hour', 'day', 'week', 'month', 'year'. date_from: Start date (ISO, e.g. '2025-01-01'). Defaults to one year ago. date_to: End date (ISO). Defaults to today. Returns: Dict with 'summary' (totals) and 'time_series' (bucketed counts).

ParameterTypeRequiredDescription
intervalstringoptionalAggregation interval: 'hour', 'day', 'week', 'month', 'year'. (default: month)
date_fromanyoptionalStart date (ISO, e.g. '2025-01-01'). Defaults to one year ago.
date_toanyoptionalEnd date (ISO). Defaults to today.
curl -X POST "https://context.gnist.ai/mcp/einnsyn/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_publication_statistics", "arguments": {"interval": "month"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/einnsyn/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'interval': 'month'},
            'name': 'get_publication_statistics'}},
)
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/einnsyn/" \
  -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/einnsyn/",
    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_records to find items, then get_journal_entry 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.
Date range filtering
Use date range parameters to narrow results to a specific time window. Dates are typically in YYYY-MM-DD format.

FAQ

What data does eInnsyn (Norwegian Public Records) provide?

Norwegian public records — journal entries, case folders, and meeting documents from government agencies. It exposes 6 tools: search_records, get_journal_entry, get_case_folder, list_organizations, get_publication_statistics, 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 eInnsyn (Norwegian Public Records) API return?

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

Next Steps

Related Tutorials