Documentation

REST API - OpenAPI schema

OpenAPI schema

The Transitland v2 REST API publishes a machine-readable OpenAPI 3.0 description of its endpoints, parameters, and response shapes:

https://transit.land/api/v2/rest/openapi.json
The schema document itself is served without an API key, so you can fetch it and point tooling at it before signing up. The endpoints it describes still require a key. See Configuring access .

The document is generated by the running API server, so it describes what is currently deployed rather than a separately maintained copy. Its servers entry is the live base URL, https://transit.land/api/v2/rest, so paths from the schema resolve correctly without extra configuration.

The reference pages in this section, such as Feeds, Stops, and Routes, render their parameter tables and response trees from a snapshot of this schema.

Browsing the schema

Fetch it directly:

curl https://transit.land/api/v2/rest/openapi.json

Or read the endpoints in a browser with any OpenAPI viewer. For example, this schema rendered in ReDoc.

Using the schema

The schema is a starting point for tooling rather than something you necessarily need to read by hand:

  • Import it into an API client such as Postman, Insomnia, or Bruno to get a ready-made collection of requests.
  • Give it to an editor or coding agent so completions and generated code match the API's actual parameters.
The schema does not declare a security scheme, so generated clients and imported collections will not prompt you for credentials. Add your API key yourself as an apikey query parameter or apikey header on each request.

Other Transitland APIs

The GraphQL API is not described by an OpenAPI document. It is introspectable instead, so a GraphQL client can read its schema directly from the endpoint.