qstring
Search query. Required unless place_id is supplied.
https://api.sandbase.ai/v1/api/bing-maps/mapsSearch Bing Maps listings around a map center, or look up one entity by id.
Đầu ra của bạn sẽ xuất hiện ở đây
Hoàn tất đầu vào, rồi nhấp Run.
Returns Bing Maps business listings for a search query near a map center. Each listing has an address, phone number, coordinates, and open state. You can also pass a place_id to look up one entity.
gps_coordinates of each listing.open_state and open_hours.curl -X POST "https://api.sandbase.ai/v1/api/bing-maps/maps" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"q": "coffee", "cp": "47.6062~-122.3321"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
count | integer | No | Number of listings, 1-30. Default 30. |
cp | string | No | Map center as 'latitude |
first | integer | No | Listing offset, 0-10,000. Default 0. |
place_id | string | No | Native Bing Maps entity ID for a detail lookup. Required unless q is supplied. |
q | string | No | Search query. Required unless place_id is supplied. |
setlang | string | No | Interface language such as 'en-US'. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"local_results": [
{
"items": [
{
"address": "1912 Pike Pl, Seattle, WA 98101",
"entry_type": "Business",
"gps_coordinates": {
"latitude": 47.610069274902344,
"longitude": -122.34262084960938
},
"link": "https://www.bing.com/maps?q=Starbucks+Coffee+Company&filters=local_ypid%3A%22YNF…",
"open_hours": "Open until 8 PM",
"open_state": "Open",
"phone": "(206) 448-8762",
"place_id": "YNF9439D454244F274"
}
],
"title": "coffee"
}
],
"search_metadata": {
"created_at": "2026-11-03 07:28:13 UTC",
"id": "234da23691b61502af88f81d",
"processed_at": "2026-11-03 07:28:13 UTC",
"status": "Success",
"total_time_taken": 0.885
},
"search_parameters": {
"count": 30,
"cp": "47.6062~-122.3321",
"first": 0,
"q": "coffee"
}
}
| Field | Meaning |
|---|---|
local_results[].title | The search term that the group of listings answers, such as coffee. |
local_results[].items[].place_id | The Bing Maps entity ID of the listing. Pass it as place_id to look up that entity. |
local_results[].items[].address | Street address of the listing as one text line. |
local_results[].items[].entry_type | Type of entry, such as Business. |
local_results[].items[].gps_coordinates.latitude / local_results[].items[].gps_coordinates.longitude | Decimal degree coordinates of the listing. |
local_results[].items[].phone | Phone number of the listing, formatted as text. |
local_results[].items[].open_state / local_results[].items[].open_hours | Whether the listing is open (open_state) and a short text on closing time (open_hours), such as Open until 8 PM. |
local_results[].items[].link | Bing Maps URL that opens the listing. |
search_metadata.status | Shows Success when the search finished. |
search_parameters.count / search_parameters.first | The page size and offset the search used, with defaults filled in. |
q or place_id. A search uses q with cp as the map center in the form latitude~longitude, such as 47.6062~-122.3321.count (1-30, default 30) and first (offset, 0-10,000).place_id from local_results[].items[].place_id to run a detail lookup on one listing.search_metadata use the format 2026-11-03 07:28:13 UTC.$0.00015 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Bắt đầu xây dựng
Endpoint API của nền tảng với xác thực và theo dõi mức sử dụng thống nhất.
curl -X POST "https://api.sandbase.ai/v1/api/bing-maps/maps" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"q": "coffee",
"cp": "47.6062~-122.3321"
}'Đặt SandBase API key của bạn trong môi trường máy chủ. Các request sử dụng xác thực Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Giữ key của bạn trên máy chủ. Không hiển thị trong mã chạy trên trình duyệt.
qstringSearch query. Required unless place_id is supplied.
cpstringMap center as 'latitude~longitude', such as '47.6062~-122.3321'.
countintegerNumber of listings, 1-30. Default 30.
firstintegerListing offset, 0-10,000. Default 0.
setlangstringInterface language such as 'en-US'.
place_idstringNative Bing Maps entity ID for a detail lookup. Required unless q is supplied.
Đây là phản hồi ví dụ đã lưu cho API này; không có request thực nào được gửi khi xem mục này.
Chưa có phản hồi đã lưu nào được công bố. Chạy API trong Playground để xem phản hồi.
Khám phá thêm
| API | Giá | Phản hồi |
|---|---|---|
Bing Maps MapsAPI này Bing Maps | $0.00015 mỗi lần gọi | JSON bất đồng bộ |
Câu hỏi
Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/bing-maps/maps với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.
$0.00015 mỗi lần gọi. Mỗi tổ chức được 100 lần gọi miễn phí mỗi ngày UTC, dùng chung cho các API SandBase đủ điều kiện, bao gồm API này; sau đó mỗi lần gọi sẽ được tính theo mức giá này từ số dư SandBase của bạn. Không có gói đăng ký.
Không có tham số bắt buộc. Tùy chọn: q (string), cp (string), count (integer), first (integer), setlang (string) và place_id (string). Bảng Parameters và Playground trên trang này liệt kê mọi trường.
Kết quả JSON. Endpoint này chạy bất đồng bộ, nên phản hồi sẽ cho bạn biết cách lấy kết quả hoàn tất. README trên trang này có ví dụ phản hồi.
Không. Bing Maps Maps chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của Bing Maps.