Skip to content
OSINTtools.io

Google Maps API

Google's web map with satellite imagery, Street View, historical Street View captures and user photos of places.

Base URL
https://maps.googleapis.com/maps/api
Sign-in
API key
Format
REST
Endpoints
2

Compiled by OSINTtools.io editors from developers.google.com · updated Nov 29, 2026Work on this API? Claim it to keep these docs currentReport a mistake

Introduction

Google Maps Platform web services include the Geocoding API, which turns an address into coordinates and a place ID (and back), and the Places API (New) for place search and details. An investigator can use geocoding to place an address on a map and reverse geocoding to find the address at a coordinate.

This reference documents the Geocoding API, at https://maps.googleapis.com/maps/api/geocode/json, with your key in the key query parameter. HTTPS is required and URLs must stay under 16,384 characters.

The Places API (New) is on a different host (https://places.googleapis.com/v1) with the key in the X-Goog-Api-Key header and a required X-Goog-FieldMask header; for example POST /v1/places:searchText with a textQuery body and GET /v1/places/PLACE_ID. It is not described endpoint by endpoint here. Google also publishes many other web service APIs (Routes, Time Zone, Elevation, Street View Static and others).

Quick start

  1. Get a key

    Create an account with Google Maps and copy your api key. Where to get it

  2. Make your first request

    Geocode an address or components into coordinates and a place ID.. Replace YOUR_API_KEY and run it in a terminal, or use Try it on the endpoint.

    curl 'https://maps.googleapis.com/maps/api/geocode/json?key=YOUR_API_KEY'
  3. Read the response

    A 200 response looks like this.

    {
      "status": "OK",
      "results": [
        {
          "formatted_address": "1 Example Street, Springfield, USA",
          "geometry": {
            "location": {
              "lat": 37,
              "lng": -95
            },
            "location_type": "ROOFTOP"
          },
          "place_id": "EXAMPLE_PLACE_ID",
          "types": [
            "street_address"
          ]
        }
      ]
    }

Authentication

Send your API key in the key query parameter of every request.

Get a key from Google Maps

Try it on this page keeps your key in your browser; it is never sent to OSINTtools.io.

Rate limits and pricing

Not stated in the docs read

Errors

StatusMeaning
200Errors are reported in the status field of the body: ZERO_RESULTS, OVER_QUERY_LIMIT, REQUEST_DENIED, INVALID_REQUEST, UNKNOWN_ERROR

Geocoding

Needs address and/or components. Coordinates are not supported in address; use reverse geocoding for those. formatted_address should not be parsed. The response status field reports the outcome.

Query parameters

addressstringtakes your name

Street address or plus code

Example: 1 Example Street, Springfield
componentsstring

Pipe-separated component:value filters; fully restricts results; required when address is omitted

Example: country:US|postal_code:00000
boundsstring

Viewport that biases results without restricting them

languagestring

Language of results

Example: en
regionstring

Two-character ccTLD value that biases results

Example: us
extra_computationsstring

Adds extra data to the response

One of: ADDRESS_DESCRIPTORS, BUILDING_AND_ENTRANCES
Response fields · 10Show

statusstring

OK, ZERO_RESULTS, OVER_QUERY_LIMIT, REQUEST_DENIED, INVALID_REQUEST or UNKNOWN_ERROR

error_messagestring

Present on some non-OK responses

formatted_addressstring

Human-readable address

address_components[]object

Parts with long_name, short_name and types

latnumber

Latitude

lngnumber

Longitude

location_typestring

Precision of the result

place_idstring

Place ID usable with other Google APIs

types[]string

Feature types

partial_matchboolean

Present for partial matches

curl 'https://maps.googleapis.com/maps/api/geocode/json?key=YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "status": "OK",
  "results": [
    {
      "formatted_address": "1 Example Street, Springfield, USA",
      "geometry": {
        "location": {
          "lat": 37,
          "lng": -95
        },
        "location_type": "ROOFTOP"
      },
      "place_id": "EXAMPLE_PLACE_ID",
      "types": [
        "street_address"
      ]
    }
  ]
}
  • Passive: the target is not contacted

Same URL as forward geocoding with the latlng parameter; no space between the values. result_type and location_type are post-search filters; using both returns only results matching both.

Query parameters

latlngstringrequired

Latitude,longitude with no space

Example: 37.0,-95.0
languagestring

Language of results

Example: en
result_typestring

Pipe-separated address types to keep

Example: street_address
location_typestring

Pipe-separated location types to keep

One of: ROOFTOP, RANGE_INTERPOLATED, GEOMETRIC_CENTER, APPROXIMATE
regionstring

Two-character ccTLD region code

Example: us
extra_computationsstring

Adds extra data to the response

One of: ADDRESS_DESCRIPTORS, BUILDING_AND_ENTRANCES
Response fields · 8Show

statusstring

OK, ZERO_RESULTS, OVER_QUERY_LIMIT, REQUEST_DENIED, INVALID_REQUEST or UNKNOWN_ERROR

formatted_addressstring

Human-readable address

address_components[]object

Parts with long_name, short_name and types

latnumber

Latitude

lngnumber

Longitude

place_idstring

Place ID

types[]string

Address types

global_codestring

Plus code, not always returned

curl 'https://maps.googleapis.com/maps/api/geocode/json?latlng=37.0,-95.0&latlng=37.0%2C-95.0&key=YOUR_API_KEY'
Replace YOUR_API_KEY with your key
Response
{
  "status": "OK",
  "results": [
    {
      "formatted_address": "1 Example Street, Springfield, USA",
      "geometry": {
        "location": {
          "lat": 37,
          "lng": -95
        }
      },
      "place_id": "EXAMPLE_PLACE_ID",
      "types": [
        "street_address"
      ]
    }
  ]
}