Geocoding

Convert human-readable addresses into geographic coordinates (geocoding) and convert coordinates back into addresses (reverse geocoding). Powered by OpenStreetMap via the Nominatim API.

Get API Key

Overview

Use Cases

  • Place pins on a map from a user-supplied address
  • Convert GPS coordinates to a readable address for display
  • Validate and normalise addresses
  • Power location-aware search and filtering features

Features

Forward geocoding (address to lat/lon)
Reverse geocoding (lat/lon to address)
Worldwide coverage via OpenStreetMap data
Results cached for 24 hours for fast repeated lookups

API Endpoints

Geocode Address

Converts a free-text address into latitude and longitude coordinates.

GET
https://api.requiems.xyz/v1/places/geocode

Parameters

Name Type Required Description
address string Required The address to geocode (street, city, country, or any combination)

Try it out

Live Demo
Request

The address to geocode (street, city, country, or any combination)

Response Fields

Field Type Description
address string Full display name of the matched location
city string City or town of the matched location
country string ISO 3166-1 alpha-2 country code (uppercase)
lat number Latitude of the matched location
lon number Longitude of the matched location

Code Examples

curl "https://api.requiems.xyz/v1/places/geocode?address=1600+Pennsylvania+Ave+NW" \
  -H "requiems-api-key: YOUR_API_KEY"

Error Responses

not_found

No results found for the given address.

upstream_error

The geocoding service is temporarily unavailable.

bad_request

The address parameter is missing.

Reverse Geocode

Converts geographic coordinates into a human-readable address.

GET
https://api.requiems.xyz/v1/places/reverse-geocode

Parameters

Name Type Required Description
lat number Required Latitude of the location (-90 to 90)
lon number Required Longitude of the location (-180 to 180)

Try it out

Live Demo
Request

Latitude of the location (-90 to 90)

Longitude of the location (-180 to 180)

Response Fields

Field Type Description
lat number Latitude as provided in the request
lon number Longitude as provided in the request
address string Full display name of the location at the given coordinates
city string City or town at the given coordinates
country string ISO 3166-1 alpha-2 country code (uppercase)

Code Examples

curl "https://api.requiems.xyz/v1/places/reverse-geocode?lat=38.8977&lon=-77.0365" \
  -H "requiems-api-key: YOUR_API_KEY"

Error Responses

not_found

No address found for the given coordinates.

upstream_error

The geocoding service is temporarily unavailable.

bad_request

lat or lon is missing or out of range (lat: -90..90, lon: -180..180).

Frequently Asked Questions