Skip to main content
Use the Geocoding API to convert an address to coordinates, convert coordinates or an IP address to an address, and validate a structured address. For a complete address-entry flow that uses these operations, see Autocomplete, geocode, and validate addresses. The base URL is https://api.radar.io. Send your API key in the Authorization header. All four operations accept a publishable key, so you can call them from a client. For key types, the error format, and rate limits, see Authentication, errors, and rate limits. For partial input such as a few typed characters or a place name, use Autocomplete instead of forward geocoding. You can cache API responses for up to 30 days under the terms of use. For data quality by country, see Coverage.

Address object

Forward geocode, reverse geocode, IP geocode, and Autocomplete return addresses in the same shape. Only latitude, longitude, and geometry are always present. Radar includes the other fields when they apply to the result and its layer. A formatted address, a geocoded coordinate, and a validated address answer different questions. formattedAddress is a display string. latitude and longitude are where Radar located the result, with confidence describing how precisely. Only Validate an address checks the address against postal reference data.

Forward geocode

Geocodes an address, converting an address to coordinates. This operation works best with complete addresses.

Query parameters

Response

A 200 response contains meta and addresses, an array of address objects. Check that the array isn’t empty before you read the first result. Each address has a confidence value that describes the certainty of its latitude and longitude:

Example

This request geocodes a street address.
Radar returns this response:

Errors

A 400 response looks like this:

Reverse geocode

Reverse geocodes a location, converting coordinates to an address.

Query parameters

Response

A 200 response contains meta and addresses, an array of address objects. Each address includes distance, the distance in meters from the requested coordinates.

Example

This request reverse geocodes a coordinate.
Radar returns this response:

Errors

A 400 response looks like this:

IP geocode

Geocodes the requester’s IP address, converting the IP address to a city, state, and country. An IP-derived location is an estimate of where a network connection terminates. Use it to set a default region, language, or search bias. Don’t treat it as proof of a device’s precise location.

Query parameters

None. Radar geocodes the IP address that made the request, so call this operation from the device you want to locate. A call from your backend returns your backend’s location.

Response

A 200 response contains meta and these fields: When proxy is true, or the response has no address, don’t assume a region. Fall back to your most protective default, or ask the user. Mobile carriers, corporate networks, and VPNs routinely place a user in a different city, state, or country, so use the result only for defaults the user can change. To prove that a user is physically in a place, or to decide eligibility for regulated activity, see Geo-compliance overview and quickstart.

Example

This request geocodes the IP address of the caller.
Radar returns this response:
This web SDK example returns region defaults, or none when there’s no estimate or the request came through a known proxy:

Errors

A 404 response looks like this:

Validate an address

Validates a structured address against postal data and returns the standardized address with a verification status.
Address validation is available on the Enterprise plan.
This operation supports addresses in the United States and Canada. Use it for complete, structured addresses. For partial addresses or place names, use Autocomplete.

Query parameters

Send either addressLabel, or both number and street. Don’t combine addressLabel with number or street.

Response

A 200 response contains meta and these fields: result.verificationStatus is one of: address.metadata.recordType is one of: For US addresses, the response can also include an analysis field with these values: A verified status means the input matched a single record in the reference data. It doesn’t confirm that a specific person or business receives mail at the address.

Example

This request validates a US address that has a unit.
Radar returns this response:

Errors

A 400 response looks like this:

Coverage

Radar’s geocoding and search data combines open and commercial datasets. The table rates data quality and availability by country for coarse (city-level) and fine (address-level) results. “Geocoding” covers forward and reverse geocoding. “Autocomplete” covers address autocomplete. “Place search” covers place detection and search.