GnistAI GnistAI
Log in

Finlex (Finnish Legislation)

Finnish legislation — statutes, consolidated laws, and government proposals from Finlex open data.

Overview   |   MCP Docs   |   API Docs   |   OpenAPI   |   Playground   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 7 tools tools 7 7 Legal

Data source: Finlex (opendata.finlex.fi)

MCP MCP Protocol

Endpoint https://context.gnist.ai/mcp/finlex/
claude_desktop_config.json
{
  "mcpServers": {
    "gnist-finlex": {
      "url": "https://context.gnist.ai/mcp/finlex/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}
Shell
curl -X POST "https://context.gnist.ai/mcp/finlex/" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_statute", "arguments": {"year": 1, "number": "example"}}}'

API REST API

API Root https://context.gnist.ai/rest/finlex/

7 endpoints available:

Shell
curl "https://context.gnist.ai/rest/finlex/get_statute?year=1&number=example" \
  -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx

resp = httpx.get(
    "https://context.gnist.ai/rest/finlex/get_statute",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    params={
        "year": 1,
        "number": "example"
},
)
print(resp.json())

OpenAPI Spec  ·  Full API Docs

CLI Command Line

Command gc finlex

CLI documentation will be available when the GnistAI SDK is published.

Install
pip install gnistai

Available Tools (7)

list_statutes
List Finnish statutes from the Statute Book of Finland (Suomen Saadoskokoelma).
ParameterTypeRequiredDescription
yearanyoptionalFilter by year (e.g. 2025)
languagestringoptionalLanguage: 'fin' (Finnish, default), 'swe' (Swedish) (default: "fin")
pageintegeroptionalPage number (default 1) (default: 1)
limitintegeroptionalResults per page (default 20, max 50) (default: 20)
get_statute
Retrieve a specific Finnish statute with full text and article structure.
ParameterTypeRequiredDescription
yearintegerrequiredYear of the statute (e.g. 2025)
numberstringrequiredStatute number within the year (e.g. '1', '118')
languagestringoptionalLanguage: 'fin' (Finnish, default), 'swe' (Swedish) (default: "fin")
list_government_proposals
List Finnish government proposals (hallituksen esitykset / HE).
ParameterTypeRequiredDescription
yearanyoptionalFilter by year (e.g. 2025)
languagestringoptionalLanguage: 'fin' (Finnish, default), 'swe' (Swedish) (default: "fin")
pageintegeroptionalPage number (default 1) (default: 1)
limitintegeroptionalResults per page (default 20, max 50) (default: 20)
get_government_proposal
Retrieve a specific Finnish government proposal with metadata and content preview.
ParameterTypeRequiredDescription
yearintegerrequiredYear of the proposal (e.g. 2025)
numberstringrequiredProposal number within the year (e.g. '8')
languagestringoptionalLanguage: 'fin' (Finnish, default), 'swe' (Swedish) (default: "fin")
list_consolidated_statutes
List consolidated (updated/amended) Finnish statutes.
ParameterTypeRequiredDescription
yearanyoptionalFilter by year (e.g. 2025)
languagestringoptionalLanguage: 'fin' (Finnish, default), 'swe' (Swedish) (default: "fin")
pageintegeroptionalPage number (default 1) (default: 1)
limitintegeroptionalResults per page (default 20, max 50) (default: 20)
get_consolidated_statute
Retrieve a specific consolidated Finnish statute with full amended text.
ParameterTypeRequiredDescription
yearintegerrequiredYear of the statute (e.g. 2024)
numberstringrequiredStatute number within the year (e.g. '2')
languagestringoptionalLanguage: 'fin' (Finnish, default), 'swe' (Swedish) (default: "fin")
report_feedback
Report a bug, feature request, or general feedback for this data source.
ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")

Related