Google マップ写真API
Google Mapsの場所に添付された写真を取得します。engine=google_maps_photos を設定し、Google Maps API から取得した data_id を渡すことで、画像の構造化リストを受け取ります。
エンドポイント
Section titled “エンドポイント” GET https://serp.shifter.io/v1?engine=google_maps_photos&api_key=YOUR_API_KEY
パラメーター
Section titled “パラメーター”| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
api_key | string | はい | あなたのSERP APIキー |
engine | string | はい | google_maps_photos を指定する必要があります |
data_id | string | はい | 場所のGoogle Mapsデータ ID |
category_id | string | いいえ | カテゴリIDで写真を絞り込みます |
hl | string | いいえ | インターフェース言語コード |
next_page_token | string | いいえ | 次のページを取得するための、前回のレスポンスから得たトークン |
リクエスト例
Section titled “リクエスト例”curl "https://serp.shifter.io/v1?engine=google_maps_photos&api_key=YOUR_API_KEY&data_id=0x4786c6ace45fe3bd:0x126d84580eedebe5"import requests
params = { "engine": "google_maps_photos", "api_key": "YOUR_API_KEY", "data_id": "0x4786c6ace45fe3bd:0x126d84580eedebe5",}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_photos', api_key: 'YOUR_API_KEY', data_id: '0x4786c6ace45fe3bd:0x126d84580eedebe5',});const data = await (await fetch(url)).json();レスポンス例
Section titled “レスポンス例”{ "search_parameters": { "engine": "google_maps_photos", "data_id": "0x4786c6ace45fe3bd:0x126d84580eedebe5" }, "photos": [ { "image": "https://lh5.googleusercontent.com/p/AF1QipN...", "thumbnail": "https://lh5.googleusercontent.com/p/AF1QipN...=w203-h114-k-no", "date": "2 months ago" } ], "serpapi_pagination": { "next_page_token": "CAESBkNnQUlBUQ..." }}