Canonical
GET /api/municipalities
Norwegian municipality and county reference data from SSB Klass.
Data source: SSB Klass. Use this endpoint to resolve municipality and county codes for company-search queries.
Request
GET /api/municipalities
| Parameter | Type | Required | Description |
|---|---|---|---|
county |
string | no | 2-digit county code (e.g. 03 for Oslo, 39 for Vestfold). When omitted, returns all counties. |
Response
Municipalities grouped by county, sorted by county code.
{
"data": [
{
"countyCode": "03",
"countyName": "Oslo",
"municipalities": [
{ "code": "0301", "name": "Oslo" }
]
}
]
}Examples
curl
curl -H "Authorization: Bearer $ORAKEL_KEY" \
"https://orakel.cloud/api/municipalities?county=03"JavaScript
const res = await fetch(
"https://orakel.cloud/api/municipalities?county=03",
{ headers: { Authorization: `Bearer ${process.env.ORAKEL_KEY}` } },
);
const { data } = await res.json();Error modes
| Status | Meaning | Action |
|---|---|---|
| 400 | county is not two digits |
Pass a zero-padded code (03, not 3) |
| 401 | Missing or invalid API key | Check the Authorization header |
| 429 | Rate or quota exceeded | Back off |
Rate limits
Per-key RPM per tier.
Typical use cases
- Dropdown source for UIs that filter company searches by location.
- Resolve municipality names to codes for the
municipalityparameter on/api/companies.