# Citymapper — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Get real-time transit information including live stop arrivals, service status, and line details across major cities worldwide. Search for nearby transit options and stay informed with service alerts to plan your commute efficiently.

**Category:** Maps & Geospatial | **Website:** [citymapper.com/](https://citymapper.com/) | **Docs:** [parse.bot/marketplace/dbdf3c3c-3b5a-4801-8409-35962bd14f6d/citymapper-com-api](https://parse.bot/marketplace/dbdf3c3c-3b5a-4801-8409-35962bd14f6d/citymapper-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-citymapper-com-api-dbdf3c3c/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_city_service_status

Get current service status for all transit lines in a given region. Returns lines grouped by transit mode (Tube, Overground, National Rail, etc.), each with a status level (0=Good Service, 1+=disruption), summary, description, and weekend status. The last_updated_time indicates data freshness.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `region_id` | string | Yes | The region ID of the city. Obtain from get_supported_cities endpoint. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-citymapper-com-api-dbdf3c3c/get_city_service_status \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"region_id":"<string>"}'
```

### get_line_details

Get detailed information for a specific transit line including its stops (with coordinates and connecting routes), route patterns (with geographic paths and ordered stop sequences), and current status. Useful for mapping a line's coverage and finding stop IDs for arrival queries.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `region_id` | string | Yes | The region ID of the city. |
| `route_id` | string | Yes | The route alias ID (e.g. 'bakerloo', 'central', 'dlr'). Obtain from get_city_service_status routes[*].aliases[0] or search_lines matches[*].route_id. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-citymapper-com-api-dbdf3c3c/get_line_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"region_id":"<string>","route_id":"<string>"}'
```

### get_line_service_alerts

Get active service alerts and disruption notifications for a specific transit line. Returns alerts with level, summary, description, and optionally affected stops. Returns an empty alerts array when no disruptions are active.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `region_id` | string | Yes | The region ID of the city. |
| `route_id` | string | Yes | The route alias ID of the transit line (e.g. 'central', 'bakerloo'). Obtain from search_lines matches[*].route_id. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-citymapper-com-api-dbdf3c3c/get_line_service_alerts \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"region_id":"<string>","route_id":"<string>"}'
```

### get_nearby_transit

Get nearby transit stops and stations based on latitude and longitude coordinates. Returns stops within walking distance with route information, walk time in seconds, and stop IDs usable for arrival queries. Results cover multiple transit modes.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `lat` | number | Yes | Latitude of the location (e.g. 51.5072). |
| `lon` | number | Yes | Longitude of the location (e.g. -0.1276). |
| `region_id` | string | Yes | The region ID of the city. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-citymapper-com-api-dbdf3c3c/get_nearby_transit \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"lat":"<number>","lon":"<number>","region_id":"<string>"}'
```

### get_stop_arrivals

Get real-time arrival/departure ETAs for a specific stop or station. Returns departures grouped by line and direction, with time_seconds indicating seconds until arrival. Covers all lines serving the stop. last_updated_time indicates data freshness.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `region_id` | string | Yes | The region ID of the city. |
| `stop_id` | string | Yes | The CamelCase station ID (e.g. 'Bank', 'OxfordCircus', 'KingsCross'). Obtain from get_line_details stops keys or get_nearby_transit elements[*].id. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-citymapper-com-api-dbdf3c3c/get_stop_arrivals \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"region_id":"<string>","stop_id":"<string>"}'
```

### get_supported_cities

Get the list of major cities supported by Citymapper. Each city includes a region_id used as a required parameter for all other endpoints, a slug, name, and country. The list is curated to major metro areas with active transit coverage.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-citymapper-com-api-dbdf3c3c/get_supported_cities \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### search_lines

Search for transit lines by name or alias within a city. Performs a case-insensitive substring match against line names, live_line_codes, and aliases. Returns matching lines with their current status, brand, and mode grouping.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | The search query (e.g. 'Central', 'Bakerloo', 'DLR'). |
| `region_id` | string | Yes | The region ID of the city. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-citymapper-com-api-dbdf3c3c/search_lines \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>","region_id":"<string>"}'
```
