# Apple Maps Scraper - Places, Phones, Categories (`xtracto/apple-maps-scraper`) Actor

Search Apple Maps for places and get name, full address, phone, website, category and coordinates. Also geocodes addresses to coordinates and reverse-geocodes coordinates to addresses. Covers a whole area with an adaptive tile grid. HTTP-only, no account, no browser.

- **URL**: https://apify.com/xtracto/apple-maps-scraper.md
- **Developed by:** [Farhan Febrian Nauval](https://apify.com/xtracto) (community)
- **Categories:** Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## Apple Maps Scraper — Places, Phones, Categories

Search Apple Maps for places and get **name, full address, phone, website, category and
coordinates**. Also geocodes addresses to coordinates and reverse-geocodes coordinates back to
addresses. No account, no API key, no browser — HTTP only.

Apple Maps is a genuinely under-served source: at the time of writing there were **three**
Apple Maps actors in the whole Apify store, against 266 for Google Maps.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | enum | `search` | `search`, `geocode`, or `reverseGeocode` |
| `searchQueries` | array | — | *search*: what to look for (`coffee`, `dentist`) |
| `searchLocation` | string | — | *search*: one point, `lat,lng` |
| `boundingBox` | string | — | *search*: an area, `south,west,north,east` |
| `maxResultsPerQuery` | integer | `100` | Stop a query after this many unique places |
| `minTileSpan` | number | `0.01` | How small a tile may get before subdivision stops (≈1 km) |
| `maxDistanceKm` | integer | `25` | *search with a point*: discard results further away than this |
| `addresses` | array | — | *geocode*: addresses to resolve |
| `coordinates` | array | — | *reverseGeocode*: `lat,lng` pairs to resolve |
| `language` | string | `en-US` | Result language |

### Output

```jsonc
{
  "_input": "coffee",
  "_source": "S1-mapkit-search",
  "_scrapedAt": "2026-09-07T01:20:14Z",
  "_mode": "search",
  "_tileCenter": "40.7225,-74.0100",

  "name": "787 Coffee Co.",
  "address": "93 Worth St New York, NY 10013 United States",
  "telephone": "+19174441196",
  "urls": ["http://www.787coffee.com"],
  "poiCategory": "Cafe",
  "latitude": 40.7167,
  "longitude": -74.0053,
  "placecardUrl": "https://maps.apple.com/place?...",
  // …plus Apple's raw fields verbatim: muid, mapsId, locality,
  // administrativeArea, postCode, timezone, country, …
}
```

Failure rows carry `_error` and `_errorDetail` and no payload. In a London test, 91 of 92
places came back with a phone number.

### How it works

#### Anonymous auth, in two steps

`maps.apple.com` ships a MapKit JS JWT in a `<script data-token="…">` attribute. **That JWT is
not a bearer token** — sending it to the API returns 401 on every call. It has to be
exchanged at the MapKit start-up address for `authInfo.access_token`, which the API does
accept and which lives for 1800 seconds. The actor harvests, exchanges, caches, and re-harvests
on expiry or on a 401.

One trap worth naming: the bootstrap response's `apiBaseUrl` **already ends in `/v1/`**. Joining
another `/v1/` onto it turns every 401 into a 404, which reads like a dead address rather than
a path bug.

#### Covering an area: adaptive tiles

Apple returns **at most 10 results per call** and ignores `limit`, `offset` and `page` — all
three were tried and all three returned the same ten rows. Volume therefore comes from searching
more places, not deeper pages.

Given a `boundingBox`, the actor searches the box centre, and splits a tile into four only when
it is **both capped and still productive** — a full page of results *and* at least one place it
had not already seen. Capped alone is not a good enough reason: deep in a dense city every tile
returns ten places you already have, and splitting on that alone is pure spend. Requiring a new
place cut a London "hardware store" run from **253 API calls to 53** for the same 41 places.

#### Results that are not where you asked

`searchLocation` is a **hint to Apple, not a constraint**, and for some coordinates it answers
with places 60+ km away. This is reproducible and deterministic, not jitter — searching
`40.7150,-74.0060` returns Manhattan cafés, while `40.7150,-74.0000` returns cafés in New
Jersey, every time. Longitudes of `-74.0060`, `-73.9950` and `-74.0100` all behave; `-74.0000`
and `-74.0001` both drift. The trigger seems to be a coordinate landing exactly on a round
value, which midpoint arithmetic on a bounding box produces constantly.

Whatever the cause on Apple's side, a bounding box that does not bound anything is worse than
no bounding box, so every result is checked against the area actually requested and anything
outside is dropped and counted. The run log reports how many, e.g.
`dropped 9 result(s) Apple returned outside the requested area`.

### Known limits

| Limit | Detail |
|---|---|
| 10 results per call | Hard cap, no pagination. Area coverage costs calls |
| Location is a hint | See above — out-of-area results are filtered out, not returned |
| No reviews or ratings | Apple does not expose review content on this surface |
| No opening hours | Not present in the search payload |
| Token lifetime | 1800 s, refreshed automatically |

### Modes other than search

`geocode` turns an address into coordinates plus Apple's structured address; `reverseGeocode`
does the opposite. Both return the same row shape as `search`.

Note that `geocode` answers *something* for almost any input — a nonsense string still returns a
best-effort match rather than an error — so check `geocodeAccuracy` on the row before trusting
it.

# Actor input Schema

## `mode` (type: `string`):

search = find places by keyword near a point or across an area. geocode = address to coordinates. reverseGeocode = coordinates to address.

## `searchQueries` (type: `array`):

Mode 'search': what to look for, e.g. 'coffee', 'dentist', 'hardware store'. One query is run per entry.

## `searchLocation` (type: `string`):

Mode 'search': a single point to search around, e.g. '40.7128,-74.0060'. Use this OR boundingBox.

## `boundingBox` (type: `string`):

Mode 'search': cover a whole area instead of one point, e.g. '40.68,-74.05,40.75,-73.95'. The actor searches the tile centre and splits any tile that comes back full, so dense areas get more calls and sparse ones stay cheap.

## `maxResultsPerQuery` (type: `integer`):

Stop a query once this many unique places have been emitted. Apple caps each call at 10 results, so a higher number means more calls, not deeper pages.

## `minTileSpan` (type: `number`):

How small a tile may get before the actor stops subdividing it. Lower = more thorough and more expensive in a dense city. 0.01 degrees is roughly 1 km.

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

Mode 'geocode': addresses or place names to resolve to coordinates.

## `coordinates` (type: `array`):

Mode 'reverseGeocode': 'lat,lng' pairs to resolve to addresses.

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

Result language, e.g. en-US, de-DE, ja-JP.

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

Optional. Apple's endpoints did not block a bare IP during testing, but a proxy is advisable for sustained volume.

## `maxDistanceKm` (type: `integer`):

Mode 'search' with a single searchLocation: discard results further than this from the point. Apple treats the location as a hint and sometimes answers with places 60+ km away, so this is what makes 'near here' mean something. Ignored when boundingBox is used - the box itself is the filter.

## Actor input object example

```json
{
  "mode": "search",
  "searchQueries": [
    "coffee",
    "dentist"
  ],
  "searchLocation": "40.7128,-74.0060",
  "boundingBox": "40.68,-74.05,40.75,-73.95",
  "maxResultsPerQuery": 100,
  "minTileSpan": 0.01,
  "addresses": [
    "1 Infinite Loop, Cupertino"
  ],
  "coordinates": [
    "40.7128,-74.0060"
  ],
  "language": "en-US",
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "maxDistanceKm": 25
}
```

# Actor output Schema

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

Apple Maps places - one row per scraped record, stored in the run's default dataset.

# 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 = {
    "searchQueries": [
        "coffee"
    ],
    "searchLocation": "40.7580,-73.9855"
};

// Run the Actor and wait for it to finish
const run = await client.actor("xtracto/apple-maps-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 = {
    "searchQueries": ["coffee"],
    "searchLocation": "40.7580,-73.9855",
}

# Run the Actor and wait for it to finish
run = client.actor("xtracto/apple-maps-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 '{
  "searchQueries": [
    "coffee"
  ],
  "searchLocation": "40.7580,-73.9855"
}' |
apify call xtracto/apple-maps-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,xtracto/apple-maps-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/MmFbAJ32hIuoZG1kF/builds/MIyRHgsrsIiewZUOc/openapi.json
