Two halves. Transit: stations, stops and lines, by rail, Underground, Overground, bus, coach, ferry and cable car. Roads: major roads and where you get on or off them.
Questions this page answers
- Which stations are within walking distance?
- Which lines connect these two stations?
- Where's the nearest motorway entry?
Stations and lines come from TravelTime's public transport data (traveltime_pt); major roads and their entries and exits from Overture Maps (overture). /v1/catalog/{country} lists the country's transit modes and operators and carries each dataset's updated_at, the date it was last loaded.
Required authentication header. The same application id as the TravelTime API.
Required authentication header.
GET /v1/transport/transit/stationsStations and stops in the location you give, without the stops grouped under a station: best match first with q, otherwise nearest first with near, in the order sent with cells, otherwise by id. POST /v1/transport/transit/stations takes the same fields as JSON, for long cell lists (Long requests).
Every stop and station within 800 m of King's Cross station, nearest first: 41 of them, each with how far away it is.
Request
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/transport/transit/stations?near=51.5309,-0.1229&radius_m=800"41 pins inside the 800 m circle; a pin opens its row.Drawn from the response on this page; the playground runs it live.
| Namename | Distancedistance_m | Modesmodes | Hexagoncell | Map |
|---|---|---|---|---|
| London Kings Cross | 3 m | rail | 89195da4d8fffff | |
| King's Cross St. Pancras | 32 m | underground | 89195da4dbbffff | |
| King's Cross Stn / York Way | 45 m | bus | 89195da4d8fffff | |
| King's Cross St. Pancras Underground Station | 57 m | bus | 89195da4d8fffff | |
| King's Cross St. Pancras Underground Station | 97 m | bus | 89195da4dbbffff |
5 of 41 shown · the other 36 are in the response, all 41 in the playground
Response
{
"results": [
{
"id": "st_gb_218003af11f9",
"name": "London Kings Cross",
"modes": [
"rail"
],
"lat": 51.53088,
"lng": -0.12293,
"cell": "89195da4d8fffff",
"line_count": 48,
"trips_per_hour": {
"am_peak": 11.2,
"interpeak": 10.32,
"pm_peak": 10.63,
"evening": 5,
"weekend": 7.87
},
"distance_m": 3
},
"… 40 more rows"
],
"next_cursor": null
}Every station inside a map viewport: 81.
Request
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/transport/transit/stations?bbox=51.522,-0.140,51.538,-0.110"81 pins; a pin opens its row.Drawn from the response on this page; the playground runs it live.
| Namename | Modesmodes | Hexagoncell | Line countline_count | Map |
|---|---|---|---|---|
| Oakley Square | bus | 89195da4dc3ffff | 1 | |
| Kings Cross / Caledonian Road | bus | 89195da4d87ffff | 7 | |
| London Euston | overground, rail | 89195da4d0bffff | 33 | |
| Upper Woburn Place/Euston Road | bus | 89195da4d03ffff | 4 | |
| Carnegie Street | bus | 89195da6b2fffff | 3 |
5 of 81 shown · the other 76 are in the response, all 81 in the playground
Response
{
"results": [
{
"id": "st_gb_06247e5667b7",
"name": "Oakley Square",
"modes": [
"bus"
],
"lat": 51.536,
"lng": -0.13589,
"cell": "89195da4dc3ffff",
"line_count": 1,
"trips_per_hour": {
"am_peak": 5.2,
"interpeak": 4.62,
"pm_peak": 4.67,
"evening": 3.75,
"weekend": 1.62
}
},
"… 80 more rows"
],
"next_cursor": null
}Stations inside seven hexagons around Euston Square: 15, in the order the hexagons were sent.
Request
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/transport/transit/stations?cells=89195da4d03ffff,89195da4d07ffff,89195da4d0bffff,89195da4d0fffff,89195da4d13ffff,89195da4d17ffff,89195da4d1bffff"Shade = stations in the hexagon15A hexagon opens its count; a pin opens its row.
| Namename | Modesmodes | Hexagoncell | Line countline_count | Map |
|---|---|---|---|---|
| Upper Woburn Place/Euston Road | bus | 89195da4d03ffff | 4 | |
| Euston Bus Station | bus | 89195da4d03ffff | 2 | |
| Euston | underground | 89195da4d03ffff | 2 | |
| Euston Station | bus | 89195da4d03ffff | 5 | |
| Euston Station / Eversholt Street | bus | 89195da4d03ffff | 4 |
5 of 15 shown · the other 10 are in the response, all 15 in the playground
Response
{
"results": [
{
"id": "st_gb_0b9479ff3bdc",
"name": "Upper Woburn Place/Euston Road",
"modes": [
"bus"
],
"lat": 51.52716,
"lng": -0.13078,
"cell": "89195da4d03ffff",
"line_count": 4,
"trips_per_hour": {
"am_peak": 20,
"interpeak": 17.99,
"pm_peak": 18.67,
"evening": 16.5,
"weekend": 6.88
}
},
"… 14 more rows"
],
"next_cursor": null
}Find a station by name to get its id: 16 matches across the country, best first.
Request
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/transport/transit/stations?q=kings+cross&country=gb"16 pins; a pin opens its row.Drawn from the response on this page; the playground runs it live.
| Namename | Modesmodes | Hexagoncell | Line countline_count | Map |
|---|---|---|---|---|
| London Kings Cross | rail | 89195da4d8fffff | 48 | |
| Kings Cross / Caledonian Road | bus | 89195da4d87ffff | 7 | |
| Kings Cross Road | bus | 89195da4d87ffff | 7 | |
| Kings Cross Lane | bus | 89194ace19bffff | 2 | |
| Kings Cross Lane | bus | 89194ace567ffff | 2 |
5 of 16 shown · the other 11 are in the response, all 16 in the playground
Response
{
"results": [
{
"id": "st_gb_218003af11f9",
"name": "London Kings Cross",
"modes": [
"rail"
],
"lat": 51.53088,
"lng": -0.12293,
"cell": "89195da4d8fffff",
"line_count": 48,
"trips_per_hour": {
"am_peak": 11.2,
"interpeak": 10.32,
"pm_peak": 10.63,
"evening": 5,
"weekend": 7.87
}
},
"… 15 more rows"
],
"next_cursor": null
}Only Underground stations within 1.5 km: 9 of them.
Request
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/transport/transit/stations?near=51.5307,-0.1238&radius_m=1500&mode=underground"9 pins inside the 1,500 m circle; a pin opens its row.Drawn from the response on this page; the playground runs it live.
| Namename | Distancedistance_m | Modesmodes | Hexagoncell | Map |
|---|---|---|---|---|
| King's Cross St. Pancras | 71 m | underground | 89195da4dbbffff | |
| Euston | 686 m | underground | 89195da4d03ffff | |
| Russell Square | 810 m | underground | 89195da4d33ffff | |
| Euston Square | 978 m | underground | 89195da4d73ffff | |
| Mornington Crescent | 1.1 km | underground | 89195da4dcfffff |
5 of 9 shown · the other 4 are in the response, all 9 in the playground
Response
{
"results": [
{
"id": "st_gb_7d4f15682232",
"name": "King's Cross St. Pancras",
"modes": [
"underground"
],
"lat": 51.53062,
"lng": -0.12279,
"cell": "89195da4dbbffff",
"line_count": 6,
"trips_per_hour": {
"am_peak": 76.8,
"interpeak": 63.7,
"pm_peak": 68.68,
"evening": 58.5,
"weekend": 27.45
},
"distance_m": 71
},
"… 8 more rows"
],
"next_cursor": null
}| Parameter | Type | Default | What it does | Example |
|---|---|---|---|---|
q | text | — | Search by name, best match first. Needs a location, or country for the whole country. One page: raise limit for more. | q=kings+cross |
mode | transit mode | — | Only stations this mode serves, at their own stop or on a line calling there: bus, cable_car, coach, ferry, overground, rail or underground. | mode=underground |
Also takes Where: near, radius_m, bbox, cells, at; country with q · Paging: limit, cursor · Long requests: the POST body.
Each row: id (st_gb_…), name, modes (a list: the station's own mode and its lines' modes), lat and lng (degrees), cell (its resolution-9 hexagon), line_count (lines calling there) and trips_per_hour: departures an hour at am_peak, interpeak, pm_peak, evening and weekend, null in a period with none; distance_m (metres) with near.
Errors
| Code | HTTP | When |
|---|---|---|
location_required | 400 | No near, bbox, cells or at; q with neither a location nor country. |
country_not_allowed | 400 | country without q. |
invalid_mode | 400 | Not a transit mode; allowed lists them. |
… and every Where and Paging code.
GET /v1/transport/transit/stations/{id}One station with every line that calls there and the stations next to it.
London Kings Cross: the 48 lines that call there, and the five stations nearest it.
Request
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/transport/transit/stations/st_gb_218003af11f9"1 pin; it opens its row.Drawn from the response on this page; the playground runs it live.
| Idid | st_gb_218003af11f9 |
|---|---|
| Namename | London Kings Cross |
| Modesmodes | rail |
| Latlat | 51.53088 |
| Lnglng | -0.12293 |
| Hexagoncell | 89195da4d8fffff |
| Line countline_count | 48 |
| Trips per hour am peaktrips_per_hour.am_peak | 11.2 |
| Trips per hour interpeaktrips_per_hour.interpeak | 10.32 |
| Trips per hour pm peaktrips_per_hour.pm_peak | 10.63 |
| Trips per hour eveningtrips_per_hour.evening | 5 |
| Trips per hour weekendtrips_per_hour.weekend | 7.87 |
Response
{
"id": "st_gb_218003af11f9",
"name": "London Kings Cross",
"modes": [
"rail"
],
"lat": 51.53088,
"lng": -0.12293,
"cell": "89195da4d8fffff",
"line_count": 48,
"trips_per_hour": {
"am_peak": 11.2,
"interpeak": 10.32,
"pm_peak": 10.63,
"evening": 5,
"weekend": 7.87
},
"lines": [
{
"id": "ln_gb_8ee71c4ca30d",
"name": "Aberdeen ↔ London Kings Cross",
"operator": {
"id": "london_north_eastern_railway",
"name": "London North Eastern Railway"
},
"mode": "rail"
},
"… 47 more rows"
],
"nearby": [
{
"id": "st_gb_7d4f15682232",
"name": "King's Cross St. Pancras"
},
"… 4 more rows"
]
}Each row: the list row plus lines, every line calling there as {id, name, operator, mode}, rail first, then underground, overground, ferry, coach, bus and cable car; and nearby, up to 5 stations within 500 m as {id, name}.
Errors
| Code | HTTP | When |
|---|---|---|
invalid_id | 400 | Not a station id (st_gb_…). |
not_found | 404 | No station with this id. |
GET /v1/transport/transit/stations/cellsHow many stations are in each hexagon, with a count per mode, or one total over what you send with group_by=all. Only stations count, not the stops grouped under them: the stations the list returns. POST /v1/transport/transit/stations/cells takes the same fields as JSON, for long cell lists.
How many stations are in each of the 39 hexagons in the box, 0 where there are none.
Request
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/transport/transit/stations/cells?bbox=51.522,-0.140,51.538,-0.110"Shade = count0639 hexagons; a hexagon opens its row.
| Hexagoncell | Countcount | Mode counts busmode_counts.bus | Mode counts undergroundmode_counts.underground | Map |
|---|---|---|---|---|
| 89194ad3643ffff | 4 | 4 | — | |
| 89194ad364bffff | 1 | 1 | — | |
| 89194ad364fffff | 0 | — | — | |
| 89194ad365bffff | 0 | — | — | |
| 89194ad366bffff | 4 | 4 | — |
5 of 39 shown · the other 34 are in the response, all 39 in the playground
Response
{
"resolution": 9,
"results": [
{
"cell": "89194ad3643ffff",
"count": 4,
"mode_counts": {
"bus": 4
}
},
"… 38 more rows"
],
"next_cursor": null
}Stations per hexagon for hexagons you choose, in the order sent. Add group_by=all for one row: 15 stations over the seven, 12 bus, 2 rail and 1 Underground, the 15 rows the list returns.
Request
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/transport/transit/stations/cells?cells=89195da4d03ffff,89195da4d07ffff,89195da4d0bffff,89195da4d0fffff,89195da4d13ffff,89195da4d17ffff,89195da4d1bffff"Shade = count157 hexagons; a hexagon opens its row.
| Hexagoncell | Countcount | Mode counts busmode_counts.bus | Mode counts undergroundmode_counts.underground | Map |
|---|---|---|---|---|
| 89195da4d03ffff | 5 | 4 | 1 | |
| 89195da4d07ffff | 2 | 2 | — | |
| 89195da4d0bffff | 1 | — | — | |
| 89195da4d0fffff | 2 | 2 | — | |
| 89195da4d13ffff | 2 | 1 | — |
5 of 7 shown · the other 2 are in the response, all 7 in the playground
Response
{
"resolution": 9,
"results": [
{
"cell": "89195da4d03ffff",
"count": 5,
"mode_counts": {
"bus": 4,
"underground": 1
}
},
"… 6 more rows"
],
"next_cursor": null
}Also takes Where: near, radius_m, bbox, cells, at · Per-hexagon routes: group_by (cell or all), resolution (6 to 10) · Paging: limit, cursor · Output: format · Long requests: the POST body.
Each row: cell, count (stations) and mode_counts (stations per mode, most first); with group_by=all, one row of cell_count, count and mode_counts.
Rollup: sum.
Errors
| Code | HTTP | When |
|---|---|---|
invalid_resolution | 400 | Transit has resolutions 6 to 10; allowed lists them. |
invalid_group_by | 400 | Not cell or all: transit has no totals per boundary. |
invalid_format | 400 | geojson with group_by=all. |
… and every Where and Paging code.
GET /v1/transport/transit/linesThe lines with a stop inside the location you give, the lines that stop at every station in serves, or one operator's lines: best match first with q, otherwise by id. POST /v1/transport/transit/lines takes the same fields as JSON, for long cell lists.
Every line that stops somewhere inside the box: 215, so 100 on this page.
Request
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/transport/transit/lines?bbox=51.522,-0.140,51.538,-0.110"| Namename | Operator nameoperator.name | Modemode | Stop countstop_count |
|---|---|---|---|
| NL-9 | Replacement Service | bus | 19 |
| London Kings Cross ↔ Royston | Great Northern | rail | 21 |
| 68 | Transport UK | bus | 84 |
| Crewe ↔ London Euston | West Midlands Trains | rail | 24 |
| Hitchin ↔ London Kings Cross | Great Northern | rail | 10 |
5 of the first 100 shown · next_cursor fetches the next page
Response
{
"results": [
{
"id": "ln_gb_01396c2c7f2c",
"name": "NL-9",
"operator": {
"id": "replacement_service",
"name": "Replacement Service"
},
"mode": "bus",
"stop_count": 19,
"trips_per_hour": {
"am_peak": null,
"interpeak": null,
"pm_peak": null,
"evening": null,
"weekend": 2.35
}
},
"… 99 more rows"
],
"next_cursor": "eyJxIjoiZDljY2RiYzVkOGU4NmY1YWE5YzU4ZGZmIiwiayI6WyI3MGExYTBhODZhNmUiXSwiZiI6ImVjMDZlNjE2MGVhNzA3YmQ5Njg5ZTBmZTUwYWNkMDA5In0.gJkVr0dCTh56uBngWFs3Kg"
}Every line that stops in hexagons you choose: 114 lines, 91 of them rail, 19 bus, 2 Overground and 2 Underground.
Request
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/transport/transit/lines?cells=89195da4d03ffff,89195da4d07ffff,89195da4d0bffff,89195da4d0fffff,89195da4d13ffff,89195da4d17ffff,89195da4d1bffff"| Namename | Operator nameoperator.name | Modemode | Stop countstop_count |
|---|---|---|---|
| NL-9 | Replacement Service | bus | 19 |
| 68 | Transport UK | bus | 84 |
| Crewe ↔ London Euston | West Midlands Trains | rail | 24 |
| Peterborough ↔ Three Bridges | Thameslink | rail | 23 |
| London Euston ↔ Tring | West Midlands Trains | rail | 9 |
5 of the first 100 shown · next_cursor fetches the next page
Response
{
"results": [
{
"id": "ln_gb_01396c2c7f2c",
"name": "NL-9",
"operator": {
"id": "replacement_service",
"name": "Replacement Service"
},
"mode": "bus",
"stop_count": 19,
"trips_per_hour": {
"am_peak": null,
"interpeak": null,
"pm_peak": null,
"evening": null,
"weekend": 2.35
}
},
"… 99 more rows"
],
"next_cursor": "eyJxIjoiOTMwNmQ0OTNmYWFmYzc1OTIwOTkzMjE4IiwiayI6WyJkZTM3NmU4YjIwNDEiXSwiZiI6ImVjMDZlNjE2MGVhNzA3YmQ5Njg5ZTBmZTUwYWNkMDA5In0.ANGhd9BMvnr79acuGomV3A"
}Which lines connect King's Cross St. Pancras and Euston? Northern and Victoria. The station ids come from Stations by mode; include=stops adds each line's stops.
Request
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/transport/transit/lines?serves=st_gb_7d4f15682232,st_gb_63a8aa9929e4&include=stops"| Namename | Operator nameoperator.name | Modemode | Stop countstop_count |
|---|---|---|---|
| Victoria | London Underground (TfL) | underground | 16 |
| Northern | London Underground (TfL) | underground | 52 |
All 2 shown
Response
{
"results": [
{
"id": "ln_gb_8d9e35643776",
"name": "Victoria",
"operator": {
"id": "london_underground_tfl",
"name": "London Underground (TfL)"
},
"mode": "underground",
"stop_count": 16,
"trips_per_hour": {
"am_peak": 34.4,
"interpeak": 27.08,
"pm_peak": 34.67,
"evening": 25.25,
"weekend": 10.27
},
"stops": [
{
"station": {
"id": "st_gb_f756801a50fa",
"name": "Brixton"
},
"sequence": 0,
"lat": 51.46289,
"lng": -0.11409
},
"… 15 more rows"
]
},
"… 1 more row"
],
"next_cursor": null
}Every line one operator runs: the 11 London Underground lines.
Request
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/transport/transit/lines?operator=london_underground_tfl"| Namename | Operator nameoperator.name | Modemode | Stop countstop_count |
|---|---|---|---|
| Jubilee | London Underground (TfL) | underground | 28 |
| Piccadilly | London Underground (TfL) | underground | 54 |
| Central | London Underground (TfL) | underground | 50 |
| Metropolitan | London Underground (TfL) | underground | 34 |
| Circle | London Underground (TfL) | underground | 58 |
5 of 11 shown · the other 6 are in the response, all 11 in the playground
Response
{
"results": [
{
"id": "ln_gb_0379924e7dcc",
"name": "Jubilee",
"operator": {
"id": "london_underground_tfl",
"name": "London Underground (TfL)"
},
"mode": "underground",
"stop_count": 28,
"trips_per_hour": {
"am_peak": 16.8,
"interpeak": 11.08,
"pm_peak": 17.33,
"evening": 14,
"weekend": 6.62
}
},
"… 10 more rows"
],
"next_cursor": null
}| Parameter | Type | Default | What it does | Example |
|---|---|---|---|---|
serves | station ids | — | Lines that stop at every station listed, comma-separated. A where of its own: no location with it. | serves=st_gb_7d4f15682232,st_gb_63a8aa9929e4 |
operator | operator id | — | Lines run by this operator, from /v1/catalog/{country}. A where of its own: no location with it. | operator=london_underground_tfl |
mode | transit mode | — | Only lines of this mode. | mode=bus |
q | text | — | Search by name or number, best match first. Needs a location or country. One page: raise limit for more. | q=victoria |
include | stops | — | Adds each line's stops, as on one line; up to 100 rows a page. | include=stops |
Also takes Where: near, radius_m, bbox, cells, at; country with q · Paging: limit, cursor · Long requests: the POST body.
Each row: id (ln_gb_…), name, operator as {id, name}, mode, stop_count (stops) and trips_per_hour (as on stations); stops with include=stops, as on one line.
Errors
| Code | HTTP | When |
|---|---|---|
location_required | 400 | No location, serves or operator; q with neither a location nor country. |
too_many_locations | 400 | Two of a location, serves and operator. |
country_not_allowed | 400 | country without q. |
invalid_serves | 400 | Not station ids, or stations from two countries. |
invalid_mode | 400 | Not a transit mode; allowed lists them. |
invalid_include | 400 | include other than stops. |
… and every Where and Paging code.
GET /v1/transport/transit/lines/{id}One line with its stops, each with its station's lat and lng.
The Victoria line: 16 stops, Brixton first.
Request
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/transport/transit/lines/ln_gb_8d9e35643776"| Idid | ln_gb_8d9e35643776 |
|---|---|
| Namename | Victoria |
| Operator idoperator.id | london_underground_tfl |
| Operator nameoperator.name | London Underground (TfL) |
| Modemode | underground |
| Stop countstop_count | 16 |
| Trips per hour am peaktrips_per_hour.am_peak | 34.4 |
| Trips per hour interpeaktrips_per_hour.interpeak | 27.08 |
| Trips per hour pm peaktrips_per_hour.pm_peak | 34.67 |
| Trips per hour eveningtrips_per_hour.evening | 25.25 |
| Trips per hour weekendtrips_per_hour.weekend | 10.27 |
Response
{
"id": "ln_gb_8d9e35643776",
"name": "Victoria",
"operator": {
"id": "london_underground_tfl",
"name": "London Underground (TfL)"
},
"mode": "underground",
"stop_count": 16,
"trips_per_hour": {
"am_peak": 34.4,
"interpeak": 27.08,
"pm_peak": 34.67,
"evening": 25.25,
"weekend": 10.27
},
"stops": [
{
"station": {
"id": "st_gb_f756801a50fa",
"name": "Brixton"
},
"sequence": 0,
"lat": 51.46289,
"lng": -0.11409
},
"… 15 more rows"
]
}Each row: the list row plus stops, each with its station as {id, name}, sequence, lat and lng: the main run in sequence order, then stops off it (a branch) by name with sequence null.
Errors
| Code | HTTP | When |
|---|---|---|
invalid_id | 400 | Not a line id (ln_gb_…). |
not_found | 404 | No line with this id. |
GET /v1/transport/transit/lines/cellsHow many lines stop in each hexagon, with a count per mode, or one total over what you send with group_by=all. POST /v1/transport/transit/lines/cells takes the same fields as JSON, for long cell lists.
How many lines stop in each hexagon in the box. Over the seven hexagons of Stations for a list of cells, group_by=all counts 114 lines.
Request
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/transport/transit/lines/cells?bbox=51.522,-0.140,51.538,-0.110"Shade = count08339 hexagons; a hexagon opens its row.
| Hexagoncell | Countcount | Mode counts busmode_counts.bus | Mode counts undergroundmode_counts.underground | Map |
|---|---|---|---|---|
| 89194ad3643ffff | 10 | 10 | — | |
| 89194ad364bffff | 7 | 7 | — | |
| 89194ad364fffff | 0 | — | — | |
| 89194ad365bffff | 0 | — | — | |
| 89194ad366bffff | 8 | 8 | — |
5 of 39 shown · the other 34 are in the response, all 39 in the playground
Response
{
"resolution": 9,
"results": [
{
"cell": "89194ad3643ffff",
"count": 10,
"mode_counts": {
"bus": 10
}
},
"… 38 more rows"
],
"next_cursor": null
}Also takes Where: near, radius_m, bbox, cells, at · Per-hexagon routes: group_by (cell or all), resolution (6 to 10) · Paging: limit, cursor · Output: format · Long requests: the POST body.
Each row: cell, count (lines stopping there) and mode_counts (lines per mode); with group_by=all, one row of cell_count, count and mode_counts.
Rollup: distinct for count and mode_counts, so a line through ten hexagons counts once; sum for cell_count.
Errors: those of /v1/transport/transit/stations/cells.
GET /v1/transport/roadsMajor roads with an entry or exit in the location you give, one row per road and direction: nearest first with near, otherwise by id.
Within 10 km of King's Cross: the M1, one row per direction.
Request
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/transport/roads?near=51.5307,-0.1238&radius_m=10000"| Refref | Directiondirection | Entriesaccess_counts.entry | Exitsaccess_counts.exit |
|---|---|---|---|
| M1 | southbound | 0 | 1 |
| M1 | northbound | 2 | 0 |
All 2 shown
Response
{
"results": [
{
"id": "rd_gb_423c83e76074",
"name": null,
"ref": "M1",
"direction": "southbound",
"access_counts": {
"entry": 0,
"exit": 1
}
},
"… 1 more row"
],
"next_cursor": null
}Also takes Where: near, radius_m, bbox · Paging: limit, cursor.
Each row: id (rd_gb_…), name (often null), ref (M1), direction (northbound, southbound, eastbound, westbound, or null) and access_counts: its entries and exits inside the location, as {entry, exit}.
Errors
| Code | HTTP | When |
|---|---|---|
location_required | 400 | No near or bbox; roads take neither cells nor at. |
not_available_in_country | 404 | The location is in a country with no road data. |
too_many_results | 400 | Over 10,000 entries and exits in the location; ask for a smaller one. |
… and every Where and Paging code.
GET /v1/transport/roads/{id}One major road in one direction, its entries and exits counted along all of it. GET /v1/transport/roads/access?road=<id> lists them.
The M1 northbound: 49 entries and 49 exits.
Request
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/transport/roads/rd_gb_5dd25d5e19ad"| Idid | rd_gb_5dd25d5e19ad |
|---|---|
| Namename | — |
| Refref | M1 |
| Directiondirection | northbound |
| Entriesaccess_counts.entry | 49 |
| Exitsaccess_counts.exit | 49 |
Response
{
"id": "rd_gb_5dd25d5e19ad",
"name": null,
"ref": "M1",
"direction": "northbound",
"access_counts": {
"entry": 49,
"exit": 49
}
}Each row: the list row, with access_counts over the whole road.
Errors
| Code | HTTP | When |
|---|---|---|
invalid_id | 400 | Not a road id (rd_gb_…). |
not_found | 404 | No road with this id. |
GET /v1/transport/roads/accessWhere you get on or off a major road: junctions, ramps, slip roads. In the location you give, or along one road with road: nearest first with near, otherwise by id.
The nearest motorway entries to King's Cross: two slip roads onto the M1 northbound at Staples Corner, 8.7 km away.
Request
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/transport/roads/access?near=51.5307,-0.1238&radius_m=10000&type=entry"2 pins inside the 10,000 m circle; a pin opens its row.Drawn from the response on this page; the playground runs it live.
| Namename | Distancedistance_m | Typetype | Road refroad.ref | Map |
|---|---|---|---|---|
| — | 8.7 km | entry | M1 | |
| Staples Corner | 8.7 km | entry | M1 |
All 2 shown
Response
{
"results": [
{
"id": "ra_gb_on-d11a8a2b-f21b-437a-9b84-5d84e267b0df",
"type": "entry",
"road": {
"id": "rd_gb_5dd25d5e19ad",
"name": null,
"ref": "M1"
},
"name": null,
"lat": 51.57186,
"lng": -0.23051,
"cell": "89195da4267ffff",
"distance_m": 8682
},
"… 1 more row"
],
"next_cursor": null
}| Parameter | Type | Default | What it does | Example |
|---|---|---|---|---|
type | entry | exit | both | Only entries (on-ramps, slip roads on) or only exits. | type=entry |
road | road id | — | Only this road's entries and exits. A where of its own: no location with it. | road=rd_gb_5dd25d5e19ad |
Also takes Where: near, radius_m, bbox · Paging: limit, cursor.
Each row: id (ra_gb_on-… for an entry, ra_gb_off-… for an exit), type (entry or exit), road as {id, name, ref} (the road it joins; with road, that one), name (the local road it joins, often null), lat and lng (degrees), cell (its resolution-9 hexagon); distance_m (metres) with near.
Errors
| Code | HTTP | When |
|---|---|---|
location_required | 400 | None of near, bbox or road. |
too_many_locations | 400 | road with near or bbox. |
invalid_type | 400 | Not entry or exit. |
invalid_id | 400 | road is not a road id. |
not_available_in_country | 404 | The location is in a country with no road data. |
too_many_results | 400 | Over 10,000 entries and exits in the location. |
… and every Where and Paging code.
GET /v1/transport/roads/access/{id}One entry or exit.
The M1 northbound entry at Staples Corner.
Request
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/transport/roads/access/ra_gb_on-7a1d7c4e-d65c-4d9b-b963-790bc7213b59"1 pin; it opens its row.Drawn from the response on this page; the playground runs it live.
| Idid | ra_gb_on-7a1d7c4e-d65c-4d9b-b963-790bc7213b59 |
|---|---|
| Typetype | entry |
| Road idroad.id | rd_gb_5dd25d5e19ad |
| Road nameroad.name | — |
| Road refroad.ref | M1 |
| Namename | Staples Corner |
| Latlat | 51.57234 |
| Lnglng | -0.23042 |
| Hexagoncell | 89195da4267ffff |
Response
{
"id": "ra_gb_on-7a1d7c4e-d65c-4d9b-b963-790bc7213b59",
"type": "entry",
"road": {
"id": "rd_gb_5dd25d5e19ad",
"name": null,
"ref": "M1"
},
"name": "Staples Corner",
"lat": 51.57234,
"lng": -0.23042,
"cell": "89195da4267ffff"
}Each row: the list row, without distance_m.
Errors
| Code | HTTP | When |
|---|---|---|
invalid_id | 400 | Not an entry or exit id (ra_gb_on-…, ra_gb_off-…). |
not_found | 404 | No entry or exit with this id. |
Request
curl -H "X-Application-Id: YOUR_APP_ID" -H "X-Api-Key: YOUR_APP_KEY" \
"https://data.traveltimeapp.com/v1/transport/transit/stations?near=51.5309,-0.1229&radius_m=800"41 pins inside the 800 m circle; a pin opens its row.Drawn from the response on this page; the playground runs it live.
| Namename | Distancedistance_m | Modesmodes | Hexagoncell | Map |
|---|---|---|---|---|
| London Kings Cross | 3 m | rail | 89195da4d8fffff | |
| King's Cross St. Pancras | 32 m | underground | 89195da4dbbffff | |
| King's Cross Stn / York Way | 45 m | bus | 89195da4d8fffff | |
| King's Cross St. Pancras Underground Station | 57 m | bus | 89195da4d8fffff | |
| King's Cross St. Pancras Underground Station | 97 m | bus | 89195da4dbbffff |
5 of 41 shown · the other 36 are in the response, all 41 in the playground
Response
{
"results": [
{
"id": "st_gb_218003af11f9",
"name": "London Kings Cross",
"modes": [
"rail"
],
"lat": 51.53088,
"lng": -0.12293,
"cell": "89195da4d8fffff",
"line_count": 48,
"trips_per_hour": {
"am_peak": 11.2,
"interpeak": 10.32,
"pm_peak": 10.63,
"evening": 5,
"weekend": 7.87
},
"distance_m": 3
},
"… 40 more rows"
],
"next_cursor": null
}