Google 地图照片 API
获取某个 Google Maps 地点附带的照片。设置 engine=google_maps_photos,并传入从 Google Maps API 获取的 data_id,即可获得结构化的图片列表。
Endpoint
Section titled “Endpoint” GET https://serp.shifter.io/v1?engine=google_maps_photos&api_key=YOUR_API_KEY
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | string | yes | 您的 SERP API 密钥 |
engine | string | yes | 必须为 google_maps_photos |
data_id | string | yes | 该地点的 Google Maps 数据 ID |
category_id | string | no | 按类别 ID 筛选照片 |
hl | string | no | 界面语言代码 |
next_page_token | string | no | 来自上一次响应的令牌,用于获取下一页 |
Example request
Section titled “Example request”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();Example response
Section titled “Example response”{ "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..." }}