FREE USAGE

API Docs

Test Console

Tag Utility

Methods

  • Geocode

Geocode (GET)

Geocoding is the process of converting addresses into geographic coordinates (like latitude 37.423021 and longitude -122.083739), which you can use to place markers or position the map.

Parameters

address
STRING
The address that you want to geocode

For example: "1600 Amphitheatre Parkway, Mountain View, CA"

sensor
BOOLEAN
whether or not the geocoding request comes from a device with a location sensor

For example: "true"

bounds(optional)
STRING
The bounding box of the viewport within which to bias geocode results more prominently
region(optional)
STRING
The region code, specified as a ccTLD ("top-level domain") two-character value
language(optional)
STRING
The language in which to return results

Results

results
array of OBJECT

This result field has no description

address_components
array of OBJECT
An entry for each component of the provided address
long_name
STRING

This result field has no description

For example: "Amphitheatre Pkw"

types
array of STRING

This result field has no description

For example: "Route"

short_name
STRING

This result field has no description

For example: "Amphitheatre Pkwy"

formatted_address
STRING
Long address format

For example: "1600 Amphitheatre Pkwy, Mountain View, CA 94043, US"

types
array of STRING
Type of result

For example: "street_address"

geometry
OBJECT

This result field has no description

viewport
OBJECT

This result field has no description

southwest
OBJECT

This result field has no description

lng
NUMBER

This result field has no description

lat
NUMBER

This result field has no description

northeast
OBJECT

This result field has no description

lng
NUMBER

This result field has no description

lat
NUMBER

This result field has no description

location_type
STRING

This result field has no description

location
OBJECT
Resulting coordinates
lng
NUMBER
The resulting longitude

For example: "37.4219720"

lat
NUMBER
The resulting latitude

For example: "-122.0841430"

status
STRING
result status

For example: "OK"

Example

JSON
{"results":[{"address_components":[{"long_name":"Amphitheatre Pkw","types":["Route"],"short_name":"Amphitheatre Pkwy"}],"formatted_address":"1600 Amphitheatre Pkwy, Mountain View, CA 94043, US","types":["street_address"],"geometry":{"viewport":{"southwest":{"lng":123,"lat":123},"northeast":{"lng":123,"lat":123}},"location_type":"sample value","location":{"lng":37.4219720,"lat":-122.0841430}}}],"status":"OK"}

JSON (Learn how)

GET http://9v9ej6LPNude4Z22hBhP0v3um.proxy.mashape.com/geocode/json?address=A-VALUE&sensor=A-VALUE&bounds=A-VALUE&region=A-VALUE&language=A-VALUE
  • The required parameters have a yellow background, while the optional are gray
  • Authentication: Request a valid _token before making the API call. Learn how.

PHP (Learn how)

This client library will be auto-generated on the fly

Ruby (Learn how)

This client library will be auto-generated on the fly

Python (Learn how)

This client library will be auto-generated on the fly

Java (Learn how)

This client library will be auto-generated on the fly

Objective C (Learn how)

This client library will be auto-generated on the fly

Erlang (Learn how)

This client library will be auto-generated on the fly