# Google Geocoding Scraper - Address to Lat Long & Reverse (`topapi/google-geocoding-scraper`) Actor

Geocode addresses to latitude/longitude and coordinates to addresses with Google Maps, in bulk. Place ID, formatted address, street/city/postcode/state/country, plus code, time zone, match score. No Google API key. Monitor mode for growing lists.

- **URL**: https://apify.com/topapi/google-geocoding-scraper.md
- **Developed by:** [Top Api](https://apify.com/topapi) (community)
- **Categories:** Developer tools, Integrations, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.10 / 1,000 geocoded 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/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

### What does Google Geocoding Scraper do?

**Google Geocoding Scraper** geocodes addresses with [Google Maps](https://www.google.com/maps): paste a list of addresses, place names or postal codes and get latitude and longitude back, or paste coordinates and get the address at that spot. One row per input with the formatted address, Google Place ID, street, city, postal code, state and country, plus code and time zone. Built for data teams, logistics planners and real-estate analysts who need a whole list geocoded at once, without a Google Cloud API key.

Google Geocoding Scraper - Google Maps Geocoder - Address to Lat Long - Reverse Geocoding - Google Geocoding API alternative

<a href="https://console.apify.com/actors/2dwGBphXPSWtkrkUN"><img src="https://api.apify.com/v2/key-value-stores/qNQ9zP0xaj2yxGeMY/records/google-geocoding-scraper-source.png" alt="Google Maps answering an address search: the address Google Geocoding Scraper turns into a row with coordinates" style="width:70%"></a>

- **Forward and reverse geocoding in one run:** addresses to coordinates and coordinates to addresses, side by side in one dataset.
- **Google's own answer:** the same place Google Maps shows for the address, with its Place ID (the `ChIJ…` ID other Google tools accept), plus code and time zone.
- **Address parts ready for a spreadsheet:** street number, street, neighborhood, city, postal code, state, state code, country and country code as separate columns.
- **A match score on every row:** `matchScore` (0-100) and `partialMatch` show when Google corrected a typo or could not find the house number, so you can review the doubtful ones.
- **No Google API key, no login, no cookies:** paste the list and click Start.
- **Repeated inputs merged:** the same address twice in a list is geocoded once and returned as one row listing both input IDs.
- **Monitor mode for growing lists:** a scheduled run geocodes only the addresses it has not geocoded before.
- **Export anywhere:** JSON, CSV, Excel, XML; schedules, webhooks, Make, Zapier, n8n, Google Sheets, and the Apify API or MCP server for AI agents.

### What data can you get from Google Maps geocoding?

<table>
<tr>
<td>📍 Latitude and longitude (`latitude`, `longitude`)</td>
<td>🏠 Formatted address (`formattedAddress`)</td>
<td>🆔 Google Place ID (`placeId`)</td>
</tr>
<tr>
<td>🔢 Street number (`streetNumber`)</td>
<td>🛣️ Street (`route`, `streetAddress`)</td>
<td>🏘️ Neighborhood (`neighborhood`)</td>
</tr>
<tr>
<td>🏙️ City (`city`)</td>
<td>📮 Postal code (`postalCode`)</td>
<td>🗺️ State and state code (`state`, `stateCode`)</td>
</tr>
<tr>
<td>🌍 Country and ISO code (`country`, `countryCode`)</td>
<td>➕ Plus code (`plusCode`, `plusCodeCompound`)</td>
<td>🕒 Time zone and current UTC offset (`timezone`, `utcOffset`)</td>
</tr>
<tr>
<td>🏷️ Google place type and categories (`placeType`, `categories`)</td>
<td>🎯 Result level (`resultLevel`: address, street, postal code, area, place)</td>
<td>✅ Match score and partial-match flag (`matchScore`, `partialMatch`)</td>
</tr>
<tr>
<td>📏 Distance from your coordinate (`distanceMeters`, reverse)</td>
<td>🔗 Google Maps link, feature ID and CID</td>
<td>☎️ Phone, website, rating, review count (Business details add-on)</td>
</tr>
</table>

### How to geocode addresses with Google Geocoding Scraper

1. [Create a free Apify account](https://console.apify.com/sign-up) - $5 of monthly credit, no card needed.
2. Open [Google Geocoding Scraper](https://apify.com/topapi/google-geocoding-scraper) and click **Try for free**.
3. Paste addresses into **Addresses (forward geocoding)**, one per line, and/or coordinates into **Coordinates (reverse geocoding)** as `lat,lng`.
4. Optional: set **Region bias** to the country most of your addresses are in.
5. Click **Start**. About 9 inputs are geocoded per second at the default concurrency.
6. Open the **Storage** tab and **Export** as CSV, Excel or JSON.

### ⬇️ Google Geocoding Scraper input

| Parameter | Type | Description |
|---|---|---|
| `addresses` | Array of strings | Addresses, place names or postal codes to turn into coordinates. A `lat,lng` line here is reverse geocoded. Prefill: 2 addresses. |
| `latlngs` | Array of strings | Coordinates to turn into addresses, as `lat,lng` (decimal degrees, WGS84). Prefill: 1 coordinate. |
| `records` | Array of objects | For APIs: `{"id": "...", "address": "..."}` or `{"id": "...", "lat": 0, "lng": 0}`; your `id` comes back as `inputId`. |
| `language` | Select | Language of addresses, names and country names. Default `en`. |
| `region` | Select | Country to favour for ambiguous inputs (a bias, not a filter). Default `us`. |
| `bounds` | String | Favour results inside a box: `swLat,swLng\|neLat,neLng`. |
| `countryCodes` | Multi-select | Keep only results in these countries; Google's next candidate inside them is used if the first is outside. |
| `resultTypes` | Multi-select | Keep only `address`, `street`, `postal_code`, `area` and/or `place` results. |
| `minMatchScore` | Integer 0-100 | Drop results scoring lower. Default `0`. |
| `includePlaceDetails` | Boolean | Add phone, website, rating and review count when the result is a business or landmark (add-on event). Default `false`. |
| `monitorMode` | Boolean | Skip inputs geocoded in earlier runs. Default `false`. |
| `monitorStoreName` | String | Named store that remembers them. Default `google-geocoding-monitor`. |
| `recheckAfterDays` | Integer | In monitor mode, geocode an input again after this many days. `0` = never. |
| `maxResults` | Integer | Stop after this many delivered rows; `0` = every input. Form prefill `100`. |
| `maxAlternatives` | Integer 0-10 | Also list other candidates in an `alternatives` array. Default `0`. |
| `includeUnavailable` | Boolean | Also write status rows for no-match, invalid, filtered or failed inputs. Default `false`. |
| `compact` | Boolean | Core fields only, for AI agents and spreadsheets. Default `false`. |
| `proxyConfiguration` | Proxy | Default: direct requests, switching to Apify Proxy automatically if Google refuses them. |
| `maxConcurrency` | Integer 1-50 | Lookups in parallel. Default `10`. |

#### Input JSON

```json
{
  "addresses": [
    "1600 Amphitheatre Parkway, Mountain View, CA",
    "Eiffel Tower, Paris, France",
    "SW1A 1AA"
  ],
  "latlngs": ["40.6782,-73.9442"],
  "records": [{ "id": "cust-1", "address": "350 5th Ave, New York, NY 10118" }],
  "region": "us",
  "maxAlternatives": 1
}
```

#### Put one complete address per line to geocode

Google answers best when the line carries the street, the city and the region or postal code: `2121 N Clark St, Chicago, IL 60614` rather than `2121 Clark`. Place names (`Sydney Opera House`), postal codes (`11968`, `SW1A 1AA`) and cities (`Toledo`) work too; `resultLevel` tells you which kind of place came back.

#### Use Region bias or Viewport bias for ambiguous names

`Toledo` resolves to Toledo, Ohio with region `us` and to Toledo, Spain with region `es`. For a smaller area, set `bounds`: `39.70,-89.80|40.10,-89.40` turns `Springfield` into Springfield, Illinois. Both are biases. To exclude other countries, use `countryCodes`.

#### Send coordinates as lat,lng

Latitude first, then longitude, in decimal degrees: `40.6782,-73.9442`. `(40.6782, -73.9442)` and `40.6782 -73.9442` are read too. A line that is not a coordinate is reported as `INVALID_REQUEST` (visible with `includeUnavailable`).

### ⬆️ Geocoding output

<a href="https://console.apify.com/actors/2dwGBphXPSWtkrkUN"><img src="https://api.apify.com/v2/key-value-stores/qNQ9zP0xaj2yxGeMY/records/google-geocoding-scraper-output.png" alt="Google Geocoding Scraper dataset: geocoded addresses with coordinates, Place IDs and address parts" style="width:70%"></a>

A forward row (real output, trimmed):

```json
{
  "inputId": "address-1",
  "query": "1600 Amphitheatre Parkway, Mountain View, CA",
  "mode": "forward",
  "status": "OK",
  "formattedAddress": "1600 Amphitheatre Pkwy, Mountain View, CA 94043",
  "latitude": 37.4224864,
  "longitude": -122.0855962,
  "resultLevel": "address",
  "placeType": "compound_building",
  "streetNumber": "1600",
  "route": "Amphitheatre Pkwy",
  "city": "Mountain View",
  "postalCode": "94043",
  "state": "California",
  "stateCode": "CA",
  "country": "United States",
  "countryCode": "US",
  "placeId": "ChIJiSSC8QK6j4AR98Thup8mqTc",
  "plusCode": "849VCWC7+XQ",
  "timezone": "America/Los_Angeles",
  "utcOffset": "-07:00",
  "matchScore": 100,
  "partialMatch": false
}
```

A reverse row adds `inputLatitude`, `inputLongitude`, `inputPlusCode` and `distanceMeters` (how far the returned address is from your coordinate):

```json
{
  "inputId": "latlng-1",
  "query": "41.9207928,-87.6373183",
  "mode": "reverse",
  "formattedAddress": "2121 N Clark St, Chicago, IL 60614",
  "streetNumber": "2121",
  "route": "N Clark St",
  "neighborhood": "Lincoln Park",
  "resultLevel": "address",
  "distanceMeters": 0,
  "inputPlusCode": "86HJW9C7+838",
  "matchScore": 100
}
```

#### Geocoding fields

Fill measured on a 90-input run on the Apify platform (70 forward inputs in 18 countries incl. 40 made-up house numbers, 20 coordinates in 13 countries; 89 rows).

| Field | Meaning | Filled |
|---|---|---:|
| `formattedAddress`, `latitude`, `longitude`, `placeId` | Google's address line, coordinates and Place ID | 100% |
| `plusCode`, `timezone`, `utcOffset` | Plus code of the result, IANA time zone, current offset | 100% |
| `resultLevel`, `matchScore`, `partialMatch` | Kind of result and how much of the input it accounts for | 100% |
| `placeType` | Google's type (`premise`, `locality`, `postal_code`, `museum`…) | 94% |
| `city` / `country`, `countryCode` | City / country | 97% / 99% |
| `postalCode` | Postal code | 88% |
| `state` / `stateCode` | State or region / short code (US, CA, AU, BR, MX) | 79% / 72% |
| `streetAddress` / `streetNumber` / `route` | Street line / house number / street | 72% / 60% / 67% |
| `neighborhood` | Neighborhood | 69% |
| `categories` | Google Maps labels (businesses, landmarks) | 31% |
| `plusCodeCompound` | Google's local plus code, when Google prints one | 13% |
| `distanceMeters`, `inputPlusCode` | Reverse rows only | 100% of reverse |
| `phone`, `website`, `rating`, `reviewsCount` | Business details add-on, businesses only | 12% / 20% / 13% / 8% |

Street fields are empty when the result is a city, region, postal code or a landmark without a street number, which is what Google returns for those inputs.

### Use cases for geocoded addresses

- 🚚 **Logistics and delivery planning:** turn order addresses into coordinates for routing and territory maps.
- 🏠 **Real estate and insurance:** geocode property lists, then add distance, flood-zone or school-district data by coordinate.
- 🧹 **CRM and data cleaning:** normalise free-text addresses into street, city, postal code and country columns; review rows with `partialMatch: true`.
- 📱 **Location analytics:** reverse geocode GPS pings into street, neighborhood, city and time zone.
- 🗺️ **Store locators and lead lists:** get the Place ID and plus code of every branch for Google Maps links and other Google tools.
- 🤖 **AI agents:** call it through MCP with `compact: true` to resolve "where is…" questions.

### How much does it cost to geocode addresses with Google Geocoding Scraper?

Google Geocoding Scraper is pay-per-event (the Pricing tab always shows the live rates):

| Event | Price | When it is charged |
|---|---:|---|
| `address-geocoded` | **$0.000095 per row** ($0.095 per 1,000) | Each geocoded input written to the dataset |
| `place-details` | **$0.0005 per row** | Only with Business details on, on rows that carry a phone, website or rating |

There is no start fee. Inputs Google cannot place, invalid coordinates, filtered results and repeated inputs do not produce a geocoded row.

| Inputs geocoded | Price |
|---:|---:|
| 10 | $0.00095 |
| 1,000 | $0.095 |
| 10,000 | $0.95 |
| 100,000 | $9.50 |

Speed measured on the platform: 90 inputs (70 addresses, 20 coordinates) in 10.6 seconds end to end at the default concurrency of 10; a single address in about 3 seconds.

### Integrations, API, scheduling & MCP

- **Schedules:** run Google Geocoding Scraper daily over a growing address list with `monitorMode` on, so only new addresses are geocoded.
- **Webhooks:** call a URL when a run finishes and load the rows into your database or CRM.
- **No-code:** Make, Zapier, n8n, Google Sheets, Airtable and Slack via [Apify integrations](https://docs.apify.com/integrations).
- **API:** start runs and read datasets with `apify-client` for [Python](https://apify.com/topapi/google-geocoding-scraper/api/python) or [JavaScript](https://apify.com/topapi/google-geocoding-scraper/api/javascript); the `records` input echoes your own IDs back as `inputId`.
- **MCP / AI agents:** connect Claude, Cursor or any MCP client through the [MCP tab](https://apify.com/topapi/google-geocoding-scraper/api/mcp).

### More TopApi scrapers

<table>
<tr>
<td>⭐ <a href="https://apify.com/topapi/google-maps-reviews-scraper">Google Maps Reviews Scraper</a></td>
<td>📊 <a href="https://apify.com/topapi/similarweb-scraper">Similarweb Scraper</a></td>
<td>💼 <a href="https://apify.com/topapi/indeed-jobs-scraper">Indeed Jobs Scraper</a></td>
</tr>
<tr>
<td>🛒 <a href="https://apify.com/topapi/facebook-marketplace-scraper">Facebook Marketplace Scraper</a></td>
<td>📰 <a href="https://apify.com/topapi/facebook-search-posts-scraper">Facebook Search Posts Scraper</a></td>
<td>📸 <a href="https://apify.com/topapi/instagram-scraper">Instagram Scraper</a></td>
</tr>
<tr>
<td>🎵 <a href="https://apify.com/topapi/tiktok-scraper">TikTok Scraper</a></td>
<td>🎬 <a href="https://apify.com/topapi/tiktok-video-scraper">TikTok Video Scraper</a></td>
<td>▶️ <a href="https://apify.com/topapi/youtube-shorts-scraper">YouTube Shorts Scraper</a></td>
</tr>
<tr>
<td>🐦 <a href="https://apify.com/topapi/x-profile-scraper">X Profile Scraper</a></td>
<td colspan="2">🧭 <a href="https://apify.com/topapi">All TopApi actors</a></td>
</tr>
</table>

### Geocoding limits & empty runs

- **One row per unique input:** the best match; up to 10 more candidates with `maxAlternatives`.
- **Reverse geocoding returns what Google Maps shows at that spot:** a building, a street or a business, with its address and its distance from your coordinate. On 20 test coordinates, 18 came back within 10 m and all 20 within 31 m; squares, parks and landmarks return the place or street, not a house number.
- **Not available from Google Maps' web answers:** Google's `location_type`, viewport and bounds boxes, `postcode_localities` and the raw component list come from Google's paid Geocoding API (which needs your own key) and are not in the rows.
- **Ambiguous inputs:** Google picks one answer; use `region`, `bounds` or `countryCodes`, and check `partialMatch`.
- **Empty dataset:** every input was a no-match, invalid, filtered or seen before in monitor mode. The run status message gives the counts; turn on `includeUnavailable` to get a status row per input.

### FAQ

#### How many addresses can Google Geocoding Scraper geocode in one run?

Up to 100,000 inputs per run. At the default concurrency a run geocodes about 9 inputs a second; raise `maxConcurrency` for large lists, or split very large lists into several runs.

#### Do I need a Google Maps API key to use Google Geocoding Scraper?

No. Google Geocoding Scraper reads the answers Google Maps gives any visitor; there is no Google Cloud project, key or billing account to set up.

#### Can Google Geocoding Scraper reverse geocode coordinates?

Yes. Put `lat,lng` lines into `latlngs` (or into `addresses`) and each row returns the address at that point, its address parts, the plus code of your coordinate and `distanceMeters`.

#### How accurate is Google Geocoding Scraper?

The coordinates, Place ID and address are Google's own: on test addresses they matched the Place IDs and coordinates Google's Geocoding API returns (for example the Eiffel Tower and postal code 11968). `matchScore` and `partialMatch` flag answers that do not account for your whole input, such as a missing house number or a corrected street name.

#### Can I schedule Google Geocoding Scraper for a growing address list?

Yes. Save a task with `monitorMode: true`, add it to **Schedules**, and each run geocodes only inputs it has not delivered before; `recheckAfterDays` refreshes old ones.

#### Can I use Google Geocoding Scraper with the Apify API?

Yes. Start runs and fetch datasets with `apify-client` for [Python](https://apify.com/topapi/google-geocoding-scraper/api/python) or [JavaScript](https://apify.com/topapi/google-geocoding-scraper/api/javascript). Send `records` with your own IDs and match rows on `inputId`.

#### Can I use Google Geocoding Scraper through an MCP server?

Yes. Open the [MCP tab](https://apify.com/topapi/google-geocoding-scraper/api/mcp), connect your MCP client, and ask for coordinates or addresses in plain language; `compact: true` keeps answers small.

#### Can I integrate Google Geocoding Scraper with Google Sheets, Make or Zapier?

Yes, through [Apify integrations](https://docs.apify.com/integrations) or a [webhook](https://docs.apify.com/integrations/webhooks) when a run finishes.

#### Why did Google Geocoding Scraper return no row for some of my addresses?

Google Maps found no place for the text, the coordinate was invalid, a filter removed the result, or the input was a repeat. Turn on `includeUnavailable` to see a `ZERO_RESULTS`, `INVALID_REQUEST`, `FILTERED` or `ERROR` row for each.

#### Your feedback

We keep improving Google Geocoding Scraper. Missing a field or found a wrong answer? Open an issue on the [Issues tab](https://apify.com/topapi/google-geocoding-scraper/issues/open).

# Actor input Schema

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

Addresses, place names or postal codes to turn into coordinates, one per line. E.g. "1600 Amphitheatre Parkway, Mountain View, CA", "Eiffel Tower, Paris", "SW1A 1AA". A "lat,lng" line here is reverse geocoded.

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

Coordinates to turn into addresses, as "lat,lng" one per line, e.g. "40.6782,-73.9442". Decimal degrees, WGS84 (what GPS and Google Maps use).

## `records` (type: `array`):

For API and spreadsheet pipelines: objects whose id comes back as inputId. E.g. \[{"id":"cust-1","address":"350 5th Ave, New York"},{"id":"gps-7","lat":51.5237,"lng":-0.1585}]

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

Language of the formatted address, names and country names. E.g. German writes "Frankreich" for France.

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

Country to favour when an input is ambiguous: "Toledo" is Toledo, Ohio with United States and Toledo, Spain with Spain. A bias, not a filter (use "Only these countries" to filter).

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

Favour results inside a box, as "swLat,swLng|neLat,neLng". E.g. "39.70,-89.80|40.10,-89.40" makes "Springfield" resolve to Springfield, Illinois. A bias, not a filter.

## `countryCodes` (type: `array`):

Keep only results in these countries; if Google's first candidate is outside them, its next candidate inside them is used. Empty = any country.

## `resultTypes` (type: `array`):

Keep only results of these kinds, e.g. only street addresses for a delivery list. Empty = all kinds.

## `minMatchScore` (type: `integer`):

Drop results whose matchScore (0-100) is lower. Forward: share of your input found in the result. Reverse: 100 at the coordinate, minus 1 per 2 m. E.g. 80. 0 = keep all.

## `includePlaceDetails` (type: `boolean`):

When the result is a business or landmark, add its phone, website, rating and review count. Charged as a separate "place-details" event, only on rows where at least one of them is present.

## `monitorMode` (type: `boolean`):

Skip inputs this actor already geocoded in earlier runs (remembered in a named key-value store). Pairs with a daily schedule over a list that grows.

## `monitorStoreName` (type: `string`):

Named key-value store that remembers geocoded inputs. Use one name per list, e.g. "crm-addresses".

## `recheckAfterDays` (type: `integer`):

In monitor mode, geocode an input again once its last delivery is older than this many days, e.g. 30 to refresh monthly. 0 = never again.

## `maxResults` (type: `integer`):

Stop after this many delivered rows. 0 = geocode every input (up to 100,000 per run). The form starts at 100 to keep a first test small.

## `maxAlternatives` (type: `integer`):

Also list up to this many other candidates Google returned, in an alternatives array on the same row (not extra rows). 0 = best match only.

## `includeUnavailable` (type: `boolean`):

Also write a free status row for inputs with no match, an invalid coordinate, a filtered result or a failed lookup (status ZERO_RESULTS, INVALID_REQUEST, FILTERED or ERROR).

## `compact` (type: `boolean`):

Core fields only (input id, query, address, coordinates, place ID, result level, country, match score), trimmed for AI agents, MCP and spreadsheets.

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

Default: direct requests, moving the run to Apify Proxy automatically if Google refuses them. Pick a proxy group to always use it.

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

Lookups in parallel. Raise it for big lists; 10 is a safe default.

## Actor input object example

```json
{
  "addresses": [
    "1600 Amphitheatre Parkway, Mountain View, CA",
    "Eiffel Tower, Paris, France"
  ],
  "latlngs": [
    "40.6782,-73.9442"
  ],
  "language": "en",
  "region": "us",
  "minMatchScore": 0,
  "includePlaceDetails": false,
  "monitorMode": false,
  "monitorStoreName": "google-geocoding-monitor",
  "recheckAfterDays": 0,
  "maxResults": 100,
  "maxAlternatives": 0,
  "includeUnavailable": false,
  "compact": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "maxConcurrency": 10
}
```

# Actor output Schema

## `results` (type: `string`):

One item per unique input: coordinates, formatted address, address parts, Place ID, plus code, time zone and match score.

## `summary` (type: `string`):

Counts of delivered, no-match, filtered, invalid and failed inputs, and the requests and egress used.

# 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",
        "Eiffel Tower, Paris, France"
    ],
    "latlngs": [
        "40.6782,-73.9442"
    ],
    "maxResults": 100,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("topapi/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",
        "Eiffel Tower, Paris, France",
    ],
    "latlngs": ["40.6782,-73.9442"],
    "maxResults": 100,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("topapi/google-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",
    "Eiffel Tower, Paris, France"
  ],
  "latlngs": [
    "40.6782,-73.9442"
  ],
  "maxResults": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call topapi/google-geocoding-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,topapi/google-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/2dwGBphXPSWtkrkUN/builds/RXhaNvI5Xvzf7x4sY/openapi.json
