# Google Geocoding Scraper - Most Comprehensive (`kaix/google-geocoding-scraper`) Actor

🔥 ~$0.1/1K addresses 🔥 Forward and reverse geocode with Google: addresses to coordinates, coordinates to addresses. Structured address components, place IDs, viewport, plus codes. No Google API key required.

- **URL**: https://apify.com/kaix/google-geocoding-scraper.md
- **Developed by:** [Kai](https://apify.com/kaix) (community)
- **Categories:** Developer tools, Integrations, AI
- **Stats:** 21 total users, 13 monthly users, 99.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.10 / 1,000 addresses

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Google Geocoding Scraper

Convert addresses into coordinates or coordinates into structured addresses. Each submitted query produces one Dataset record with a clear status, matched locations, normalized address components, place IDs, map bounds, and other location metadata when available.

### What you can do

- Forward geocode a street address, landmark, city, postal code, or place description.
- Reverse geocode a `latitude,longitude` coordinate into nearby addresses and geographic areas.
- Submit forward and reverse queries together in one run.
- Localize results with `language` and bias ambiguous forward searches with `region` or `bounds`.
- Restrict forward results with `components`.
- Restrict reverse results with `resultType` and `locationType`.
- Process batches concurrently while preserving one output record for every submitted query, including duplicates.

### Quick start

#### Addresses to coordinates

```json
{
  "addresses": [
    "Eiffel Tower, Paris, France",
    "Sydney Opera House, Australia"
  ]
}
```

#### Coordinates to addresses

```json
{
  "latlngs": [
    "40.748817,-73.985428",
    "48.8584,2.2945"
  ]
}
```

#### Forward and reverse queries in one run

```json
{
  "addresses": ["Times Square, New York"],
  "latlngs": ["34.0522,-118.2437"],
  "maxConcurrency": 20
}
```

### Input

At least one non-empty entry in `addresses` or `latlngs` is required. You can provide both arrays. Empty or whitespace-only queries are rejected.

| Field | Type | Default | Applies to | Description |
| --- | --- | --- | --- | --- |
| `addresses` | string\[] | — | Forward | Addresses or place descriptions to convert into coordinates. |
| `latlngs` | string\[] | — | Reverse | Coordinates written as `latitude,longitude`. |
| `language` | string | — | Both | Preferred result language, such as `en`, `ja`, `de`, or `fr`. |
| `region` | string | — | Forward | Country-code region bias, such as `us`, `uk`, or `de`. This influences ranking rather than imposing a strict country filter. |
| `components` | string | — | Forward | Component filter such as `country:US` or `country:US\|postal_code:94043`. |
| `bounds` | string | — | Forward | Viewport bias written as `southwestLat,southwestLng\|northeastLat,northeastLng`. |
| `resultType` | string | — | Reverse | Pipe-separated result types such as `street_address\|locality`. |
| `locationType` | string | — | Reverse | Pipe-separated precision filters such as `ROOFTOP\|APPROXIMATE`. |
| `maxConcurrency` | integer | `10` | Both | Number of queries processed in parallel, from 1 to 50. |
| `proxyConfiguration` | object | `{"useApifyProxy":true}` | Both | Uses Apify Proxy by default. Supply connection settings to customize or disable proxying. |

Forward-only settings are ignored for coordinate queries. Reverse-only settings are ignored for address queries. Shared settings apply to every compatible query in the run.

#### Localize and bias an ambiguous place

```json
{
  "addresses": ["Toledo"],
  "language": "es",
  "region": "es"
}
```

#### Restrict a forward query by country and viewport

```json
{
  "addresses": ["Springfield"],
  "components": "country:US",
  "bounds": "39.70,-89.80|40.10,-89.40"
}
```

#### Filter reverse results

```json
{
  "latlngs": ["37.4224764,-122.0842499"],
  "resultType": "street_address",
  "locationType": "ROOFTOP"
}
```

### Output

The default Dataset contains one record per submitted query. When concurrency is greater than 1, records can arrive in a different order from the input. Match them by `query` and `mode` rather than Dataset position.

| Field | Type | Description |
| --- | --- | --- |
| `query` | string | The submitted address or coordinate. |
| `mode` | string | `forward` or `reverse`. |
| `status` | string | `OK`, `ZERO_RESULTS`, `INVALID_REQUEST`, or `ERROR`. |
| `errorMessage` | string | A safe explanation for `INVALID_REQUEST` or `ERROR`; omitted otherwise. |
| `results` | array | Matched locations. Empty for every non-`OK` status. |

Each item in `results` can contain:

| Field | Type | Description |
| --- | --- | --- |
| `address` | string | Formatted address. |
| `placeId` | string | Place identifier supplied with the result. |
| `lat`, `lng` | number | Result coordinates. |
| `locationType` | string | `ROOFTOP`, `RANGE_INTERPOLATED`, `GEOMETRIC_CENTER`, or `APPROXIMATE`. |
| `types` | string\[] | Categories associated with the result. This array can be empty. |
| `components` | object | Normalized address parts plus the complete `raw` component array. |
| `viewport` | object | Recommended map viewport with `ne` and `sw` corners. |
| `bounds` | object | Precise bounds when available. |
| `partialMatch` | boolean | Whether the result is an approximate or partial match. |
| `plusCode` | object | Global and compound plus codes when available. |
| `postcodeLocalities` | string\[] | Localities associated with a postal code when available. |

`components` may include `streetNumber`, `street`, `city`, `state`, `stateCode`, `country`, `countryCode`, `postalCode`, `neighborhood`, `sublocality`, and `administrativeAreaLevel2`. Its `raw` array preserves every returned component as `longName`, `shortName`, and `types`.

#### Real output

The record below is the complete, unchanged Dataset item from a live run for `Eiffel Tower, Paris, France`.

```json
{
  "query": "Eiffel Tower, Paris, France",
  "mode": "forward",
  "status": "OK",
  "results": [
    {
      "address": "Av. Gustave Eiffel, 75007 Paris, France",
      "placeId": "ChIJLU7jZClu5kcR4PcOOO6p3I0",
      "lat": 48.85837009999999,
      "lng": 2.2944813,
      "locationType": "GEOMETRIC_CENTER",
      "types": [
        "establishment",
        "point_of_interest",
        "tourist_attraction"
      ],
      "components": {
        "street": "Avenue Gustave Eiffel",
        "city": "Paris",
        "state": "Île-de-France",
        "stateCode": "IDF",
        "country": "France",
        "countryCode": "FR",
        "postalCode": "75007",
        "administrativeAreaLevel2": "Paris",
        "raw": [
          {
            "longName": "Avenue Gustave Eiffel",
            "shortName": "Av. Gustave Eiffel",
            "types": ["route"]
          },
          {
            "longName": "Paris",
            "shortName": "Paris",
            "types": ["locality", "political"]
          },
          {
            "longName": "Paris",
            "shortName": "Paris",
            "types": ["administrative_area_level_2", "political"]
          },
          {
            "longName": "Île-de-France",
            "shortName": "IDF",
            "types": ["administrative_area_level_1", "political"]
          },
          {
            "longName": "France",
            "shortName": "FR",
            "types": ["country", "political"]
          },
          {
            "longName": "75007",
            "shortName": "75007",
            "types": ["postal_code"]
          }
        ]
      },
      "viewport": {
        "ne": {
          "lat": 48.8593817802915,
          "lng": 2.296314600000001
        },
        "sw": {
          "lat": 48.8566838197085,
          "lng": 2.2934008
        }
      },
      "partialMatch": false,
      "plusCode": {
        "globalCode": "8FW4V75V+8Q",
        "compoundCode": "V75V+8Q Paris, France"
      }
    }
  ]
}
```

### Status behavior

- `OK` means at least one complete result was saved.
- `ZERO_RESULTS` means the query was valid but no location matched.
- `INVALID_REQUEST` means the submitted coordinate or filter combination was not accepted.
- `ERROR` means that individual query could not be completed after retries. Other queries in the same batch continue.

If every query ends in `ERROR`, the records are still saved and the run is marked failed so automated workflows do not treat a fully broken batch as successful.

### Data and privacy

Submitted queries and result records are stored with the run in its input storage and default Dataset. Their retention follows the storage settings of the account running the Actor. Runtime logs contain counts, query position, mode, status, and result totals; they do not repeat submitted addresses or coordinates.

Location data can change over time. Region and bounds settings bias ranking, while component and reverse filters restrict eligible results. Reverse geocoding can return several records at different geographic levels, from a specific address to a city, region, or country.

# Actor input Schema

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

Addresses or place descriptions to geocode into coordinates.

## `latlngs` (type: `array`):

Coordinates as 'lat,lng' strings to reverse geocode into addresses.

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

Preferred result language, such as en, ja, de, or fr.

## `region` (type: `string`):

Country-code region bias for forward geocoding, such as us, uk, or de.

## `components` (type: `string`):

Component filter, e.g. 'country:US|postal\_code:94043'.

## `bounds` (type: `string`):

Viewport bias as 'swLat,swLng|neLat,neLng'.

## `resultType` (type: `string`):

Filter reverse results by type, e.g. 'street\_address|locality'.

## `locationType` (type: `string`):

Filter reverse results by location type, e.g. 'ROOFTOP|APPROXIMATE'.

## `maxConcurrency` (type: `integer`):

Maximum number of queries processed in parallel.

## `proxyConfiguration` (type: `object`):

Optional connection routing settings.

## Actor input object example

```json
{
  "addresses": [
    "1600 Amphitheatre Parkway, Mountain View, CA"
  ],
  "latlngs": [
    "37.4224764,-122.0842499"
  ],
  "maxConcurrency": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `records` (type: `string`):

Link to the saved geocoding records.

# 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"
    ],
    "latlngs": [
        "37.4224764,-122.0842499"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kaix/google-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"],
    "latlngs": ["37.4224764,-122.0842499"],
}

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

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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"
  ],
  "latlngs": [
    "37.4224764,-122.0842499"
  ]
}' |
apify call kaix/google-geocoding-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=kaix/google-geocoding-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

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