GnistAI GnistAI
Log in

Finlex (Finnish Legislation)

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

Overview   |   MCP   |   REST API   |   OpenAPI   |   CLI   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 7 tools tools 7 7 type: api wrapper type type api wrapper api wrapper lifecycle: maintained lifecycle lifecycle maintained maintained Legal

Data source: Finlex (opendata.finlex.fi)

REST Bridge Endpoint https://context.gnist.ai/rest/finlex/
Authentication

All requests require a Gnist-API-Key header (or api_key query parameter).

Free tier: 100 calls/day. Get your API key.

Tools (7)

list_statutes

List Finnish statutes from the Statute Book of Finland (Suomen Saadoskokoelma).

Browse recently published statutes or filter by year. Each statute is identified
by year and number (e.g. 2026/1). Use get_statute to retrieve full text.

Returns:
Dict with 'count', 'page', and 'statutes' list.

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)
Request Body
{
  "query": "example"
}
get_statute

Retrieve a specific Finnish statute with full text and article structure.

Returns the statute's metadata (title, dates, ELI identifier) and its articles
with section numbers, headings, and content parsed from Akoma Ntoso XML.

Returns:
Statute detail dict, or error if not found.

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")
Request Body
{
  "year": 1,
  "number": "123456789"
}
list_government_proposals

List Finnish government proposals (hallituksen esitykset / HE).

Government proposals are bills submitted by the Finnish government to Parliament.
They contain the reasoning and draft legislation for proposed changes.

Returns:
Dict with 'count', 'page', and 'proposals' list.

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)
Request Body
{
  "query": "example"
}
get_government_proposal

Retrieve a specific Finnish government proposal with metadata and content preview.

Returns the proposal's metadata (title, dates, ELI identifier) and a preview
of the content (first 10 paragraphs).

Returns:
Proposal detail dict, or error if not found.

ParameterTypeRequiredDescription
yearintegerrequiredYear of the proposal (e.g. 2025)
numberstringrequiredProposal number within the year (e.g. '8')
languagestringoptionalLanguage: 'fin' (Finnish, default), 'swe' (Swedish) (default: "fin")
Request Body
{
  "year": 1,
  "number": "123456789"
}
list_consolidated_statutes

List consolidated (updated/amended) Finnish statutes.

Consolidated statutes reflect the current version of the law with all amendments
applied. Use this instead of list_statutes when you need the up-to-date text.

Returns:
Dict with 'count', 'page', and 'statutes' list.

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)
Request Body
{
  "query": "example"
}
get_consolidated_statute

Retrieve a specific consolidated Finnish statute with full amended text.

Returns the current version of the statute with all amendments applied,
including metadata and article structure.

Returns:
Statute detail dict, or error if not found.

ParameterTypeRequiredDescription
yearintegerrequiredYear of the statute (e.g. 2024)
numberstringrequiredStatute number within the year (e.g. '2')
languagestringoptionalLanguage: 'fin' (Finnish, default), 'swe' (Swedish) (default: "fin")
Request Body
{
  "year": 1,
  "number": "123456789"
}
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")
Request Body
{
  "feedback": "example"
}

Quick Start

Shell
curl -X POST "https://context.gnist.ai/rest/finlex/get_statute" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"year": 1, "number": "example"}'
Python
import httpx

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

Related Toolkits (Legal)

Resources