Geocode an address

by Google Maps

googlemap/geocode

Turn an address into coordinates, or coordinates into an address.

Billed per
call
Price
$0.01
Provider
Google Maps
Timeout
5 min

Overview

Resolves between written addresses and geographic coordinates in both directions. Given an address it returns matching places with latitude and longitude, a normalised address, the parsed address components, and a stable place identifier. Given a coordinate pair or a place identifier it returns the addresses at or near that point. A bounding box and a region code bias results toward an area without excluding others, and a language code sets the language of the returned address text.

A status and a list of matches, each with a formatted address, its components, coordinates, a viewport, and a place id.

Input

These go in the input object of the run request.

FieldTypeRequiredDescription
addressstringNoThe address to locate. Required unless a coordinate pair or place id is given.
latlngstringNoA `lat,lng` pair to look up in reverse.
place_idstringNoA known place identifier to resolve.
componentsstringNoPipe-separated filters such as country or postal code.
regionstringNoTwo-letter region code to bias results toward.
languagestringNoLanguage of the returned address text.

Requests up to 1 MB.

Example

A call that works, with your own key.

curl https://gateway.agentsky.dev/v1/run \
  -H "authorization: Bearer $AGENTSKY_API_KEY" \
  -H "content-type: application/json" \
  -d '{"provider":"googlemap","endpoint":"geocode","input":{"address":"1600 Amphitheatre Parkway, Mountain View, CA","region":"us","language":"en"}}'

Pricing

$0.01 per call on the default plan. Every run carries its price in the response.

Questions

Geocode an address — AgentSky