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.

At least one of q, near, or anchor is required.

Request

Responses

Landmark matches