Convert coordinates to hex code
GET/v2/hexcode
Converts lat/lng coordinates to a hex code (e.g., AF-GH-7-0GXTQD5TZZZZZ, Kotoka airport).
A code is the full H3 cell index in Crockford base-32, so it decodes
offline with no lookup. At resolution 7 the last characters are always
Z: they are H3's unused digits, not extra information. short_code
drops them (AF-GH-7-0GXTQD5T), and every endpoint that takes a code
accepts either form.
Uses Uber's H3 hexagonal grid. The computation is local and instant (~1μs).
Coordinates must be within Ghana.
Request
Responses
- 200
- 400
- 429
Hex code generated
Invalid coordinates, outside Ghana, or invalid resolution
Rate limit exceeded
Response Headers
X-RateLimit-Limit
Maximum requests allowed in the window
X-RateLimit-Remaining
Requests remaining in current window
Retry-After
Seconds until the rate limit resets