Nearby Stops
Find bus stops near a location. Ghost stops (decommissioned stops that return zero departures) are automatically filtered out.
GET/v1/nearby
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| lat | float | Required | Latitude (e.g. -33.8688) |
| lng | float | Required | Longitude (e.g. 151.2093) |
| radius | integer | Optional | Radius in metres. Default: 500, Max: 2000 |
| limit | integer | Optional | Max stops to return. Default: 10 |
Example
cURL
curl "https://api.transitkit.dev/v1/nearby?lat=-33.8688&lng=151.2093&radius=500" \
-H "Authorization: Bearer YOUR_API_KEY"Response
200 OK
{
"location": { "lat": -33.8688, "lng": 151.2093 },
"stops": [
{
"stop_id": "200060",
"name": "Circular Quay, Stand A",
"distance_metres": 120,
"routes": ["431", "X31", "372"]
},
{
"stop_id": "200061",
"name": "Circular Quay, Stand B",
"distance_metres": 180,
"routes": ["380", "343", "392"]
}
]
}Response Fields
| Field | Type | Description |
|---|---|---|
| stop_id | string | TfNSW stop identifier |
| name | string | Human-readable stop name |
| distance_metres | integer | Distance from queried location in metres |
| routes | string[] | Bus routes serving this stop |
Note on coordinates: The raw TfNSW API accepts longitude:latitude order in query parameters but returns [latitude, longitude] in responses. TransitKit uses standard
lat, lng order everywhere.