Transitland v2 REST API
Available on the following API tiers:
The Transitland REST API provides a simple, easy to use interface for basic queries about feeds, feed versions, stops, routes, trips, schedules, and other basic transit information. These APIs also provide direct access to GTFS files and can even dynamically generate static map images.
The Transitland REST API uses endpoints under the following base URL:
You will need to send your API key as part of the request to this endpoint. It can be specified through either the
apikey query parameter or
apikey header value.
Don't have a Transitland v2 API key? Follow these instructions.
Transitland REST API requests provide the latest information available, and complement bulk data products such as Transitland Vector Tiles. Free Tier plans have a relatively low rate limit to help be mindful of resources, with higher rates and quotas available on the Pro Tier plans.
Users with more complex query needs or performance requirements may want to investigate the GraphQL API. Migrating existing tooling from the REST to GraphQL API is very straightforward. In fact, all REST requests are internally handled by the GraphQL API.
Feeds, operators, routes, and stops may generally be accessed using either their stable, public Onestop ID values, as well as by internal ID values. Internal IDs are ephemeral and should only be used for short-lived purposes such as pagination and follow-up requests.
All REST API endpoints default to JSON format responses. Endpoints that return entities that include geographical information may also accept
geojson format for a GeoJSON formatted response, and
png format which generates a simple static map image in PNG format.
Metadata for accessing the next page can be found in the
meta property in the response. It includes a generated link, as well as the
after value as an integer if you prefer to construct the link yourself.