ClickBus place autocomplete

GET https://api.api.sh/clickbus/v1/places
1 credit / call travel & events try it in the playground →

Bus places (cities and terminals) matching a name, as the ClickBus search box suggests them: id, name, slug (the value /clickbus/v1/trips takes), whether the slug covers every terminal in the city, city name and id. Or the places near a point with lat, lon and radius_km.

Every response includes credits_used: the credits this call cost.

Part of the ClickBus API: 9 endpoints with prices, use cases and example responses.

Parameters

nametypedescription
q string City or terminal name, 2+ characters, e.g. campinas, rio de janeiro. Give q or lat and lon. Example: campinas
lat number Latitude for places near a point.
lon number Longitude for places near a point.
radius_km integer Search radius for lat/lon, 1-300 km (default 30).
limit integer Results, 1-50 (default 10).

Every endpoint also takes fresh, raw, fields (see lean responses and caching).

Example

curl "https://api.api.sh/clickbus/v1/places?q=campinas" \
  -H "x-api-key: $APISH_KEY"

Response

A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).

Example response (real call, trimmed: lists cut to 2 items, long text shortened, raw left out)

{"query": "campinas","count": 10,"places": [{"id": 78764,"name": "Campinas, SP - TODOS","slug": "campinas-sp-todos","all_terminals_in_city": true,"city": "Campinas","city_id": 721,"distance_km": null,"latitude": null,"longitude": null},{"id": 2505,"name": "Campinas, SP","slug": "campinas-sp","all_terminals_in_city": false,"city": "Campinas","city_id": 721,"distance_km": null,"latitude": null,"longitude": null},"… 8 more"],"cached": false,"credits_used": 1}
The fastest way to see the full response is the playground: it runs this endpoint with your account and shows the exact JSON.