categoriesarray
Array of business category ids, e.g. ["pizza_restaurant"].
https://api.sandbase.ai/v1/api/dataforseo/v3/business_data/business_listings/search/liveSearch Google Maps business listings by category, name or location radius, with ratings, contact details and work hours.
您的輸出會顯示在這裡
完成輸入後,點擊執行。
Returns Google Maps business listings that match a category, a business name, or a location radius. You send category ids such as pizza_restaurant and a location_coordinate string in the form latitude,longitude,radius_km.
total_count.curl -X POST "https://api.sandbase.ai/v1/api/dataforseo/v3/business_data/business_listings/search/live" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"categories": ["pizza_restaurant"], "location_coordinate": "40.7128,-74.0060,10", "limit": 10}'
The result is returned in outputs[0].
| Name | Type | Required | Description |
|---|---|---|---|
categories | array | No | Array of business category ids, e.g. ["pizza_restaurant"]. |
limit | integer | No | Maximum number of listings to return. |
location_coordinate | string | No | "latitude,longitude,radius_km". |
title | string | No | Optional business name to match. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"status_code": 20000,
"status_message": "Ok.",
"tasks": [
{
"data": {
"api": "business_data",
"categories": [
"pizza_restaurant"
],
"function": "search",
"limit": 10,
"location_coordinate": "40.7128,-74.0060,10"
},
"id": "11030828-2190-0544-0000-95f7a3fdbe54",
"path": [
"v3"
],
"result": [
{
"count": 10,
"items": [
{
"additional_categories": [
"Bar"
],
"address": "70 Hudson St, Hoboken, NJ 07030",
"address_info": {
"address": "70 Hudson St",
"borough": null,
"city": "Hoboken",
"country_code": "US",
"region": "New Jersey",
"zip": "07030"
},
"attributes": {
"available_attributes": {
"accessibility": [
"has_wheelchair_accessible_entrance"
],
"amenities": [
"has_restroom_unisex"
],
"atmosphere": [
"feels_casual"
],
"children": [
"has_childrens_menu"
],
"crowd": [
"popular_with_students"
],
"dining_options": [
"serves_breakfast"
],
"highlights": [
"has_fast_service"
],
"offerings": [
"serves_alcohol"
]
},
"unavailable_attributes": {
"accessibility": [
"has_wheelchair_accessible_parking"
],
"planning": [
"accepts_reservations"
],
"service_options": [
"has_delivery"
]
}
},
"category": "Bar & grill",
"category_ids": [
"bar_and_grill"
],
"check_url": "https://www.google.com/maps?cid=10011767498971649037&hl=en&gl=US",
"cid": "10011767498971649037"
}
],
"offset": 0,
"offset_token": "eyJDdXJy…",
"total_count": 1627
}
],
"result_count": 1,
"status_code": 20000,
"status_message": "Ok.",
"time": "0.7087 sec."
}
],
"tasks_count": 1,
"tasks_error": 0,
"time": "0.7481 sec.",
"version": "0.1.20261022"
}
| Field | Meaning |
|---|---|
tasks[].result[].total_count | Number of listings that match the search. This can be larger than the number of items returned. |
tasks[].result[].count | Number of items returned in this response. |
tasks[].result[].items[].category / additional_categories | Main category name of the listing and a list of extra category names. |
tasks[].result[].items[].category_ids | Category ids for the listing. You can reuse them in the categories request parameter. |
tasks[].result[].items[].address | Full address as one string. |
tasks[].result[].items[].address_info | Address split into address, borough, city, region, zip and country_code. borough can be null. |
tasks[].result[].items[].attributes.available_attributes | Features the business has, grouped by topic such as accessibility, dining_options, offerings and service_options. |
tasks[].result[].items[].attributes.unavailable_attributes | Features the business does not have, grouped the same way. The value is null when none are listed. |
tasks[].result[].items[].cid | Google Maps customer id of the listing, as a string. |
tasks[].result[].items[].check_url | Google Maps link that opens the listing. |
tasks[].result[].offset_token | Token for the next page of results. |
limit to control how many listings come back. The example request used 10.offset set to 0 and an offset_token. Use the token to continue a long result list.category_ids values in the response. DataForSEO Business Listings Categories Aggregation shows how categories are grouped.cid or check_url to DataForSEO Google Business Listing Info for more detail on one business.Billed at the actual cost of each call, about $0.0156 for the request above. Failed calls are not charged.
開始建置
具備統一驗證與用量追蹤的平台 API 端點。
curl -X POST "https://api.sandbase.ai/v1/api/dataforseo/v3/business_data/business_listings/search/live" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"limit": 10,
"categories": [
"pizza_restaurant"
],
"location_coordinate": "40.7128,-74.0060,10"
}'請將您的 SandBase API 金鑰設定在伺服器環境中。請求使用 Bearer 驗證。
export SANDBASE_API_KEY="YOUR_API_KEY"請將金鑰保留在伺服器端,不要在瀏覽器程式碼中公開。
categoriesarrayArray of business category ids, e.g. ["pizza_restaurant"].
location_coordinatestring"latitude,longitude,radius_km".
limitintegerMaximum number of listings to return.
titlestringOptional business name to match.
這是此 API 的已儲存範例回應;檢視時不會發出即時請求。
尚未發布已儲存回應。請在 Playground 中執行 API 以檢視其回應。
探索更多
| API | 價格 | 回應 |
|---|---|---|
DataForSEO | 每次呼叫 $0.0156 起 | JSON |
DataForSEO | 每次呼叫 $0.0102 起 | JSON |
DataForSEO | 每次呼叫 $0.000724 起 | JSON |
DataForSEO | 每次呼叫 $0.004 | JSON |
DataForSEO | 每次呼叫 $0.00162 起 | JSON |
DataForSEO | 每次呼叫 $0.001105 起 | JSON |
問題
使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/dataforseo/v3/business_data/business_listings/search/live。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。
每次起 $0.0156,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。
不需要任何參數。 選填:categories (array), location_coordinate (string), limit (integer) 和 title (string)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。
在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。
不需要。DataForSEO Business Listings Search 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 DataForSEO API 存取權。