> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usecroma.com/llms.txt
> Use this file to discover all available pages before exploring further.

# TransMilenio

> Bogotá's public transport network (TransMilenio, its feeders, the SITP zonal buses and TransMiCable): every stop and route, scheduled departures at any stop, and live vehicle positions, arrivals and service alerts.

TransMilenio S.A. runs Bogotá's integrated public transport network: the
TransMilenio busways, their feeder routes, the SITP zonal street buses and
TransMiCable. It publishes the whole schedule every morning and the position of
every vehicle every few seconds. About 8,300 stops and stations, 1,080 routes
and 9.4 million scheduled stops a week.

Find a stop by name or near a point, see which routes serve it and when the next
ones leave, follow a route stop by stop on the map, and see where the buses are
right now. The schedule endpoints answer from data refreshed daily; the live
endpoints read the network as it runs, about every 20 seconds.

## Search stops

`POST /co/transmilenio/stops-search/v1` [Dataset](https://docs.usecroma.com/datasets.md)

Finds stops and stations by name, by route, or around a point. Start here to
get the `stop_id` the other endpoints take.

| Field | Type | Notes |
| - | - | - |
| `query` | string | Optional. Words in the name, or the code, e.g. `Portal Norte`, `Calle 72`. |
| `route` | string | Optional. A `route_id`, or the code printed on the bus (`B10`, `C25`, `T25`); a code covers every direction of the route. |
| `kind` | enum | Optional. `station` or `stop` (a platform or a street stop). Both by default. |
| `latitude` | number,null | Optional. Latitude of a point, e.g. `4.6486`. With `longitude`, only what is within `radius_m`, nearest first. Default `null`. |
| `longitude` | number,null | Optional. Longitude of the point, e.g. `-74.0633`. Default `null`. |
| `radius_m` | integer | Optional. Metres around the point, 50-5000. Default `500`. |
| `page` | integer | Optional. 1-based page. Default `1`. |
| `per_page` | integer | Optional. Results per page, 1-100. Default `20`. |

```bash theme={"dark"}
curl https://api.croma.run/co/transmilenio/stops-search/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "query": "Portal Norte" }'
```

Returns `as_of`, `total`, `total_is_exact`, `page`, `per_page`, `total_pages`, `count` and `stops[]`; each stop carries `distance_m` when you searched around a point.

Each stop is `{ stop_id, code, name, kind, parent_station, latitude, longitude, wheelchair_boarding, zone_id, route_ids[], route_codes[], routes[], systems[], platforms[] }`.

* `kind`: `station` (a TransMilenio or TransMiCable station, which holds platforms) or `stop` (a platform inside a station, or a street stop of the SITP).
* `routes[]`: every route that stops there, `{ route_id, short_name, long_name, system }`. A station gathers the routes of all its platforms.
* `platforms[]`: for a station, the `stop_id` of each platform.
* `systems[]`: `troncal`, `alimentador`, `dual`, `zonal_urbano`, `zonal_complementario`, `zonal_especial`, `transmicable`.

## One stop

`POST /co/transmilenio/stop/v1` [Dataset](https://docs.usecroma.com/datasets.md)

Returns one stop or station by its id.

| Field | Type | Notes |
| - | - | - |
| `stop_id` | string | **Required.** The `stop_id` from the stop search, e.g. `10000`. A station covers every platform inside it. |

```bash theme={"dark"}
curl https://api.croma.run/co/transmilenio/stop/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "stop_id": "10000" }'
```

Returns `as_of`, `found`, `stop` and, for a platform, `station`. An unknown id answers `found: false`.

## Departures from a stop

`POST /co/transmilenio/stop-departures/v1` [Dataset](https://docs.usecroma.com/datasets.md)

The timetable at a stop: the next departures from now, or from any time on any
day.

| Field | Type | Notes |
| - | - | - |
| `stop_id` | string | **Required.** The `stop_id` from the stop search, e.g. `10000`. A station covers every platform inside it. |
| `date` | string | Optional. `yyyy-mm-dd` in Bogotá. Today by default. |
| `from_time` | string | Optional. `HH:MM`, 24-hour. Now by default (the start of the day for another date). |
| `route` | string | Optional. A `route_id`, or the code printed on the bus (`B10`, `C25`, `T25`); a code covers every direction of the route. |
| `limit` | integer | Optional. How many to return, 1-200. Default `20`. |

```bash theme={"dark"}
curl https://api.croma.run/co/transmilenio/stop-departures/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "stop_id": "10000" }'
```

Returns `as_of`, `found`, `stop_name`, `date`, `from_time`, `services` (the timetables in force that day), `count` and `departures[]`: `{ time, at, minutes_from_now, route_id, route_code, route_name, system, stop_id }`. `at` is ISO 8601 in Bogotá (`-05:00`); `stop_id` is the platform the bus leaves from. Routes that end at the stop are left out: they arrive, they do not leave.

## Search routes

`POST /co/transmilenio/routes-search/v1` [Dataset](https://docs.usecroma.com/datasets.md)

Finds routes by code, destination, system or a stop they serve.

| Field | Type | Notes |
| - | - | - |
| `query` | string | Optional. The route's code or words in its destination, e.g. `B10`, `Portal Suba`. |
| `system` | enum | Optional. `troncal`, `alimentador`, `dual`, `zonal_urbano`, `zonal_complementario`, `zonal_especial` or `transmicable`. |
| `stop_id` | string | Optional. Only routes that stop at this `stop_id` (for a station, at any of its platforms). |
| `page` | integer | Optional. 1-based page. Default `1`. |
| `per_page` | integer | Optional. Results per page, 1-100. Default `20`. |

```bash theme={"dark"}
curl https://api.croma.run/co/transmilenio/routes-search/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "query": "B10" }'
```

Returns `as_of`, `total`, `total_is_exact`, `page`, `per_page`, `total_pages`, `count` and `routes[]`.

Each route is `{ route_id, short_name, long_name, system, system_name, mode, color, text_color, stops_count, trips_per_week, first_departure, last_departure, services[], headways[] }`.

* `route_id`: each direction of a route has its own; `long_name` is usually where it goes.
* `services[]`: each timetable the route runs, `{ service_id, days[], trips, first_departure, last_departure }`. Times are `HH:MM:SS` of the service day; past `24:00:00` is after midnight.
* `headways[]`: windows where the route runs by frequency instead of a fixed timetable (TransMiCable).

## One route

`POST /co/transmilenio/route/v1` [Dataset](https://docs.usecroma.com/datasets.md)

Returns one route with its stops in order and, on request, its path.

| Field | Type | Notes |
| - | - | - |
| `route_id` | string | **Required.** The `route_id` from the route search, e.g. `10075`. |
| `include_geometry` | boolean | Optional. `true` adds each pattern's path as a GeoJSON `LineString`. Default `false`. |

```bash theme={"dark"}
curl https://api.croma.run/co/transmilenio/route/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "route_id": "10075" }'
```

Returns `as_of`, `found` and `route`: the route's fields plus `patterns[]`, each distinct sequence of stops it runs, the most frequent first: `{ shape_id, trips_per_week, length_m, geometry, stops[] }`. Each stop is `{ sequence, stop_id, name, code, latitude, longitude, offset_seconds }`, where `offset_seconds` is the scheduled time from the first stop.

## Live vehicles

`POST /co/transmilenio/vehicles/v1` [Live](https://docs.usecroma.com/live-lookups.md)

Where the vehicles are now, on one route or around a point.

| Field | Type | Notes |
| - | - | - |
| `route` | string | Optional. A `route_id`, or the code printed on the bus (`B10`, `C25`, `T25`); a code covers every direction of the route. |
| `latitude` | number,null | Optional. Latitude of a point, e.g. `4.6486`. With `longitude`, only what is within `radius_m`, nearest first. Default `null`. |
| `longitude` | number,null | Optional. Longitude of the point, e.g. `-74.0633`. Default `null`. |
| `radius_m` | integer | Optional. Metres around the point, 50-5000. Default `500`. |
| `page` | integer | Optional. 1-based page. Default `1`. |
| `per_page` | integer | Optional. Vehicles per page, 1-500. Default `100`. |

```bash theme={"dark"}
curl https://api.croma.run/co/transmilenio/vehicles/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "route": "B10" }'
```

Returns `as_of` (when the vehicles last reported), `total`, `page`, `per_page`, `total_pages`, `count` and `vehicles[]`: `{ vehicle_id, label, license_plate, latitude, longitude, bearing, speed_kmh, route_id, route_code, route_name, system, trip_id, trip_start_time, stop_id, stop_name, stop_status, reported_at, distance_m }`. `stop_status` is `incoming_at`, `stopped_at` or `in_transit_to` the stop named.

## Live arrivals at a stop

`POST /co/transmilenio/stop-arrivals/v1` [Live](https://docs.usecroma.com/live-lookups.md)

The vehicles heading to a stop now, soonest first.

| Field | Type | Notes |
| - | - | - |
| `stop_id` | string | **Required.** The `stop_id` from the stop search, e.g. `10000`. A station covers every platform inside it. |
| `route` | string | Optional. A `route_id`, or the code printed on the bus (`B10`, `C25`, `T25`); a code covers every direction of the route. |
| `limit` | integer | Optional. How many to return, 1-200. Default `20`. |

```bash theme={"dark"}
curl https://api.croma.run/co/transmilenio/stop-arrivals/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "stop_id": "10000" }'
```

Returns `as_of`, `found`, `stop_name`, `count` and `arrivals[]`: `{ predicted_at, minutes_away, delay_seconds, stop_id, route_id, route_code, route_name, system, trip_id, vehicle_id, vehicle_label, license_plate }`. `delay_seconds` is positive when the vehicle runs behind its timetable. Each vehicle is predicted at its next stop, so the list holds the vehicles whose next stop is this one.

## Service alerts

`POST /co/transmilenio/alerts/v1` [Live](https://docs.usecroma.com/live-lookups.md)

The alerts in force now, for the whole network, a route or a stop.

| Field | Type | Notes |
| - | - | - |
| `route` | string | Optional. A `route_id`, or the code printed on the bus (`B10`, `C25`, `T25`); a code covers every direction of the route. |
| `stop_id` | string | Optional. Only alerts that affect this `stop_id` (for a station, any of its platforms). |

```bash theme={"dark"}
curl https://api.croma.run/co/transmilenio/alerts/v1 \
  -H "Authorization: Bearer $CROMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

Returns `as_of`, `count` and `alerts[]`: `{ alert_id, cause, effect, header, description, url, active_periods[], routes[], stops[] }`. `effect` is `detour`, `no_service`, `reduced_service`, `significant_delays`, `stop_moved`, ...; the texts stay in Spanish as the network writes them.

> [card] [Full reference](https://docs.usecroma.com/api-reference/overview.md)
>
> Schemas, all response fields, and an interactive playground.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.