Search Apple Maps API
Search Apple Maps places and addresses, near a point or in a box.
GET /v1/applemaps/searchBeta1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/applemaps/search?query=coffee&lat=37.7749&lng=-122.4194",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "displayMapRegion": { "southLat": 37.7550002373755, "westLng": -122.43825704790652, "northLat": 37.794453436508775, "eastLng": -122.40057351998983 }, "results": [ { "id": "I2BA4D86C2D108568", "center": { "lat": 37.7612939, "lng": -122.4163314 }, "displayMapRegion": { "southLat": 37.7567972, "westLng": -122.4220192, "northLat": 37.7657905, "eastLng": -122.4106435 }, "name": "Hedge Coffee", "formattedAddressLines": [ "434 Shotwell St", "San Francisco, CA 94110", "… 1 more" ], "administrativeArea": "California", "subAdministrativeArea": "San Francisco County", "administrativeAreaCode": "CA", "locality": "San Francisco", "postCode": "94110", "subLocality": "Central Mission", "thoroughfare": "Shotwell St", "subThoroughfare": "434", "fullThoroughfare": "434 Shotwell St", "dependentLocalities": [ "Central Mission", "Inner Mission", "… 1 more" ], "country": "United States", "countryCode": "US", "muid": "3144876398935573864", "mapsId": { "muid": "3144876398935573864", "resultProviderId": "9902" }, "telephone": "+14156039818", "urls": [ "https://www.hedge.coffee" ], "timezone": "America/Los_Angeles", "timezoneSecondsFromGmt": -28800, "placecardUrl": "https://maps.apple.com/place?q=Hedge%20Coffee&auid=3144876398935573864&address=434%20Shotwell%20St,%20San%20Francisco,%2…", "…": "2 more fields" }, { "id": "I64754EA2623BAA67", "attribution": { "vendorId": "com.yelp", "externalItemId": "uUC7v0xZAipL3IXX6LIzCg" }, "center": { "lat": 37.7733668, "lng": -122.4180221 }, "displayMapRegion": { "southLat": 37.7688701, "westLng": -122.4237108, "northLat": 37.7778634, "eastLng": -122.4123333 }, "name": "Doppio Coffee & Brunch", "formattedAddressLines": [ "1551 Mission St", "San Francisco, CA 94103", "… 1 more" ], "administrativeArea": "California", "subAdministrativeArea": "San Francisco County", "administrativeAreaCode": "CA", "locality": "San Francisco", "postCode": "94103", "subLocality": "Lafayette-Minna-Natoma", "thoroughfare": "Mission St", "subThoroughfare": "1551", "fullThoroughfare": "1551 Mission St", "dependentLocalities": [ "Lafayette-Minna-Natoma", "SOMA" ], "country": "United States", "countryCode": "US", "muid": "7238778435407686247", "mapsId": { "muid": "7238778435407686247", "resultProviderId": "9902" }, "telephone": "+16288677985", "urls": [ "https://doppiosf.com" ], "timezone": "America/Los_Angeles", "timezoneSecondsFromGmt": -28800, "…": "3 more fields" }, "… 8 more" ]}Parameters
| Name | Type | Description |
|---|---|---|
queryquery · required | string | What to look for. Example: coffee. |
bboxquery | string | west,south,east,north. Example: -74.02,40.70,-73.93,40.80. |
latquery | string | Latitude to search near. Example: 37.7749. |
lngquery | string | Longitude to search near. Example: -122.4194. |
strict_bboxquery | "true" | "false" | Only results inside bbox. One of true, false. |
languagequery | string | Language for names and addresses (default en-US). Example: fr-FR. |
Response fields
200 with a AppleMapsSearchResponse, in Apple Maps’s own JSON.
| Field | Type | Description |
|---|---|---|
displayMapRegion | AppleMapsRegion | |
results | AppleMapsPlace[] |
Status codes
| Status | Meaning |
|---|---|
200 | Matching places. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | No Apple Maps place by that id. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | Apple Maps is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
Apple Maps is a trademark of its owner. We are not affiliated with or endorsed by it.