citymapper.com APIcitymapper.com ↗
Access real-time transit arrivals, service status, line details, and nearby stops for major cities worldwide via the Citymapper API.
No input parameters required.
curl -X GET 'https://api.parse.bot/scraper/75a88626-7f26-4a10-ac53-922ad6ca5740/get_supported_cities' \ -H 'X-API-Key: $PARSE_API_KEY'
Get a list of major cities supported by Citymapper, including their region IDs, slugs, and country names.
No input parameters required.
{
"type": "object",
"fields": {
"cities": "array of city objects with name, slug, region_id, and country"
},
"sample": {
"data": {
"cities": [
{
"name": "London",
"slug": "london",
"country": "UK",
"region_id": "uk-london"
},
{
"name": "New York",
"slug": "nyc",
"country": "US",
"region_id": "us-nyc"
}
]
},
"status": "success"
}
}About the citymapper.com API
This API provides real-time transit data from Citymapper across 7 endpoints covering supported cities worldwide. Use get_stop_arrivals to fetch live departure ETAs grouped by line and direction, get_city_service_status to retrieve disruption details across all transit modes in a region, and get_nearby_transit to find stops within walking distance of any coordinate pair.
City and Line Discovery
Start with get_supported_cities to retrieve the full list of covered cities, each returning a name, slug, region_id, and country. The region_id (e.g. uk-london, us-nyc) is the key input parameter for every other endpoint. From there, search_lines accepts a free-text query and a region_id to return matching route objects including name, route_id, brand, mode, and current status — useful for resolving a line name to its canonical ID before querying deeper endpoints.
Service Status and Alerts
get_city_service_status returns a groupings array organized by transit mode, where each group contains routes with status metadata and a last_updated_time ISO 8601 timestamp. When you need per-line disruption detail, get_line_service_alerts returns an alerts array with level, summary, description, and optionally affected_stops for a specific route_id. When no disruptions are active, the alerts array is empty.
Stop-Level and Route-Level Data
get_line_details takes a route_id and region_id and returns a stops object mapping stop IDs to coordinates and route connections, plus a routes array containing patterns and stop sequences. Stop IDs follow a CamelCase format (e.g. OxfordCircus, KingsCross) and feed directly into get_stop_arrivals, which returns a stations array with departures grouped by line and direction alongside a last_updated_time timestamp.
Proximity Queries
get_nearby_transit accepts lat, lon, and region_id coordinates and returns an elements array of nearby stops, each with name, coordinates, route information, and a walk_time_seconds value — suitable for location-aware transit tooling without requiring a known stop ID in advance.
- Display real-time departure boards for a specific station using get_stop_arrivals grouped by line and direction.
- Build a city transit health dashboard using get_city_service_status groupings to surface active disruptions across all modes.
- Power a map layer of nearby transit stops with walk times using get_nearby_transit elements coordinates and walk_time_seconds.
- Send push alerts for a user's commute line by polling get_line_service_alerts for a specific route_id.
- Resolve user-entered line names to route IDs programmatically using search_lines before querying line-level endpoints.
- Render a full route map with stop coordinates and interchange connections using get_line_details stops and routes.
- List all supported cities and their region IDs to populate a city picker UI using get_supported_cities.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 250 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Citymapper have an official developer API?+
What does get_stop_arrivals return, and how are departures organized?+
stations array where each station object contains departures grouped by transit line and direction, along with a last_updated_time ISO 8601 timestamp. Stop IDs must be in CamelCase format (e.g. KingsCross, OxfordCircus) and can be obtained from the stops keys returned by get_line_details.