Brønnøysundregistrene Kommuner API

Operasjoner mot kommuner i enhetsregisteret

GitHub OpenAPI

Operations 2

1 of 2 operations are conformant: apis.io called them with no credentials and the responses matched this contract. Checked 2026-11-12. how this works · status file

GET /enhetsregisteret/api/kommuner Hent kommuner conformant #
GET /enhetsregisteret/api/kommuner/{kommunenr} Hent kommune på kommunenummer #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/brreg-no:brreg-no-kommuner-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

brreg-no-kommuner-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Brreg No Kommuner API
  version: 2.0.0
  contact:
    email: opendata@brreg.no
  license:
    name: Norsk lisens for offentlige data (NLOD)
    url: https://data.norge.no/nlod/no/2.0
  x-logo:
    url: https://scf.brreg.no/bilder/brreg_logo.svg
    altText: Brønnøysundregistrene, snarvei til fremsiden
    href: https://data.brreg.no/enhetsregisteret/oppslag
  description: 'Operations tagged kommuner across 2 of this provider''s published API definitions: brreg-no-enhetsregisteret-openapi.json, brreg-no-enhetsregisteret-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://data.brreg.no
  description: Server
security: []
tags:
- name: kommuner
  x-displayName: Kommuner
  description: Operasjoner mot kommuner i enhetsregisteret
paths:
  /enhetsregisteret/api/kommuner:
    get:
      tags:
      - kommuner
      operationId: hentKommuner
      parameters:
      - name: sort
        in: query
        schema:
          type: string
          example: ASC
        description: Sortering av resultatsett
      - name: size
        in: query
        schema:
          type: string
          example: 10
        description: Sidestørrelse
      - name: page
        in: query
        schema:
          type: string
          example: 1
        description: Sidenummer
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Kommuner'
        '400':
          description: '400'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
        '500':
          description: '500'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
      summary: Hent kommuner
    servers:
    - url: https://data.brreg.no
      description: Server
  /enhetsregisteret/api/kommuner/{kommunenr}:
    get:
      tags:
      - kommuner
      operationId: hentKommune
      parameters:
      - name: kommunenr
        in: path
        required: true
        schema:
          type: string
          example: '0301'
        description: Kommunenummeret
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Kommune'
        '400':
          description: '400'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
        '404':
          description: Ikke funnet
        '500':
          description: '500'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
      summary: Hent kommune på kommunenummer
    servers:
    - url: https://data.brreg.no
      description: Server
components:
  schemas:
    InternalServerError:
      type: object
      additionalProperties: false
      properties:
        timestamp:
          type: string
          example: 2024-01-05T07:36:21.523+0000
          description: Tidspunkter for når feilen oppstod
        status:
          type: number
          example: 500
          description: HTTP status koden
        error:
          type: string
          example: Internal Server Error
          description: Feilmelding
        message:
          type: string
          example: Internal Server Error
          description: Utdypende feilmelding
        path:
          type: string
          example: /enhetsregisteret/api/enheter
          description: Url sti som feilet
        trace:
          type: string
          example: b94669c0-425a-4b6c-ab30-504de8d9c127
          description: Send denne koden til oss for at vi skal lettere finne igjen feilen i våre logger
      required:
      - timestamp
      - status
      - error
      - message
      - path
      - trace
    Page:
      type: object
      additionalProperties: false
      properties:
        number:
          type: number
          example: 1
          description: Nummer på gjeldende side
        size:
          type: number
          example: 20
          description: Sidestørrelse på resultatet
        totalPages:
          type: number
          example: 20
          description: Totalt antall sider i resultatet
        totalElements:
          type: number
          example: 100
          description: Totalt antall elementer i resultatet
      required:
      - number
      - size
      - totalElements
      - totalPages
      description: Side
    ValideringsFeil:
      required:
      - feilmelding
      - parametere
      type: object
      additionalProperties: false
      properties:
        feilaktigVerdi:
          type:
          - string
          - 'null'
          example: '[INC]'
          description: Current value
        feilmelding:
          type: string
          example: INC er ikke en gyldig organisasjonsform
          description: Error message for current validation error
        parametere:
          type: array
          example:
          - organisasjonsform
          items:
            type: string
          description: Current parameters
    BadRequest:
      type: object
      additionalProperties: false
      properties:
        antallFeil:
          type: number
          example: 4
          description: Number of errors
        valideringsfeil:
          type: array
          example:
          - feilmelding: VYuW94MNgw
            feilaktigVerdi: TNpG8ziEFi
            parametere:
            - beNB4EGRsf
          items:
            $ref: '#/components/schemas/ValideringsFeil'
          description: The validation errors
        sti:
          type: string
          example: cfQRiNgGtG
          description: The path to the endpoint that failed
        feilmelding:
          type: string
          example: GqDEbwc71f
          description: Error message
        tidsstempel:
          type: number
          example: 1704366191
          description: Timestamp for when the error occurred
        status:
          type: number
          example: 500
          description: HTTP status code
      required:
      - antallFeil
      - feilmelding
      - status
      - sti
      - tidsstempel
      - valideringsfeil
    Kommuner:
      type: object
      additionalProperties: false
      properties:
        _links:
          type: object
          additionalProperties: false
          properties:
            next:
              type: object
              additionalProperties: false
              properties:
                href:
                  type:
                  - string
                  - 'null'
                  example: https://data.brreg.no/enhetsregisteret/api/kommuner?page=1&size=20
                  description: Lenke til neste side med resultater
            last:
              type: object
              additionalProperties: false
              properties:
                href:
                  type:
                  - string
                  - 'null'
                  example: https://data.brreg.no/enhetsregisteret/api/kommuner?page=54469&size=20
                  description: Lenke til siste side med resultater
            prev:
              type: object
              additionalProperties: false
              properties:
                href:
                  type:
                  - string
                  - 'null'
                  example: https://data.brreg.no/enhetsregisteret/api/kommuner?page=0&size=20
                  description: Lenke til forrige side med resultater
            self:
              required:
              - href
              type: object
              additionalProperties: false
              properties:
                href:
                  type: string
                  example: https://data.brreg.no/enhetsregisteret/api/kommuner
                  description: Lenke til egen ressurs
            first:
              type: object
              additionalProperties: false
              properties:
                href:
                  type:
                  - string
                  - 'null'
                  example: https://data.brreg.no/enhetsregisteret/api/kommuner?page=0&size=20
                  description: Lenke til første side med resultater
        _embedded:
          required:
          - kommuner
          type: object
          additionalProperties: false
          properties:
            kommuner:
              type: array
              items:
                $ref: '#/components/schemas/Kommune'
              description: En liste av kommuner som finnes i Enhetsregisteret
        page:
          $ref: '#/components/schemas/Page'
    Kommune:
      type: object
      additionalProperties: false
      properties:
        _links:
          type: object
          additionalProperties: false
          properties:
            self:
              required:
              - href
              type: object
              additionalProperties: false
              properties:
                href:
                  type: string
                  example: https://data.brreg.no/enhetsregisteret/api/kommuner/0301
                  description: Lenke til egen ressurs
        nummer:
          type: string
          example: '0301'
          description: Kommunenummeret
        navn:
          type: string
          example: OSLO
          description: Kommunenavnet
      required:
      - nummer
      - navn
      description: Kommune
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
x-refined-from:
- brreg-no-enhetsregisteret-openapi.json
- brreg-no-enhetsregisteret-openapi.yml