Skip to main content

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 q only. Fuzzy (trigram) match over landmark names, ranked by similarity then confidence. Optionally narrow with region and/or kind.
  • Anchored by point — supply near=<lat>,<lng>. Returns landmarks within radius metres of the point, ranked by distance. Combine with kind and/or q to 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/tiles and /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​

Landmark matches