GET
/api/v4/locations-by-ids按 ID 获取地点
在一次请求中返回指定的一组地点 ID 对应的完整地点信息。
参数
查询
| 名称 | 类型 | 必填 | 描述 | 默认值 |
|---|---|---|---|---|
| ids | string | 必填 | JSON-encoded array of base64 location IDs, e.g. `["TG9jYXRpb246MTgwMDI4OQ=="]`. URL-encode the value. | — |
响应
200Array of full location objects, one per resolved ID. Unknown IDs are omitted.
{ "data": { "getLocationsByIds": [ { "id": "TG9jYXRpb246MTgwMDI4OQ==", "databaseId": 1800289, "accountId": 12345, "storeId": null, "name": "Jenny Home", "archived": false, "archivedAt": null, "street": "600 Congress Ave, Suite 200", "city": "Austin", "stateIso": "TX", "postalCode": "78701", "countryIso": "US", "countryCode": "1", "latitude": "30.2711286", "longitude": "-97.7436995", "phone": "5125550142", "additionalPhones": [], "bizUrl": null, "hideAddress": false, "categoryId": 15, "subCategoryId": 1432, "subCategoryName": "Restaurants", "additionalCategoryIds": [], "description": "This is a standalone duplex house. A comfortable, private residence located in the Bouldin Creek neighborhood of Austin, offering spacious duplex living with easy access to the surrounding South Congress area and downtown Austin.", "contentPreferredLanguage": "ENGLISH", "businessHours": [], "moreHours": [], "package": "PREMIUM", "planId": 3797, "planName": "Launch", "temporarilyClosed": false, "ownerName": null, "ownerEmail": null, "paymentMethods": [], "locationPhotos": [], "isRestaurant": true, "voiceStatus": 3, "yearOfIncorporation": null, "placeActionLinks": [ { "placeActionType": "FOOD_ORDERING", "uri": "https://order.example.com", "isPreferred": true, "name": "locations/1944.../placeActionLinks/54ada85bc246058a", "submissionStatus": "success", "submissionMessage": "Already up to date on Google.", "lastSubmittedAt": "2026-07-08T12:14:36Z" } ], "discoveredPlaceActionLinks": [ { "placeActionType": "APPOINTMENT", "uri": "https://book.example.com", "isPreferred": false, "name": "locations/1944.../placeActionLinks/abc123", "providerType": "MERCHANT", "isEditable": true } ] } ] }}401Unauthenticated, missing or invalid API key.
429Rate limit exceeded. Retry after the `Retry-After` header value.
在一次请求中获取指定的一组 ID 对应的完整地点详情,开销远低于为每个地点分别执行一次 GET。活跃和已归档的地点均可查询。请将这些 ID 作为 JSON 编码的数组传入 ids 查询参数,并对其进行 URL 编码。
使用场景:补全来自 webhook 或作业的一批 ID 对应的地点信息。当您收到一份地点 ID 列表(来自您自己的存储、webhook 载荷,或逐页遍历地点列表的结果)时,可一次性查询所有 ID 对应的地点:?ids=["TG9jYXRpb246MTgwMDI4OQ==","TG9jYXRpb246MTgwMDI5MA=="]。您账户中不存在的 ID 会直接从数组中省略,不会报错,因此请将返回数量与请求数量比较,以发现失效的 ID。
注意:查询参数键为 ids。此端点从 ids 参数中读取 JSON 数组。与循环逐个查询相比,将多个 ID 合并到一次调用中可让您远低于速率限制;如果您确实并行发起这些查询,请在收到 429 时遵循 Retry-After 响应头的指示。
每个地点都会返回 placeActionLinks(Listings API 管理的 Google 操作链接)和 discoveredPlaceActionLinks(直接在商家的 Google 商家资料中发现但尚未纳入管理的链接)。请参阅地点操作链接指南。
Request
curl -X GET 'https://listingsapi.com/api/v4/locations-by-ids?ids=<ids>' \ -H "Authorization: API $LISTINGSAPI_KEY"