Transport for Finland API

Beginner's Pick Transportation / No Auth Required Beginner HTTPS
Free to Use Varies (check documentation)

Overview

Digitransit is Finland's national open public transport platform, offering a GraphQL API for routing, stop information, and real-time data across Finnish cities. No API key is required, and the GraphQL interface lets you request exactly the data you need. It is a great modern API for learning GraphQL while working with real transit data.

Beginner Tip

This API uses GraphQL instead of REST — you send POST requests with a query body to the endpoint. Use the GraphQL playground at api.digitransit.fi/graphiql to explore and test queries interactively before writing code.

Available Data

match scores and results
team standings
player statistics
schedule and fixtures
Use case: Integrate finnish transport api data into web and mobile applications

Example Response

JSON Response
{
  "route": "Line 1",
  "origin": "Station A",
  "destination": "Station B",
  "departure": "08:30",
  "arrival": "09:15",
  "status": "On Time",
  "delays_min": 0
}

Field Reference

data.stops List of transit stops matching your query
gtfsId GTFS-format unique identifier for the stop
name Human-readable name of the stop
lat Latitude coordinate of the stop
lon Longitude coordinate of the stop

Implementation Example

Request
const url = "https://digitransit.fi/en/developers/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

GraphQL errors array in response Invalid or malformed GraphQL query syntax
Use the GraphiQL playground at api.digitransit.fi to validate your query before sending it programmatically
Empty stops array The stop name searched does not match any stops in the dataset
Try a broader search term or a major city name like "Helsinki" or "Tampere" to confirm the API is working
CORS error in browser Calling the API directly from a browser without the correct headers
Include the digitransit-subscription-key header even for free tier usage, or proxy the request through your server

Metadata Score Breakdown

Estimated from metadata — endpoint not independently tested

This score is estimated from observable metadata — HTTPS support, authentication model, declared CORS, and documentation reachability — because the API requires authentication or exposes no publicly testable endpoint. The five-signal breakdown is only shown for live-tested APIs.

Metadata estimate · endpoint not independently tested

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS UNKNOWN
Category Transportation
Difficulty Beginner
Verified: 2026-04-04

Related Tags

Similar APIs

View All →