Find transit stops within specified radius
Search for all public transport stops within a given radius of coordinates
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
location | string | ✓ | Coordinates for search in 'lat,lon' format | 59.9352,30.3258 |
radius | integer | ✓ | Search radius in meters | 1000 |
limit | integer | Maximum number of stops to return Default: 3000 | 100 | |
lang | string | Language code for translated stop/route names (IETF BCP 47 format, e.g. en, ru, es, zh-CN). If no translation is available, the original name is returned | en |
Try It Out
https://capi.busmaps.com:8443Required parameters only
curl -H "capi-key: Bearer YOUR_API_KEY" -H "capi-host: busmaps.com" "https://capi.busmaps.com:8443/stopsInRadius?location=59.9352,30.3258&radius=1000"Common usage with optional parameters
curl -H "capi-key: Bearer YOUR_API_KEY" -H "capi-host: busmaps.com" "https://capi.busmaps.com:8443/stopsInRadius?location=59.9352,30.3258&radius=1000&limit=100"Popular parameters
curl -H "capi-key: Bearer YOUR_API_KEY" -H "capi-host: busmaps.com" "https://capi.busmaps.com:8443/stopsInRadius?location=59.9352,30.3258&radius=1000&limit=100&lang=en"Response Example
HTTP 200 - Success
{
"stops": [
{
"stopId": "2096119542657293652",
"countryIso": "GBR",
"countryUrl": "uk",
"stopName": "Charing Cross Underground Station",
"urlStopName": "Charing-Cross-Underground-Station",
"stopTypeGroup": "subway",
"stopLat": 51.507449,
"stopLon": -0.128097,
"stopDesc": "",
"routes": [
{
"routeId": "2521614975-583762869",
"countryIso": "GBR",
"countryUrl": "uk",
"routeShortName": "Bakerloo",
"urlRouteShortName": "Bakerloo",
"routeLongName": "Elephant & Castle - Queen's Park - Harrow & Wealdstone",
"routeColor": "A45A2A",
"routeTextColor": "FFFFFF",
"tripHeadsign": "Queen's Park Underground Station",
"routeType": "subway"
},
{
"routeId": "2521614975-583762869",
"countryIso": "GBR",
"countryUrl": "uk",
"routeShortName": "Bakerloo",
"urlRouteShortName": "Bakerloo",
"routeLongName": "Elephant & Castle - Queen's Park - Harrow & Wealdstone",
"routeColor": "A45A2A",
"routeTextColor": "FFFFFF",
"tripHeadsign": "Stonebridge Park Underground Station",
"routeType": "subway"
},
{
"routeId": "2521614975-583762869",
"countryIso": "GBR",
"countryUrl": "uk",
"routeShortName": "Bakerloo",
"urlRouteShortName": "Bakerloo",
"routeLongName": "Elephant & Castle - Queen's Park - Harrow & Wealdstone",
"routeColor": "A45A2A",
"routeTextColor": "FFFFFF",
"tripHeadsign": "Harrow & Wealdstone Underground Station",
"routeType": "subway"
}
]
},
{
"stopId": "13812084511034792425",
"countryIso": "GBR",
"countryUrl": "uk",
"stopName": "Trafalgar Square",
"urlStopName": "Trafalgar-Square",
"stopTypeGroup": "bus",
"stopLat": 51.507157,
"stopLon": -0.126726,
"stopDesc": "Stop X",
"stopCode": "74476",
"routes": [
{
"routeId": "1495557683-3923602913",
"countryIso": "GBR",
"countryUrl": "uk",
"routeShortName": "91",
"urlRouteShortName": "91",
"routeLongName": "Crouch End - Nags Head - King's Cross - Russell Square - Trafalgar Square",
"routeColor": "CD2F30",
"routeTextColor": "FFFFFF",
"tripHeadsign": "Trafalgar Square",
"routeType": "bus"
},
{
"routeId": "3439225775-1753208283",
"countryIso": "GBR",
"countryUrl": "uk",
"routeShortName": "N91",
"urlRouteShortName": "N91",
"routeLongName": "Cockfosters - Southgate - Arnos Grove - Wood Green - Crouch End - Holloway - Kings Cross - Euston - Holborn - Trafalgar Square",
"routeColor": "CD2F30",
"routeTextColor": "FFFFFF",
"tripHeadsign": "Trafalgar Square",
"routeType": "bus"
},
{
"routeId": "526748303-1969481474",
"countryIso": "GBR",
"countryUrl": "uk",
"routeShortName": "N97",
"urlRouteShortName": "N97",
"routeLongName": "Hammersmith - Fulham Cross - Earls Court - Green Park - Trafalgar Square",
"routeColor": "CD2F30",
"routeTextColor": "FFFFFF",
"tripHeadsign": "Trafalgar Square",
"routeType": "bus"
}
]
}
],
"regionName": "uk_ireland",
"imperial": true,
"processingTimeMs": 195.85
}Response Schema
Title: Stops in Radius Response View Full JSON Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Stops in Radius Response",
"type": "object",
"properties": {
"imperial": {
"type": "boolean",
"description": "True when distances are meant to be shown in imperial units (US/UK)"
},
"regionName": {
"type": "string",
"description": "Transit data region that served the request"
},
"stops": {
"type": "array",
"items": {
"type": "object",
"properties": {
"countryIso": {
"type": "string",
"description": "ISO 3166-1 alpha-3 country code (e.g. 'GBR')"
},
"stopId": {
"type": "string",
"description": "Internal stop identifier (use with /nextDepartures stopId mode)"
},
"stopLon": {
"type": "number",
"description": "Stop longitude"
},
"stopName": {
"type": "string",
"description": "Human-readable stop name"
},
"stopLat": {
"type": "number",
"description": "Stop latitude"
},
"stopTypeGroup": {
"type": "string",
"description": "Stop transport group (bus, subway, train, tram, ...)"
},
"countryUrl": {
"type": "string",
"description": "Country URL slug (e.g. 'uk')"
},
"wheelchairBoarding": {
"type": "integer",
"description": "Wheelchair accessibility flag (GTFS: 0 unknown, 1 yes, 2 no)"
},
"routes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"countryIso": {
"type": "string",
"description": "ISO 3166-1 alpha-3 country code (e.g. 'GBR')"
},
"routeShortName": {
"type": [
"null",
"string"
],
"description": "Short route name shown to passengers (e.g. '18', 'Bakerloo')"
},
"routeColor": {
"type": [
"null",
"string"
],
"description": "Route color as a hex string"
},
"urlRouteLongName": {
"type": "string",
"description": "URL-safe slug of the route long name"
},
"tripHeadsign": {
"type": "string",
"description": "Trip destination shown on the vehicle"
},
"routeTextColor": {
"type": [
"null",
"string"
],
"description": "Route text color as a hex string"
},
"urlRouteShortName": {
"type": [
"null",
"string"
],
"description": "URL-safe slug of the route short name"
},
"countryUrl": {
"type": "string",
"description": "Country URL slug (e.g. 'uk')"
},
"routeId": {
"type": "string",
"description": "Internal route identifier"
},
"routeType": {
"type": "string",
"description": "Transport type (bus, subway, train, tram, ...)"
},
"routeLongName": {
"type": [
"null",
"string"
],
"description": "Full route name/description"
}
},
"required": [
"tripHeadsign",
"countryIso",
"countryUrl",
"routeId",
"routeType"
]
},
"description": "Calculated routes"
},
"stopCode": {
"type": "string",
"description": "Public stop code shown to passengers"
},
"stopDesc": {
"type": "string",
"description": "Additional stop description (direction, platform hint)"
},
"urlStopName": {
"type": "string",
"description": "URL-safe slug of the stop name"
}
},
"required": [
"countryIso",
"stopId",
"countryUrl",
"stopLon",
"stopName",
"routes",
"stopLat",
"stopTypeGroup",
"urlStopName"
]
},
"description": "Array of transit stops within radius"
},
"processingTimeMs": {
"type": "number",
"description": "Server processing time in milliseconds"
}
},
"required": [
"stops",
"regionName",
"processingTimeMs"
]
}
Response Codes
Stops retrieved successfully
Invalid location or radius
Internal server error