qstring必填
Place or category query, up to 500 characters.
https://api.sandbase.ai/v1/api/duckduckgo/mapsSearch DuckDuckGo Maps for places inside a viewport rectangle or around a center.
您的輸出會顯示在這裡
完成輸入後,點擊執行。
Returns a list of places that match a text query inside a map viewport. Each place has an address, coordinates, rating, opening hours, contact details and a few reviews. You pass q plus either lat and lon for a center point or bbox for a rectangle.
rating and reviews counts across businesses in one neighborhood.gps_coordinates.curl -X POST "https://api.sandbase.ai/v1/api/duckduckgo/maps" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"q": "coffee", "lat": 40.7128, "lon": -74.006}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
q | string | Yes | Place or category query, up to 500 characters. |
bbox | string | No | Viewport rectangle as 'top,left,bottom,right'. Required unless lat and lon are supplied. |
lat | number | No | Viewport center latitude. Requires lon. |
lon | number | No | Viewport center longitude. Requires lat. |
strict_bbox | boolean | No | Exclude results outside the requested bounds. Default true. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"local_results": [
{
"address": "38 Park Row, New York, NY 10038",
"address_lines": [
"38 Park Row"
],
"city": "New York",
"country_code": "US",
"gps_coordinates": {
"latitude": 40.7116156,
"longitude": -74.0066955
},
"images": [
"https://s3-media0.fl.yelpcdn.com/bphoto/kIWhmJh35yANG7qeEZsdvg/o.jpg"
],
"link": "https://www.yelp.com/biz/starbucks-new-york-395?adjust_creative=duckduckgo&utm_c…",
"menu": "https://www.starbucks.com/menu",
"open_state": "Closed",
"operating_hours": {
"fri": "05:00:00 - 20:00:00",
"mon": "05:00:00 - 20:00:00",
"sat": "05:00:00 - 20:00:00",
"sun": "05:00:00 - 20:00:00",
"thu": "05:00:00 - 20:00:00",
"tue": "05:00:00 - 20:00:00",
"wed": "05:00:00 - 20:00:00"
},
"phone": "+12126088073",
"phone_formatted": "+1 212 608 8073"
}
],
"search_metadata": {
"created_at": "2026-11-03 07:33:07 UTC",
"id": "581ba2bb9f7abc1700bb0841",
"processed_at": "2026-11-03 07:33:07 UTC",
"status": "Success",
"total_time_taken": 1.348
},
"search_parameters": {
"lat": 40.7128,
"lon": -74.006,
"q": "coffee",
"strict_bbox": true
}
}
| Field | Meaning |
|---|---|
local_results[].title | Name of the place. |
local_results[].type | Category label for the place, such as Coffee & tea. |
local_results[].address / local_results[].city / local_results[].country_code | Full street address, city and country code of the place. |
local_results[].gps_coordinates.latitude / local_results[].gps_coordinates.longitude | Coordinates of the place. |
local_results[].rating / local_results[].reviews | Average rating and the number of reviews behind it. |
local_results[].price / local_results[].price_score | Price level shown as dollar signs and as a number. |
local_results[].open_state | Whether the place is open or closed at the time of the call, for example Closed. |
local_results[].operating_hours | Opening and closing times for each weekday, keyed by mon to sun. |
local_results[].phone / local_results[].phone_formatted / local_results[].website | Phone number in raw and display form, and the place's website. |
local_results[].review_details[] | A few sample reviews with date, rating, snippet and the reviewer in user. |
local_results[].source[] | Map services that list this place, each with its own place_id. |
lat and lon together, or bbox as top,left,bottom,right. The search_parameters object in the response echoes the values used.strict_bbox defaults to true, so results outside the requested bounds are dropped.position gives the rank of each place in local_results.search_metadata.status for Success before reading the results.$0.00015 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
開始建置
具備統一驗證與用量追蹤的平台 API 端點。
curl -X POST "https://api.sandbase.ai/v1/api/duckduckgo/maps" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"q": "coffee",
"lat": 40.7128,
"lon": -74.006
}'請將您的 SandBase API 金鑰設定在伺服器環境中。請求使用 Bearer 驗證。
export SANDBASE_API_KEY="YOUR_API_KEY"請將金鑰保留在伺服器端,不要在瀏覽器程式碼中公開。
qstring必填Place or category query, up to 500 characters.
latnumberViewport center latitude. Requires lon.
lonnumberViewport center longitude. Requires lat.
bboxstringViewport rectangle as 'top,left,bottom,right'. Required unless lat and lon are supplied.
strict_bboxbooleanExclude results outside the requested bounds. Default true.
這是此 API 的已儲存範例回應;檢視時不會發出即時請求。
尚未發布已儲存回應。請在 Playground 中執行 API 以檢視其回應。
探索更多
| API | 價格 | 回應 |
|---|---|---|
DuckDuckGo Maps此 API DuckDuckGo | 每次呼叫 $0.00015 | 非同步 JSON |
DuckDuckGo | 每次呼叫 $0.01 | JSON |
DuckDuckGo | 每次呼叫 $0.01 | JSON |
DuckDuckGo | 每次呼叫 $0.015 | JSON |
DuckDuckGo | 每次呼叫 $0.015 | JSON |
DuckDuckGo | 每次呼叫 $0.01 | JSON |
問題
使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/duckduckgo/maps。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。
每次 $0.00015。每個組織每個 UTC 日可免費呼叫 100 次,並可在包含此 API 在內的所有符合資格之 SandBase APIs 間共用;超過後,每次呼叫都會從您的 SandBase 餘額中以此價格計費。沒有訂閱方案。
必要:q (string)。 選填:lat (number), lon (number), bbox (string) 和 strict_bbox (boolean)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。
JSON 結果。此端點為非同步執行,因此回應會告訴您如何取得完成的結果。 本頁的 README 包含範例回應。
不需要。DuckDuckGo Maps 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 DuckDuckGo API 存取權。