Getting Started¶
The Danish Parliament API (oda.ft.dk) provides unprecedented access to Denmark's parliamentary data. This guide will get you up and running in minutes.
Prerequisites¶
- Basic understanding of REST APIs
- Familiarity with JSON
- HTTP client (curl, browser, or programming language)
Key Concepts¶
No Authentication Required¶
The API is completely open - no API keys, tokens, or registration required. Simply start making requests!
OData Protocol¶
The API uses OData 3.0, providing powerful querying capabilities:
$top- Limit number of records (max 100)$skip- Skip records for pagination$filter- Filter records by conditions$expand- Include related data$select- Choose specific fields$orderby- Sort results$inlinecount- Get total counts
Danish Language¶
All content is in Danish. Key terms:
- Sag = Case/Bill
- Aktør = Actor/Person
- Afstemning = Voting session
- Stemme = Individual vote
- Dokument = Document
- Møde = Meeting
Your First Query¶
Let's start with a simple query to get 5 recent cases:
URL Encoding Critical
Always use %24 instead of $ in URLs. This is the #1 mistake developers make.
L Wrong: ?$top=5
✅ Correct: ?%24top=5
Response Structure¶
{
"odata.metadata": "https://oda.ft.dk/api/$metadata#Sag",
"value": [
{
"id": 102903,
"titel": "Kommissionsmeddelelse om...",
"offentlighedskode": "O",
"opdateringsdato": "2025-09-09T17:49:11.87",
"periodeid": 32,
"statsbudgetsag": true,
"statusid": 11,
"typeid": 5
}
]
}
Common Query Patterns¶
Filter by Date¶
# Cases updated today
curl "https://oda.ft.dk/api/Sag?%24filter=year(opdateringsdato)%20eq%202025&%24top=5"
Search by Text¶
# Climate-related cases
curl "https://oda.ft.dk/api/Sag?%24filter=substringof('klima',titel)&%24top=5"
Include Related Data¶
Pagination¶
Field Selection for Performance¶
# Only get specific fields
curl "https://oda.ft.dk/api/Sag?%24select=id,titel,opdateringsdato&%24top=5"
Understanding the Data¶
Entity Types¶
The API contains 50 different entity types organized into logical groups:
- Core Entities: Sag (Cases), Aktør (Actors), Afstemning (Voting), Stemme (Votes)
- Documents: Dokument, Fil (Files)
- Meetings: Møde, Dagsordenspunkt
- Relationships: Junction tables connecting entities
- Classifications: Status, Type, and Category entities
Data Freshness¶
The API provides exceptionally fresh data: - Updates within hours of parliamentary activity - Latest example: 2025-09-09T17:49:11.87 - 50+ daily updates across all entities
Try It Yourself - Interactive Query Builder¶
Next Steps¶
- First Query - Step-by-step first API call
- URL Encoding - Master the critical encoding rules
- No Authentication - Understanding open access
- Common Mistakes - Avoid these pitfalls
Quick Reference¶
| Purpose | Endpoint | Example |
|---|---|---|
| Cases | /api/Sag |
Legislative bills and proposals |
| Actors | /api/Aktør |
Politicians, committees, ministries |
| Votes | /api/Afstemning |
Voting sessions |
| Individual Votes | /api/Stemme |
How each politician voted |
| Documents | /api/Dokument |
Parliamentary documents |
| Meetings | /api/Møde |
Parliamentary meetings |
Performance Tips¶
- Use
$select- Only request fields you need - Limit results - Maximum 100 records per request
- Filter early - Apply filters before expansions
- Cache wisely - Use
opdateringsdatofor change detection
Need Help?¶
- Troubleshooting - Common problems and solutions
- Code Examples - Ready-to-use client libraries
- API Reference - Complete technical documentation
- Contact: folketinget@ft.dk (subject: "øbne Data")