Entur Developer
Open services

Transit Data

The Transit Data API gives you read access to Norwegian public transport data. The data comes from NeTEx (the European exchange format for timetable data). You can look up lines, stop places, quays, service journeys, operators, and authorities.

You can reach the same data in two ways. Use the GraphQL API in your own applications. Use the MCP server to give an AI assistant access to the data.

Transit Data is in beta. The version in the URL is v1beta, and the schema can change before a stable release.

See the API reference.

Endpoints

InterfaceMethodURL
GraphQLPOSThttps://api.entur.io/transit-data/v1beta/graphql
MCPPOSThttps://api.entur.io/transit-data/v1beta/mcp

Authentication

Transit Data is an open service. Include the ET-Client-Name header in all requests. Use a value that identifies your company and application, in the form <company>-<application> (lowercase, no spaces).

For more information, see Client identification.

GraphQL API

Send queries with HTTP POST to the GraphQL endpoint in the table above. Set these headers on each request:

  • Content-Type: application/json
  • ET-Client-Name: <company>-<application>

New to GraphQL? Read the introduction at graphql.org.

Example

This query fetches the first three authorities (the organisations that are responsible for sets of lines):

GraphQLCode
{ authorities(first: 3) { nodes { id name } } }

Identifiers

All identifiers are full NeTEx identifiers. They include the codespace and the type, for example NSR:StopPlace:337 or ATB:Authority:2. If no object has the identifier, a query for one object returns null.

Pagination

List fields return a connection (a page of results with a cursor). Use first to set the page size. The default is 20 and the largest value is 1000. To get the next page, pass the endCursor from pageInfo as the after argument.

GraphQLCode
{ authorities(first: 20, after: "<endCursor>") { nodes { id name } pageInfo { endCursor hasNextPage } } }

MCP server

MCP (Model Context Protocol) is a standard that lets AI assistants call tools. The Transit Data MCP server gives an assistant read-only access to Norwegian public transport data. Use the MCP endpoint in the table above, and send the ET-Client-Name header described in Authentication.

If your client asks for the transport type, choose Streamable HTTP. For the tools, their arguments, and the responses, see the MCP API reference.

Connect Claude Code

Run this command. Replace <company>-<application> with your client name.

TerminalCode
claude mcp add --transport http --header 'ET-Client-Name: <company>-<application>' transit-data 'https://api.entur.io/transit-data/v1beta/mcp'

Connect other clients

Most MCP clients accept a JSON configuration. This example works for Cursor. For VS Code, put the entry under servers and add "type": "http".

JSONCode
{ "mcpServers": { "transit-data": { "url": "https://api.entur.io/transit-data/v1beta/mcp", "headers": { "ET-Client-Name": "<company>-<application>" } } } }
Last modified on
Did you find what you were looking for?