Google Maps API
Extrahieren Sie Geschäfts- und Standortdaten aus Google Maps. Setzen Sie engine=google_maps und verwenden Sie type=search für Keyword-Listings oder type=place, um das vollständige Profil eines einzelnen Ortes abzurufen.
Endpoint
Abschnitt betitelt „Endpoint“ GET https://serp.shifter.io/v1?engine=google_maps&api_key=YOUR_API_KEY
Parameter
Abschnitt betitelt „Parameter“| Parameter | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
api_key | string | ja | Ihr SERP-API-Schlüssel |
engine | string | ja | Muss google_maps sein |
q | string | ja | Das Suchschlüsselwort |
type | string | ja | search oder place |
data | string | nein | Erforderlich, wenn type=place. Format: !4m5!3m4!1s + data_id + !8m2!3d + latitude + !4d + longitude |
device | string | nein | desktop, mobile oder tablet |
google_domain | string | nein | Zu verwendende Google-Domain |
hl | string | nein | Sprachcode der Oberfläche |
ll | string | nein | GPS-Koordinaten, Format @latitude,longitude,zoom |
Beispielanfrage
Abschnitt betitelt „Beispielanfrage“curl "https://serp.shifter.io/v1?engine=google_maps&api_key=YOUR_API_KEY&q=pizza&type=search"import requests
params = { "engine": "google_maps", "api_key": "YOUR_API_KEY", "q": "pizza", "type": "search",}r = requests.get("https://serp.shifter.io/v1", params=params)data = r.json()import fetch from 'node-fetch';
const url = 'https://serp.shifter.io/v1?' + new URLSearchParams({ engine: 'google_maps', api_key: 'YOUR_API_KEY', q: 'pizza', type: 'search',});const data = await (await fetch(url)).json();Beispielantwort
Abschnitt betitelt „Beispielantwort“{ "search_parameters": { "engine": "google_maps", "q": "pizza", "type": "search", "google_domain": "google.com" }, "places_results": [ { "position": 1, "title": "Joe's Pizza", "place_id": "ChIJ...", "data_id": "0x89c25994a1b6e4a3:0x...", "gps_coordinates": { "latitude": 40.730, "longitude": -73.998 }, "rating": 4.5, "reviews": 2431, "type": "Pizza restaurant", "address": "7 Carmine St, New York, NY 10014", "phone": "(212) 366-1182", "website": "https://www.joespizzanyc.com/" } ]}