Apple Maps API endpoint
Returns Apple Maps typeahead suggestions for a partial query near a coordinate: query completions, matching businesses (resolved to the same place summary the search endpoint returns, with the place ID the place endpoint takes), and addresses.
/apple-maps/autocompleteQuery parameters:
query (required) — partial search text, e.g. blue bot.latitude (required) — center latitude the suggestions are biased to, e.g. 37.7749.longitude (required) — center longitude, e.g. -122.4194.span (optional) — viewport size in degrees around the center. Defaults to 0.05; minimum 0.001, maximum 5.lang (optional) — display language as a BCP 47 tag, e.g. en-US, ja-JP. Defaults to en-US.country (optional) — two-letter ISO 3166-1 code, e.g. US. Defaults to US.type is query (a search completion; pass query to /apple-maps/search), business (a specific place, resolved to the same summary /apple-maps/search returns, with place_id for /apple-maps/place), address, or another lowercased Apple suggestion type. A query Apple has no suggestions for returns an empty suggestions list.
Response includes query and suggestions[], each with type, text, detail (Apple's second line, e.g. Search Nearby or the address), query (query type only), id and place_id (business type), latitude, longitude, and place (business type; the search-result place summary).
| Field | Filled in, of 8 checked | Values in the sample |
|---|---|---|
| type | 8 | business (6), query (2) |
| text | 8 | Blue Bottle Coffee in all 8 |
| detail | 8 | “Search Nearby” and 7 other values |
| query | 2 | “Blue Bottle Coffee” |
| place_id | 6 | |
| id | 6 | |
| latitude | 6 | |
| longitude | 6 | |
| place | 6 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| query | string | Yes | Partial search text to complete | blue bot | |
| latitude | number | Yes | Center latitude the suggestions are biased to | 37.7749 | |
| longitude | number | Yes | Center longitude the suggestions are biased to | -122.4194 | |
| span | number | No | 0 | Viewport size in degrees around the center. Defaults to 0.05; minimum 0.001, maximum 5. | 0.05 |
| lang | string | No | en-US | Display language as a BCP 47 tag. Defaults to en-US. | en-US |
| country | string | No | US | Two-letter ISO 3166-1 country code. Defaults to US. | US |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/apple-maps/autocomplete?query=blue+bot&latitude=37.7749&longitude=-122.4194&lang=en&country=us" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"query": "blue bot",
"suggestions": [
{
"type": "query",
"text": "Blue Bottle Coffee",
"detail": "Search Nearby",
"query": "Blue Bottle Coffee"
},
{
"type": "business",
"text": "Blue Bottle Coffee",
"detail": "66 Mint St, San Francisco, CA 94103, United States",
"place_id": "I8A3B1C2D4E5F6071",
"id": "13662822354918264874",
"latitude": 37.7739334,
"longitude": -122.4186249,
"place": {
"id": "13662822354918264874",
"place_id": "I8A3B1C2D4E5F6071",
"url": "https://maps.apple.com/place?place-id=I8A3B1C2D4E5F6071",
"name": "Blue Bottle Coffee",
"type": "BUSINESS",
"category": "Coffee Shop",
"latitude": 37.7739334,
"longitude": -122.4186249,
"address": "66 Mint St, San Francisco, CA 94103, United States",
"rating": 4.5,
"rating_max": 5,
"rating_count": 1873,
"price_level": 2,
"price_max": 4,
"price_symbol": "$"
}
}
]
}
}Request schema
No body schema
Response schema
#/definitions/applemaps.autocompleteResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | Code is the HTTP status code or a custom code used to indicate the result of the request @example 200 | |||
| data | applemaps.AutocompleteResponse | No | ||||
| data.query | string | No | ||||
| data.suggestions | array | No | ||||
| data.suggestions[].detail | string | No | ||||
| data.suggestions[].id | string | No | ||||
| data.suggestions[].latitude | number | No | ||||
| data.suggestions[].longitude | number | No | ||||
| data.suggestions[].place | applemaps.Place | No | Place record, 38 fields: address, address_info, alt_phones, categories, category, hours, hours_type, id, latitude, longitude, name, phone and 11 more. Described under Apple Maps Search API. | |||
| data.suggestions[].place_id | string | No | ||||
| data.suggestions[].query | string | No | ||||
| data.suggestions[].text | string | No | ||||
| data.suggestions[].type | string | No | ||||
| msg | unknown | No | Msg is the message that describes the result of the request @example "Request successful" |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 503 | Service Unavailable | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/apple-maps/autocomplete?query=blue+bot&latitude=37.7749&longitude=-122.4194&lang=en&country=us" \
-H "x-api-key: $CRAWLORA_API_KEY"