Geocode a free-text landmark to coordinates
GET/v2/landmarks/geocode
Resolves a landmark by name to coordinates — Ghanaians navigate by landmarks, not addresses. Three modes, in order of precedence:
- Plain name search — supply
qonly. Fuzzy (trigram) match over landmark names, ranked by similarity then confidence. Optionally narrow withregionand/orkind. - Anchored by point — supply
near=<lat>,<lng>. Returns landmarks withinradiusmetres of the point, ranked by distance. Combine withkindand/orqto disambiguate (e.g. the church nearest a junction). - Anchored by name — supply
anchor=<name>. The anchor name is geocoded to its best match first, then the point-anchored search runs around it; the resolved anchor is returned alongside the matches. This powers queries like "the church near Oxford Street" once the caller supplies the two parts. - Viewport — supply
bbox=north,south,east,west(the map's visible bounds, same ordering as/v2/map/tilesand/v2/analytics/poi-density). Returns every landmark whose centroid falls inside the rectangle, so a map can render the POI dots it can actually see. Takes precedence over the other modes.
At least one of q, near, anchor, or bbox is required.
Request
Responses
- 200
- 400
- 503
Landmark matches
Missing or invalid parameters (none of q/near/anchor/bbox supplied)
Routing service unavailable