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
| Interface | Method | URL |
|---|---|---|
| GraphQL | POST | https://api.entur.io/transit-data/v1beta/graphql |
| MCP | POST | https://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):
Code
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.
Code
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.
Code
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".
Code
Related topics
- Read how to identify your client in Client identification.
- Look up stop place identifiers in the Stop places documentation.
- Read more about the protocol at modelcontextprotocol.io.