Community Transit

Transportation API · Transitland · Global transit data · GTFS · Real-time

TL;DR

Community Transit provides access to Transitland, an open-source datastore of global public transit information. Query routes, stops, schedules, and real-time vehicle positions aggregated from hundreds of transit agencies. Data is sourced from GTFS feeds (static schedules) and GTFS-RT (real-time updates). Supports spatial queries, route search, and stop lookups. No API key required.

Quick start: https://transit.land/api/v1/stops?lat=47.6&lon=-122.3

No API key needed — free global transit data!

How to Use This API

1. Find Nearby Stops

Search for transit stops near a location (Seattle):

https://transit.land/api/v1/stops?lat=47.6&lon=-122.3&radius=500

2. Get Routes for a Stop

https://transit.land/api/v1/stops/stop-id/routes

3. Search Routes by Name

https://transit.land/api/v1/routes?name=Express

4. JavaScript — Find Nearby Transit

navigator.geolocation.getCurrentPosition(pos => {
  const {latitude, longitude} = pos.coords;
  fetch(`https://transit.land/api/v1/stops?lat=${latitude}&lon=${longitude}&radius=500`)
    .then(r => r.json())
    .then(data => {
      data.stops.forEach(stop => {
        console.log(`${stop.name} (${stop.onestop_id})`);
        console.log(`  Routes: ${stop.routes_serving_stop?.length || 0}`);
      });
    });
});

5. Python — Get Route Schedule

import requests

# Get all routes for an agency
agency_id = 'o-73-translink'
routes = requests.get(
    f'https://transit.land/api/v1/routes?operated_by={agency_id}'
).json()

for route in routes['routes'][:5]:
    print(f"{route['name']} — {route['vehicle_type']}")
    print(f"  Color: #{route['color']}")
    print(f"  Stops: {route['stop_count']}")
Stops near Seattle: https://transit.land/api/v1/stops?lat=47.6&lon=-122.3&radius=500

Frequently Asked Questions

What is Transitland and how does it work?
Transitland aggregates GTFS (General Transit Feed Specification) data from hundreds of transit agencies worldwide into a unified API. It handles both static schedule data and real-time vehicle positions.
What query parameters are available for stops?
Search by lat/lon (with radius in meters), name, onestop_id, or within a bounding box using bbox (min_lat,min_lon,max_lat,max_lon).
Does the API include real-time vehicle positions?
Yes — Transitland processes GTFS-RT feeds for agencies that provide them. Use the /api/v1/vehicles endpoint for real-time vehicle tracking, available where supported.
How do I find my local transit agency ID?
Use the /api/v1/operators endpoint to search for transit operators by name or region. Each operator has a unique Onestop ID used across Transitland.
Is there a rate limit?
Transitland is free for reasonable non-commercial use. For production or high-volume applications, check Transitland's terms or consider self-hosting the open-source datastore.
What geographic areas are covered?
Coverage depends on which agencies publish GTFS data. North America and Europe have extensive coverage, with growing coverage in Asia, Australia, and South America.

API Details

API URL
https://transit.land/api/v1/
Documentation
Transitland Datastore API
Category
Transportation
Authentication
Not Required
Data Standard
GTFS, GTFS-RT

What You Can Build