Click or drag to resize
GET /geocode/<country>/<address>
Print this page
Description

This service is used to geocode an address entered by a user. It returns a list of candidate locations (addresses augmented with latitude and longitude) that match the specified street address.

The address to look up is encoded as part of the URL, as is the country where the address is located. That is, the <address> argument is any natural language expression of an address, such as "20 Enterprise, Aliso Viejo", and the <country> argument is a valid Country specifier.

Example of a valid request, with %20 used in place of +:

GET /geocode/usa/20%20Enterprise,%20Aliso%20Viejo
Request

No request body is used for this service.

Response

On success, the response is a JSON array of address objects:

Member Type Purpose
street string The street number and name of the address.
city string The city in which the address is located.
region string The region in which the address is located (e.g., state or province).
postalCode string The postal code or zip code of the address.
lat double (required for POST) The latitude of the address in decimal degrees.
lon double (required for POST) The longitude of the address in decimal degrees.
bearingFromStreet double? The side of the road on which the address is located, indicated as an angle in decimal degrees (0 is north, 90 is east).
suburb string The suburb in which the address is located.
If the request fails, an Error Response is generated.