Data source: Stortinget (data.stortinget.no)
Overview
Stortinget (Norwegian Parliament) wraps Stortinget (data.stortinget.no), handling authentication, pagination, and rate limits for you. This tutorial covers all 10 tools with working code examples you can copy and run.
Prerequisites
- Sign up at https://context.gnist.ai/signup for a free API key (100 calls/day).
- Choose your integration method: MCP protocol or REST API.
Connect via MCP
Add to your MCP client config (Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"gnist-stortinget": {
"url": "https://context.gnist.ai/mcp/stortinget/",
"headers": {
"Gnist-API-Key": "YOUR_API_KEY"
}
}
}
}
Tools (10)
list_sessions
List all parliamentary sessions in the Norwegian Storting. Returns sessions from 1986-87 to the current session, each identified by a session ID like '2024-2025'. Use the session ID with other tools (get_cases, list_committees) to query data within a specific session. Returns: Dict with 'count' and 'sessions' list. Each session has id, from, to dates.
curl -X POST "https://context.gnist.ai/mcp/stortinget/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "list_sessions", "arguments": {}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/stortinget/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {}, 'name': 'list_sessions'}},
)
print(resp.json())
get_current_representatives
Get all current members of the Norwegian Parliament (Stortinget). Returns the full list of sitting representatives, including their party, county, committee assignments, and contact information. Returns: Dict with 'count' and 'representatives' list. Each has id, name, party, county, committees, email, gender, and date_of_birth.
curl -X POST "https://context.gnist.ai/mcp/stortinget/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_current_representatives", "arguments": {}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/stortinget/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {}, 'name': 'get_current_representatives'}},
)
print(resp.json())
get_representatives
Get representatives for a specific parliamentary period. Parliamentary periods span four years (e.g. '2021-2025', '2017-2021'). Use list_sessions to find valid period IDs. Args: period_id: Parliamentary period (e.g. '2021-2025'). Returns: Dict with 'count' and 'representatives' list.
| Parameter | Type | Required | Description |
|---|---|---|---|
period_id | string | required | Parliamentary period (e.g. '2021-2025'). |
curl -X POST "https://context.gnist.ai/mcp/stortinget/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_representatives", "arguments": {"period_id": "'2021-2025'"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/stortinget/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'period_id': "'2021-2025'"},
'name': 'get_representatives'}},
)
print(resp.json())
list_parties
List political parties in the Norwegian Parliament. Without a session_id, returns all parties (historical and current). With a session_id, returns only parties represented in that session. Args: session_id: Optional session (e.g. '2024-2025'). Omit for all parties. Returns: Dict with 'count' and 'parties' list. Each has id and name.
| Parameter | Type | Required | Description |
|---|---|---|---|
session_id | any | optional | Optional session (e.g. '2024-2025'). Omit for all parties. |
curl -X POST "https://context.gnist.ai/mcp/stortinget/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "list_parties", "arguments": {"session_id": "'2024-2025'"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/stortinget/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'session_id': "'2024-2025'"}, 'name': 'list_parties'}},
)
print(resp.json())
list_committees
List parliamentary committees for a given session. Committees handle specific policy areas: finance, justice, health, energy, etc. Each session typically has 15-18 standing committees. Args: session_id: Parliamentary session (e.g. '2024-2025'). Returns: Dict with 'count' and 'committees' list. Each has id and name.
| Parameter | Type | Required | Description |
|---|---|---|---|
session_id | string | required | Parliamentary session (e.g. '2024-2025'). |
curl -X POST "https://context.gnist.ai/mcp/stortinget/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "list_committees", "arguments": {"session_id": "'2024-2025'"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/stortinget/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'session_id': "'2024-2025'"},
'name': 'list_committees'}},
)
print(resp.json())
get_cases
Get all cases (bills, propositions, questions) for a parliamentary session. Returns all cases processed during the session, including their committee assignment, topics, and status. Use the case ID with get_case for full details or get_votes for voting results. Args: session_id: Parliamentary session (e.g. '2024-2025'). Returns: Dict with 'count' and 'cases' list. Each has id, title, committee, topics, and status.
| Parameter | Type | Required | Description |
|---|---|---|---|
session_id | string | required | Parliamentary session (e.g. '2024-2025'). |
curl -X POST "https://context.gnist.ai/mcp/stortinget/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_cases", "arguments": {"session_id": "'2024-2025'"}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/stortinget/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'session_id': "'2024-2025'"}, 'name': 'get_cases'}},
)
print(resp.json())
get_case
Get detailed information about a specific parliamentary case. Returns full case details including proposers, rapporteurs, committee, topics, and reference information. Args: case_id: Numeric case ID (e.g. 103839). Returns: Full case details with proposers, rapporteurs, topics, and committee info.
| Parameter | Type | Required | Description |
|---|---|---|---|
case_id | integer | required | Numeric case ID (e.g. 103839). |
curl -X POST "https://context.gnist.ai/mcp/stortinget/" \
-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", "arguments": {"case_id": 103839}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/stortinget/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'case_id': 103839}, 'name': 'get_case'}},
)
print(resp.json())
get_votes
Get voting results for a parliamentary case. Returns all votes taken on the case, including for/against counts, whether it passed, and the specific motion being voted on. Args: case_id: Numeric case ID (e.g. 103839). Returns: Dict with 'count' and 'votes' list. Each vote has for/against/absent counts, passed status, and the motion topic.
| Parameter | Type | Required | Description |
|---|---|---|---|
case_id | integer | required | Numeric case ID (e.g. 103839). |
curl -X POST "https://context.gnist.ai/mcp/stortinget/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_votes", "arguments": {"case_id": 103839}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/stortinget/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {'case_id': 103839}, 'name': 'get_votes'}},
)
print(resp.json())
list_topics
List the parliamentary topic taxonomy. Returns the two-level hierarchy of policy topics used to classify cases. Main topics include areas like Energy, Finance, Defense, Education, Health. Each main topic has subtopics for more specific classification. Returns: Dict with 'count' and 'topics' list. Each has id, name, is_main_topic, and a subtopics list.
curl -X POST "https://context.gnist.ai/mcp/stortinget/" \
-H "Content-Type: application/json" \
-H "Gnist-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "list_topics", "arguments": {}}}'
import httpx
resp = httpx.post(
"https://context.gnist.ai/mcp/stortinget/",
headers={"Gnist-API-Key": "YOUR_API_KEY"},
json={'id': 1,
'jsonrpc': '2.0',
'method': 'tools/call',
'params': {'arguments': {}, 'name': 'list_topics'}},
)
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'.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: general) |
curl -X POST "https://context.gnist.ai/mcp/stortinget/" \
-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/stortinget/",
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
Use
list_sessions to find items, then get_current_representatives to get full details. This two-step pattern is common for exploring data before drilling down.FAQ
What data does Stortinget (Norwegian Parliament) provide?
Norwegian Parliament data — representatives, committees, cases/bills, votes, and topic taxonomy. It exposes 10 tools: list_sessions, get_current_representatives, get_representatives, list_parties, list_committees, get_cases, get_case, get_votes, list_topics, 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 Stortinget (Norwegian Parliament) API return?
JSON, via either MCP protocol (JSON-RPC 2.0) or REST API.