{"openapi":"3.0.3","info":{"title":"Gnist Context — Riksdagen (Swedish Parliament)","description":"Swedish Parliament data — document search, committee reports, bills, motions, vote records, and member profiles.\n\n- **MCP endpoint:** `https://context.gnist.ai/mcp/riksdagen/`\n- **Toolkit page:** `/toolkits/riksdagen`\n- **Full API spec:** `/api/openapi.json`\n- **Get an API key:** `/signup`","version":"1.0.0","contact":{"name":"GnistAI","url":"https://gnist.ai"}},"servers":[{"url":"https://context.gnist.ai","description":"Production"}],"paths":{"/rest/riksdagen/search_documents":{"post":{"tags":["Government"],"summary":"search_documents","description":"Search Swedish parliamentary documents — bills, motions, committee reports, and more.\n\nQuery the Riksdagen (Swedish Parliament) document archive with full-text search\nand structured filters. The archive contains 600K+ documents dating back decades.\n\nReturns:\n    Dict with 'count', 'total', 'page', 'pages', and 'documents' list.","operationId":"riksdagen_search_documents","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"query":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Free-text search term"},"doc_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Document type code: 'prop' (proposition/bill), 'mot' (motion), 'bet' (committee report), 'skr' (government communication), 'sou' (inquiry report)"},"committee":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Committee code: 'FiU' (Finance), 'AU' (Labour), 'JuU' (Justice), 'SoU' (Social), 'UU' (Foreign Affairs), etc."},"session":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Parliament session, e.g. '2025/26'. Format: YYYY/YY"},"page":{"default":1,"description":"Page number (default 1)","minimum":1,"type":"integer"}},"type":"object"}}}}}},"/rest/riksdagen/get_document":{"post":{"tags":["Government"],"summary":"get_document","description":"Get full details for a specific Swedish parliamentary document.\n\nRetrieves the complete document including metadata and (where available) HTML content.\n\nReturns:\n    Document detail dict, or error if not found.","operationId":"riksdagen_get_document","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"dok_id":{"description":"Document ID from search results (e.g. 'HD01FiU1')","type":"string"}},"required":["dok_id"],"type":"object"}}}}}},"/rest/riksdagen/list_votes":{"post":{"tags":["Government"],"summary":"list_votes","description":"List parliamentary votes in the Swedish Riksdagen.\n\nEach record represents one member's vote on one ballot point.\nFilter by session and/or document to narrow results.\n\nReturns:\n    Dict with 'count' and 'votes' list containing individual member votes.","operationId":"riksdagen_list_votes","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"session":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Parliament session, e.g. '2025/26'. Format: YYYY/YY"},"doc_id":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Filter votes for a specific document designation (e.g. 'FiU1')"}},"type":"object"}}}}}},"/rest/riksdagen/get_vote_detail":{"post":{"tags":["Government"],"summary":"get_vote_detail","description":"Get full voting detail with individual member votes for a specific ballot.\n\nReturns the document context and every member's vote (Ja/Nej/Avstår/Frånvarande).\n\nReturns:\n    Dict with document info and 'votes' list, or error if not found.","operationId":"riksdagen_get_vote_detail","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"votering_id":{"description":"Vote ID from vote list (e.g. '2025/26:FiU1:1')","type":"string"}},"required":["votering_id"],"type":"object"}}}}}},"/rest/riksdagen/search_members":{"post":{"tags":["Government"],"summary":"search_members","description":"Search members of the Swedish Parliament (Riksdagen).\n\nReturns current members by default. Use status='samtliga' to include\nall historical members (2700+ total).\n\nReturns:\n    Dict with 'count', 'total', and 'members' list with party, constituency, assignments.","operationId":"riksdagen_search_members","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Member status: omit for current members, 'samtliga' for all historical members"},"party":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Party code: 'S' (Social Democrats), 'M' (Moderates), 'SD' (Sweden Democrats), 'C' (Centre), 'V' (Left), 'KD' (Christian Democrats), 'L' (Liberals), 'MP' (Green)"},"limit":{"default":50,"description":"Max results to return (default 50)","maximum":500,"minimum":1,"type":"integer"}},"type":"object"}}}}}},"/rest/riksdagen/get_member":{"post":{"tags":["Government"],"summary":"get_member","description":"Get full details for a specific member of the Swedish Parliament.\n\nReturns personal information, party affiliation, constituency,\nand complete assignment history (committee roles, etc.).\n\nReturns:\n    Member detail dict, or error if not found.","operationId":"riksdagen_get_member","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"person_id":{"description":"Member source ID from search results","type":"string"}},"required":["person_id"],"type":"object"}}}}}},"/rest/riksdagen/report_feedback":{"post":{"tags":["Government"],"summary":"report_feedback","description":"Report a bug, feature request, or general feedback for this data source.\n\nUse this when something doesn't work as expected, when you'd like\na new feature, or when you have suggestions for improvement.\n\nArgs:\n    feedback: Describe the issue or suggestion.\n    feedback_type: One of 'bug', 'feature_request', or 'general'.","operationId":"riksdagen_report_feedback","responses":{"200":{"description":"Successful tool call","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Server or tool not found"},"500":{"description":"Tool execution error"}},"security":[{"ApiKeyHeader":[]},{"ApiKeyQuery":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"feedback":{"type":"string"},"feedback_type":{"default":"general","type":"string"}},"required":["feedback"],"type":"object"}}}}}}},"tags":[{"name":"Government","description":"Data sources: Government"}],"components":{"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"gnist-api-key","description":"API key passed via request header."},"ApiKeyQuery":{"type":"apiKey","in":"query","name":"gnist_api_key","description":"API key passed via query parameter."}}}}