# Google Maps Geocoding: Address to Lat/Long & Reverse Geocoding (`steadyscrape/google-maps-geocoding-scraper`) Actor

Bulk geocoding with Google Maps: turn addresses, postcodes and place names into latitude and longitude coordinates, or reverse geocode GPS points into street addresses. Street, city, postal code, state, country, plus code, time zone, place ID. Export to JSON, CSV or Excel, or via API.

- **URL**: https://apify.com/steadyscrape/google-maps-geocoding-scraper.md
- **Developed by:** [Steady Scrape](https://apify.com/steadyscrape) (community)
- **Categories:** Developer tools, Lead generation, Real estate
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.10 / 1,000 address geocodeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Google Maps Geocoding — bulk address to latitude and longitude, and reverse geocoding

This **Google Maps geocoding** Actor turns lists into coordinates: paste **addresses, postcodes, cities or place
names** and get each one's **latitude and longitude** with Google Maps' own **formatted address, street number,
street, city, postal code, state or region, country, plus code, time zone, place ID, feature ID and CID**. Paste
**`latitude, longitude` pairs** instead and it **reverse geocodes** them to the street address at each point. Or pick a
dataset (a CRM export, a lead list, another Actor's results) and every item is geocoded, keeping its own fields.

**US$0.10 per 1,000 addresses.** No Google Cloud key, no login, no proxy to set up. A line Google cannot place, a
blank line, an invalid coordinate and a repeated line are free rows. Export to JSON, CSV or Excel, or get the
geocodes via API: a bulk geocoding API that reads the same answers Google Maps gives its own page.

### What you can do with Google Maps geocoding

- **Geocode a CRM or lead list**: one row per contact with its coordinates and a clean, Google-formatted address.
- **Clean and complete addresses**: get the postcode, region and country an address lacks, and see where Google
  corrected the postcode you gave (`corrected`, `correction`).
- **Reverse geocode GPS points**: fleet pings, photo coordinates, sensor positions or check-ins into street addresses.
- **Put points on a map**: latitude and longitude for any mapping, routing or distance tool, with a Google Maps link.
- **Join by place**: `placeId`, `featureId` and `cid` match each row to the same place in other Google Maps data.

### Address to coordinates and coordinates to address

| You give | Example | You get |
|---|---|---|
| A street address | `1600 Amphitheatre Parkway, Mountain View, CA 94043` | its coordinates and address parts |
| A postcode | `SW1A 2AA, United Kingdom`, `75008 Paris` | the postcode area's centre, `resultType: postcode` |
| A city, state or country | `Austin, TX`, `Texas`, `Germany` | `locality`, `region` or `country` results |
| A place or business name | `Franklin Barbecue Austin`, `Empire State Building` | its position and address (no phone or hours) |
| A coordinate pair | `41.8781, -87.6298`, `(48.15; 11.5)` or `48.15 11.5` | the street address at the point, `distanceMeters` from it |
| A point with hemispheres | `40.7484° N, 73.9857° W`, `40°44'54.4"N 73°59'08.4"W` (as Google Maps shows a point) | the same as a pair |
| A Google Maps link | a place link (read by its pin), `…/maps/@40.7484,-73.9857,17z`, `?q=…`, a search link | the point, or the place or text the link names |

Write an address as you would in Google Maps, with its city and country, or set **Country** for the run: `us` turns a
bare `10001` into `10001, United States` (the New York postcode) and `Springfield` into the city instead of a museum.
Leave it empty for lists that span countries. An address on two lines, or a spreadsheet row pasted with its tabs, is
read with commas between its parts. A `maps.app.goo.gl` share link alone is a free row (open it and copy the address);
with the text the share button copies around it, that text is geocoded.

**Over the API** a line can also be a number (`10001`) or an object with address fields or `lat`/`lng`; `latlngs`,
`records`, `region` and `maxResults` (as other geocoders name them) are read too, and language and country take any
case (`EN`, `en_US`, `UK`).

**From a dataset**, each item's address is found by name: a full-address field (`address`, `fullAddress`,
`formattedAddress`…), or its street, city, state, zip and country fields joined, or `lat`/`lng` (also inside a
`location` object) for reverse geocoding. Name the field yourself (`contact.fullAddress`) when the item has another
shape. Every row keeps the whole item in `item`, so nothing of your list is lost.

### Input example

```json
{
    "addresses": [
        "1600 Amphitheatre Parkway, Mountain View, CA 94043",
        "Friedrichstraße 43, 10117 Berlin",
        "10 Downing Street, London",
        "41.8781, -87.6298"
    ],
    "language": "en"
}
```

or, for a dataset:

```json
{ "datasetId": "<your dataset id>", "addressField": "", "country": "us" }
```

### Output example

One row per input, in the order given (shortened):

```json
{
    "input": "Friedrichstraße 43, 10117 Berlin",
    "mode": "forward",
    "status": "ok",
    "charged": true,
    "latitude": 52.506866099999996,
    "longitude": 13.390727499999999,
    "formattedAddress": "Friedrichstraße 43, 10969 Berlin-Bezirk Friedrichshain-Kreuzberg, Germany",
    "streetAddress": "Friedrichstraße 43",
    "streetNumber": "43",
    "streetName": "Friedrichstraße",
    "neighborhood": "Friedrichshain-Kreuzberg",
    "locality": "Berlin",
    "postalCode": "10969",
    "countryCode": "DE",
    "resultType": "address",
    "googleType": "subpremise",
    "plusCode": "9F4MG94R+P7",
    "plusCodeCompound": "G94R+P7 Berlin, Germany",
    "timeZone": "Europe/Berlin",
    "placeId": "ChIJp3ULWdFRqEcRerYcEbJRe3M",
    "featureId": "0x47a851d1590b75a7:0x737b51b2111cb67a",
    "cid": "8321334561730246266",
    "mapsUrl": "https://www.google.com/maps/search/?api=1&query=52.506866%2C13.390727&query_place_id=ChIJp3ULWdFRqEcRerYcEbJRe3M",
    "corrected": true,
    "correction": "postal code 10117 → 10969",
    "candidates": 1
}
```

A reverse geocoded point (`41.8781, -87.6298`) comes back as `230 S Dearborn St, Chicago, IL 60604`, `mode: reverse`,
`distanceMeters: 43` and the plus code of the point given, `86HJV9HC+63P`.

### Geocoding output fields

| field | what it is |
|---|---|
| `input`, `source`, `datasetItemIndex`, `item` | the line or dataset item as given, and where it came from |
| `mode` | `forward` (address to coordinates) or `reverse` (coordinates to address) |
| `query` | the text sent to Google Maps (with the country added when you set one) |
| `status`, `reason` | `ok`, or why there is no result: `not_found`, `invalid`, `blank`, `blocked` |
| `charged`, `duplicate` | whether the row was paid for; a repeated input is a free copy of the first |
| `latitude`, `longitude` | where Google Maps puts the result |
| `formattedAddress`, `name` | the address as Google writes it, and the result's name (a building or business name when it has one) |
| `streetAddress`, `streetNumber`, `streetName` | the street line and its parts |
| `neighborhood`, `locality`, `postalCode`, `region`, `countryCode` | the address parts (`countryCode` is ISO 3166, e.g. `US`) |
| `resultType` | `address`, `building`, `street`, `postcode`, `locality`, `region`, `country` or `place` (a business or landmark) |
| `googleType` | Google's own type, e.g. `subpremise`, `postal_code`, `us_state`, `barbecue_restaurant` |
| `plusCode`, `plusCodeCompound` | the global plus code and its short form with the place name (from the coordinates when Google gives none) |
| `timeZone` | the IANA time zone, e.g. `America/Chicago` |
| `placeId`, `featureId`, `cid` | Google's identifiers of the result |
| `mapsUrl` | a Google Maps link to the result |
| `corrected`, `correction` | Google answered another postcode than the input gave, e.g. `postal code 10117 → 10969` |
| `candidates` | how many results Google listed: 1 for an address, up to 5 for a text that reads as a search |
| `distanceMeters` | reverse only: metres between the point given and the address found |
| `scrapedAt` | when the run geocoded it (UTC, ISO 8601) |

**This Actor gives the location, not the business.** For a place's phone, website, rating, reviews and opening
hours, use our [Google Maps Place Details Scraper](https://apify.com/steadyscrape/google-maps-place-details-scraper)
(place IDs in, the full panel out) or our [Google Maps Scraper](https://apify.com/steadyscrape/google-maps-scraper)
(every place of a search in an area).

### Pricing

| event | price |
|---|---|
| `address` — one input geocoded, either way | US$0.0001 (US$0.10 per 1,000) |
| run start (Apify's `apify-actor-start`) | US$0.00005 |

Rows that cannot be placed, blank lines, invalid coordinates, repeats and `blocked` rows are **free**. Your run's
spending limit is respected: the run stops at the last address it pays for and says so.

### When Google asks for verification

The Actor reads Google Maps' public answers at a moderate pace (two lookups at once, each sending at most one request
every 0.7 seconds). **If Google asks an IP for verification** — its "unusual traffic" page, a CAPTCHA, a JavaScript
check, or any answer that is not Google Maps' normal data — **that IP is done for the run**: nothing more is sent from
it, and the run goes on from another IP of Apify's datacenter proxy. It never solves, bypasses or replays a challenge.
When every IP the run can use has been refused, the rows left are free `blocked` rows, and the run still finishes
cleanly with what it geocoded.

### Limits

- Up to 100,000 rows per run (lines and dataset items together). The run geocodes up to about 2.8 addresses a second
  (10,000 in about an hour); a point takes two requests (the address at the point, then the lookup that completes its
  postcode and country), so points go at about half that speed. The default timeout of 12 hours covers 100,000
  addresses; a run near its timeout stops starting lookups and finishes cleanly, saying which rows were left.
- Results are Google Maps' results, not an official Geocoding API's: a text that reads as a search (`pizza Austin`)
  gives its first result and `candidates: 5`. A business Google offers for a text it cannot place, one that carries
  none of the text's words, is a free `not_found` row, not a guess you pay for.
- Google leaves the country out of `formattedAddress` when it is the run's country (`countryCode` is always there).
- A point at sea or in a desert names no address: a free `not_found` row.
- No phone, website, rating, reviews or hours (the Actors above do those).

### Is it legal?

It reads public Google Maps data — addresses and coordinates that anyone sees on the map — without logging in. The
addresses you geocode may be personal data (a customer's home address): handle them and the results as the laws that
apply to you require (for example GDPR), and use the data in line with Google's terms.

This Actor is not affiliated with, endorsed by or sponsored by Google. Google and Google Maps are trademarks of
Google LLC.

# Actor input Schema

## `addresses` (type: `array`):

One per line. An address, a postcode, a city or a place name is put on the map (address to latitude and longitude); a position is reverse geocoded to the street address there, written <code>latitude, longitude</code> (<code>41.8781, -87.6298</code>, or with a space: <code>48.15 11.5</code>), with hemispheres (<code>40.7484° N, 73.9857° W</code>, <code>40°44'54.4"N 73°59'08.4"W</code>, as Google Maps shows a point), or as a Google Maps link to a place, a search or a point. A line copied from a spreadsheet keeps its cells as address parts. Write an address as you would in Google Maps, with its city and country, or set the country below. Each line is one row, in this order; a line repeated in the run is geocoded and charged once. Up to 100,000 rows per run, together with the dataset below.

## `datasetId` (type: `string`):

Pick the dataset of another run or an imported list (a CRM export, a lead list) and every item is geocoded. Without a field named below, an item's address is its full-address field, or its address, street, city, state, zip and country fields joined; an item with only <code>lat</code>/<code>lng</code> (or a <code>location</code> object holding them) is reverse geocoded. Each row keeps the whole item in <code>item</code>. Only the dataset you pick here can be read.

## `addressField` (type: `string`):

The field of each dataset item to geocode, as a dotted path (<code>address</code>, <code>contact.fullAddress</code>): a text (an address or <code>latitude, longitude</code>) or an object with <code>lat</code> and <code>lng</code>. Leave empty to read the item's address fields as described above.

## `country` (type: `string`):

Optional two-letter code (<code>us</code>, <code>gb</code> or <code>uk</code>, <code>de</code>…; any case). Google answers for that country, and its name is added to every address that does not name it already: a bare <code>10001</code> or <code>Springfield</code> becomes <code>10001, United States</code>, found as the New York postcode and the city instead of nothing and a museum. Leave empty for lists that span countries.

## `language` (type: `string`):

The language of the addresses and names Google gives back (<code>en</code>, <code>de</code>, <code>es</code>, <code>pt-BR</code>, <code>es-419</code>…; any case). Empty: <code>en</code>.

## Actor input object example

```json
{
  "addresses": [
    "1600 Amphitheatre Parkway, Mountain View, CA 94043",
    "Friedrichstraße 43, 10117 Berlin",
    "10 Downing Street, London",
    "41.8781, -87.6298"
  ],
  "language": "en"
}
```

# Actor output Schema

## `rows` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "addresses": [
        "1600 Amphitheatre Parkway, Mountain View, CA 94043",
        "Friedrichstraße 43, 10117 Berlin",
        "10 Downing Street, London",
        "41.8781, -87.6298"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("steadyscrape/google-maps-geocoding-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "addresses": [
        "1600 Amphitheatre Parkway, Mountain View, CA 94043",
        "Friedrichstraße 43, 10117 Berlin",
        "10 Downing Street, London",
        "41.8781, -87.6298",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("steadyscrape/google-maps-geocoding-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "addresses": [
    "1600 Amphitheatre Parkway, Mountain View, CA 94043",
    "Friedrichstraße 43, 10117 Berlin",
    "10 Downing Street, London",
    "41.8781, -87.6298"
  ]
}' |
apify call steadyscrape/google-maps-geocoding-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,steadyscrape/google-maps-geocoding-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/xT6a5bif0GklTETnH/builds/tdRUoJ2aXST5d8K4C/openapi.json
