Digitraffic (Fintraffic) Metadata API

Returns supporting metadata. For example list of stations

GitHub OpenAPI

Operations 11

GET /api/v1/metadata/train-types Returns a list of train types #
GET /api/v1/metadata/train-running-message-rules Returns list of train running message rules #
GET /api/v1/metadata/train-categories Returns a list of train categories #
GET /api/v1/metadata/track-sections Returns list of track sections #
GET /api/v1/metadata/time-table-periods Returns list of time table periods #
GET /api/v1/metadata/third-cause-category-codes Returns list of third cause category codes #
GET /api/v1/metadata/stations Returns list of stations #
GET /api/v1/metadata/stations.geojson Returns list of stations in geojson format #
GET /api/v1/metadata/operators Returns list of operators #
GET /api/v1/metadata/detailed-cause-category-codes Returns list of detailed cause category codes #
GET /api/v1/metadata/cause-category-codes Returns list of cause category codes #

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/digitraffic-fi:digitraffic-fi-metadata-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

digitraffic-fi-metadata-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: rata.digitraffic.fi Metadata API
  version: '1.0'
  description: 'OpenAPI document


    Digitraffic is a service operated by Fintraffic, offering real time traffic information. Currently the service covers *road, marine and rail* traffic. More information can be found at the Digitraffic website


    The service has a public Google-group rail.digitraffic.fi for communication between developers, service administrators and Fintraffic. The discussion in the forum is mostly in Finnish, but you''re welcome to communicate in English too.


    ### General notes of the API

    * Many Digitraffic APIs use the GeoJSON format. The definition of GeoJSON can be found at https://tools.ietf.org/html/rfc7946.

    * For dates and times, the ISO 8601 format is used with "Zulu" zero offset from UTC unless otherwise specified (i.e., "yyyy-mm-ddThh:mm:ss[.mmm]Z"). E.g. 2019-11-01T06:30:00Z.'
  termsOfService: https://www.digitraffic.fi/en/terms-of-service/
  contact:
    name: Digitraffic / Fintraffic
    url: https://www.digitraffic.fi/
  license:
    name: Creative Commons 4.0 BY
    url: https://creativecommons.org/licenses/by/4.0/
servers:
- url: https://rata.digitraffic.fi
tags:
- name: Metadata
  description: Returns supporting metadata. For example list of stations
paths:
  /api/v1/metadata/train-types:
    get:
      tags:
      - Metadata
      summary: Returns a list of train types
      operationId: getTrainTypes
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TrainType'
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
          content: {}
  /api/v1/metadata/train-running-message-rules:
    get:
      tags:
      - Metadata
      summary: Returns list of train running message rules
      operationId: getTrainRunningMessageRules
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TrainRunningMessageRule'
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
          content: {}
  /api/v1/metadata/train-categories:
    get:
      tags:
      - Metadata
      summary: Returns a list of train categories
      operationId: getTrainCategories
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TrainCategory'
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
          content: {}
  /api/v1/metadata/track-sections:
    get:
      tags:
      - Metadata
      summary: Returns list of track sections
      operationId: getTrackSections
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TrackSection'
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
          content: {}
  /api/v1/metadata/time-table-periods:
    get:
      tags:
      - Metadata
      summary: Returns list of time table periods
      operationId: getTimeTablePeriods
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TimeTablePeriod'
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
          content: {}
  /api/v1/metadata/third-cause-category-codes:
    get:
      tags:
      - Metadata
      summary: Returns list of third cause category codes
      operationId: getThirdCauseResources
      parameters:
      - name: show_inactive
        in: query
        required: false
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ThirdCategoryCode'
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
          content: {}
  /api/v1/metadata/stations:
    get:
      tags:
      - Metadata
      summary: Returns list of stations
      operationId: getStations
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Station'
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
          content: {}
  /api/v1/metadata/stations.geojson:
    get:
      tags:
      - Metadata
      summary: Returns list of stations in geojson format
      operationId: getStationsAsGeoJson
      responses:
        '200':
          description: OK
          content:
            application/vnd.geo+json:
              schema:
                $ref: '#/components/schemas/FeatureCollection'
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
          content: {}
  /api/v1/metadata/operators:
    get:
      tags:
      - Metadata
      summary: Returns list of operators
      operationId: getOperators
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Operator'
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
          content: {}
  /api/v1/metadata/detailed-cause-category-codes:
    get:
      tags:
      - Metadata
      summary: Returns list of detailed cause category codes
      operationId: getDetailedCauseResources
      parameters:
      - name: show_inactive
        in: query
        description: show_inactive
        required: false
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/DetailedCategoryCode'
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
          content: {}
  /api/v1/metadata/cause-category-codes:
    get:
      tags:
      - Metadata
      summary: Returns list of cause category codes
      operationId: getCauseCodes
      parameters:
      - name: show_inactive
        in: query
        description: show_inactive
        required: false
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CategoryCode'
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
          content: {}
components:
  schemas:
    TimeTablePeriod:
      title: TimeTablePeriod
      type: object
      properties:
        id:
          type: integer
          format: int64
        name:
          type: string
        effectiveFrom:
          type: string
          format: date
        effectiveTo:
          type: string
          format: date
        capacityAllocationConfirmDate:
          type: string
          format: date
        capacityRequestSubmissionDeadline:
          type: string
          format: date
        changeDates:
          type: array
          items:
            $ref: '#/components/schemas/TimeTablePeriodChangeDate'
    Feature:
      type: object
      properties:
        type:
          type: string
        geometry:
          $ref: '#/components/schemas/Geometry'
        properties:
          type: object
    CoordinateSequenceFactory:
      type: object
    TrainCategory:
      title: TrainCategory
      type: object
      properties:
        name:
          type: string
          example: Commuter
    CategoryCode:
      title: CategoryCode
      required:
      - categoryCode
      - categoryName
      - validFrom
      type: object
      properties:
        passengerTerm:
          $ref: '#/components/schemas/PassengerTerm'
        categoryCode:
          type: string
          description: Official code
          example: E
        categoryName:
          type: string
          description: Official name
          example: Etuajassakulku
        validFrom:
          type: string
          description: Start date when this code is used
          format: date
        validTo:
          type: string
          description: End date when this code is used. Empty means category is used until further notice
          format: date
        id:
          type: integer
          format: int32
      description: A code that is used to categorize reasons for a train not being on schedule
    FeatureCollection:
      title: FeatureCollection
      type: object
      properties:
        type:
          type: string
        features:
          type: array
          items:
            $ref: '#/components/schemas/Feature'
    Envelope:
      type: object
      properties:
        'null':
          type: boolean
        height:
          type: number
          format: double
        diameter:
          type: number
          format: double
        width:
          type: number
          format: double
        minX:
          type: number
          format: double
        minY:
          type: number
          format: double
        maxX:
          type: number
          format: double
        maxY:
          type: number
          format: double
        area:
          type: number
          format: double
    TrackLocation:
      title: TrackLocation
      type: object
      properties:
        track:
          type: string
          example: '003'
        kilometres:
          type: integer
          format: int32
          example: 34
        metres:
          type: integer
          format: int32
          example: 940
      description: A location on the track. Kilometres and meters are distance from the start of the track
    Operator:
      title: Operator
      type: object
      properties:
        id:
          type: integer
          format: int64
        operatorName:
          type: string
        operatorShortCode:
          type: string
        operatorUICCode:
          type: integer
          format: int32
        trainNumbers:
          uniqueItems: true
          type: array
          items:
            $ref: '#/components/schemas/OperatorTrainNumber'
    CoordinateSequence:
      type: object
      properties:
        dimension:
          type: integer
          format: int32
        measures:
          type: integer
          format: int32
    TrainType:
      title: TrainType
      type: object
      properties:
        name:
          type: string
          example: HL
        trainCategory:
          $ref: '#/components/schemas/TrainCategory'
    TrainRunningMessageRule:
      title: TrainRunningMessageRule
      type: object
      properties:
        id:
          type: integer
          format: int64
        timeTableRowStationShortCode:
          type: string
          description: For which station is the actual time generated
        timeTableRowType:
          type: string
          description: For which TimeTableRow is the actual time generated
          enum:
          - ARRIVAL
          - DEPARTURE
        trainRunningMessageStationShortCode:
          type: string
        trainRunningMessageNextStationShortCode:
          type: string
        trainRunningMessageTrackSection:
          type: string
        trainRunningMessageType:
          type: string
          enum:
          - OCCUPY
          - RELEASE
        offset:
          type: integer
          description: TrainRunningMessages timestamp is adjusted for offset when generating actual time
          format: int32
      description: These rules define how TrainRunningMessages trigger actual times for TimeTableRows
    OperatorTrainNumber:
      title: OperatorTrainNumber
      type: object
      properties:
        id:
          type: integer
          format: int64
        bottomLimit:
          type: integer
          description: Where operator's train numbers start
          format: int32
          example: 76050
        topLimit:
          type: integer
          description: Where operator's train numbers end
          format: int32
          example: 76219
        trainCategory:
          type: string
          example: On-track machines
      description: Operators own a range of train numbers
    TrackSection:
      title: TrackSection
      type: object
      properties:
        id:
          type: integer
          format: int64
        station:
          type: string
          example: JNS
        trackSectionCode:
          type: string
          example: JNS_ERV40
        ranges:
          uniqueItems: true
          type: array
          items:
            $ref: '#/components/schemas/TrackRange'
    Type:
      type: object
    PrecisionModel:
      type: object
      properties:
        scale:
          type: number
          format: double
        type:
          $ref: '#/components/schemas/Type'
        floating:
          type: boolean
        maximumSignificantDigits:
          type: integer
          format: int32
        offsetX:
          type: number
          format: double
        offsetY:
          type: number
          format: double
    ThirdCategoryCode:
      title: ThirdCategoryCode
      required:
      - validFrom
      type: object
      properties:
        passengerTerm:
          $ref: '#/components/schemas/PassengerTerm'
        thirdCategoryCode:
          type: string
          example: E103
        thirdCategoryName:
          type: string
          example: Valmistuminen etuajassa
        description:
          type: string
          description: Detailed description
          example: Jos kyseessä ei ole kääntyvä juna ja se on valmis lähtemään etuajassa. Esim. vaihtotöitä on selkeästi suunniteltua vähemmän.
        validFrom:
          type: string
          description: Start date when this category code is used
          format: date
        validTo:
          type: string
          description: End date when this code is used. Empty means category is used until further notice
          format: date
        id:
          type: integer
          format: int32
      description: Most detailed category code for a Cause
    Geometry:
      type: object
      properties:
        envelope:
          $ref: '#/components/schemas/Geometry'
        factory:
          $ref: '#/components/schemas/GeometryFactory'
        userData:
          type: object
        length:
          type: number
          format: double
        empty:
          type: boolean
        valid:
          type: boolean
        dimension:
          type: integer
          format: int32
        simple:
          type: boolean
        numGeometries:
          type: integer
          format: int32
        envelopeInternal:
          $ref: '#/components/schemas/Envelope'
        coordinate:
          $ref: '#/components/schemas/Coordinate'
        precisionModel:
          $ref: '#/components/schemas/PrecisionModel'
        srid:
          type: integer
          format: int32
        geometryType:
          type: string
        coordinates:
          type: array
          items:
            $ref: '#/components/schemas/Coordinate'
        numPoints:
          type: integer
          format: int32
        rectangle:
          type: boolean
        area:
          type: number
          format: double
        centroid:
          $ref: '#/components/schemas/Point'
        interiorPoint:
          $ref: '#/components/schemas/Point'
        boundary:
          $ref: '#/components/schemas/Geometry'
        boundaryDimension:
          type: integer
          format: int32
    DetailedCategoryCode:
      title: DetailedCategoryCode
      required:
      - validFrom
      type: object
      properties:
        passengerTerm:
          $ref: '#/components/schemas/PassengerTerm'
        detailedCategoryCode:
          type: string
          example: E2
        detailedCategoryName:
          type: string
          example: Ajo- tai pysähdysajan alitus
        validFrom:
          type: string
          description: Start date when this category code is used
          format: date
        validTo:
          type: string
          description: End date when this code is used. Empty means category is used until further notice
          format: date
        id:
          type: integer
          format: int32
      description: Category code that is one step more detailed from its parent CategoryCode
    TimeTablePeriodChangeDate:
      title: TimeTablePeriodChangeDate
      type: object
      properties:
        id:
          type: integer
          format: int64
        effectiveFrom:
          type: string
          format: date
        capacityRequestSubmissionDeadline:
          type: string
          format: date
    Station:
      title: Station
      type: object
      properties:
        passengerTraffic:
          type: boolean
          description: Does this station have passenger traffic
          example: true
        type:
          type: string
          description: Type of station
          example: STATION,STOPPING_POINT
          enum:
          - STATION
          - STOPPING_POINT
          - TURNOUT_IN_THE_OPEN_LINE
        stationName:
          type: string
          example: Helsinki asema
        stationShortCode:
          type: string
          example: HKI
        stationUICCode:
          type: integer
          format: int32
          example: 1
        countryCode:
          type: string
          example: FI
        longitude:
          type: number
          example: 24.941662
        latitude:
          type: number
          example: 60.172133
    TrackRange:
      title: TrackRange
      type: object
      properties:
        id:
          type: integer
          format: int64
        startLocation:
          $ref: '#/components/schemas/TrackLocation'
        endLocation:
          $ref: '#/components/schemas/TrackLocation'
    PassengerTerm:
      title: PassengerTerm
      type: object
      properties:
        fi:
          type: string
          description: Finnish passenger friendly term for the code
        en:
          type: string
          description: English passenger friendly term for the code
        sv:
          type: string
          description: Swedish passenger friendly term for the code
    Point:
      type: object
      properties:
        envelope:
          $ref: '#/components/schemas/Geometry'
        factory:
          $ref: '#/components/schemas/GeometryFactory'
        userData:
          type: object
        coordinates:
          type: array
          items:
            $ref: '#/components/schemas/Coordinate'
        empty:
          type: boolean
        dimension:
          type: integer
          format: int32
        simple:
          type: boolean
        coordinateSequence:
          $ref: '#/components/schemas/CoordinateSequence'
        coordinate:
          $ref: '#/components/schemas/Coordinate'
        x:
          type: number
          format: double
        y:
          type: number
          format: double
        geometryType:
          type: string
        numPoints:
          type: integer
          format: int32
        boundary:
          $ref: '#/components/schemas/Geometry'
        boundaryDimension:
          type: integer
          format: int32
        length:
          type: number
          format: double
        valid:
          type: boolean
        numGeometries:
          type: integer
          format: int32
        envelopeInternal:
          $ref: '#/components/schemas/Envelope'
        precisionModel:
          $ref: '#/components/schemas/PrecisionModel'
        srid:
          type: integer
          format: int32
        rectangle:
          type: boolean
        area:
          type: number
          format: double
        centroid:
          $ref: '#/components/schemas/Point'
        interiorPoint:
          $ref: '#/components/schemas/Point'
    GeometryFactory:
      type: object
      properties:
        precisionModel:
          $ref: '#/components/schemas/PrecisionModel'
        coordinateSequenceFactory:
          $ref: '#/components/schemas/CoordinateSequenceFactory'
        srid:
          type: integer
          format: int32
    Coordinate:
      type: object
      properties:
        x:
          type: number
          format: double
        y:
          type: number
          format: double
        z:
          type: number
          format: double
        valid:
          type: boolean
        m:
          type: number
          format: double
        coordinate:
          $ref: '#/components/schemas/Coordinate'