PRH Open Data (Finland) Post Codes API

The Post Codes API from PRH Open Data (Finland) — 1 operation(s) for post codes.

GitHub OpenAPI

Operations 1

GET /post_codes Retrieve postal code details #

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/avoindata-prh-fi:avoindata-prh-fi-post-codes-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

avoindata-prh-fi-post-codes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Avoindata Prh Fi Post Codes API
  version: 2.0
  license:
    name: Creative Commons Nimeä 4.0
    url: https://creativecommons.org/licenses/by/4.0/
  description: 'Operations tagged Post Codes across 2 of this provider''s published API definitions: avoindata-prh-fi-ytj-openapi-original.yml, avoindata-prh-fi-ytj-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://avoindata.prh.fi/opendata-ytj-api/v3
tags:
- name: Post Codes
paths:
  /post_codes:
    get:
      summary: Retrieve postal code details
      operationId: GetPostCodes
      parameters:
      - in: query
        name: lang
        required: true
        description: Language code
        schema:
          type: string
          enum:
          - en
          - fi
          - sv
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PostOfficeEntry'
        400:
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        429:
          description: Too many requests
          content:
            text/plain:
              schema:
                type: string
        500:
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        503:
          description: The server cannot process the request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      tags:
      - Post Codes
    servers:
    - url: https://avoindata.prh.fi/opendata-ytj-api/v3
components:
  schemas:
    PostOfficeEntry:
      type: object
      required:
      - postCode
      - city
      - active
      - languageCode
      description: Postal addresses
      properties:
        postCode:
          type: string
          description: Postal code
          minLength: 5
          maxLength: 5
        city:
          type: string
          description: Town or city
          maxLength: 50
        active:
          type: boolean
          description: Is the detail active
        languageCode:
          type: string
          description: '[Language code](/opendata-ytj-api/v3/description?code=KIELI&lang=en)

            '
          maxLength: 8
        municipalityCode:
          type:
          - string
          - 'null'
          description: Municipality code
          minLength: 3
          maxLength: 3
    ErrorResponse:
      type: object
      required:
      - timestamp
      - code
      description: Error message
      properties:
        timestamp:
          type: string
          minLength: 19
          maxLength: 19
          format: date-time
          x-field-extra-annotation: '@com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")'
          description: Time, including seconds, without a time zone in the format ‘YYYY-MM-DD 00:00:00'
        message:
          type: string
          description: Error message
          maxLength: 1000
        errorcode:
          type: integer
          format: int32
          description: Error code
externalDocs:
  description: Find out more about the Swagger software
  url: http://swagger.io
x-refined-from:
- avoindata-prh-fi-ytj-openapi-original.yml
- avoindata-prh-fi-ytj-openapi.yml