querystringจำเป็น
Parameter defines the query you want to search. You can use anything that you would use in a regular Apple Maps search.
https://api.sandbase.ai/v1/api/apple-maps/searchSearch places on Apple Maps by keyword and location, with name, category, rating, address, phone, hours and coordinates.
เอาต์พุตของคุณจะแสดงที่นี่
กรอกอินพุตให้ครบ แล้วคลิก Run
Search places on Apple Maps by keyword and location, with name, category, rating, address, phone, hours and coordinates.
curl -X POST "https://api.sandbase.ai/v1/api/apple-maps/search" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "coffee", "location": "Austin, TX"}'
The result is returned in outputs[0].data as structured JSON.
| Name | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Parameter defines the query you want to search. You can use anything that you would use in a regular Apple Maps search. |
location | string | No | Parameter defines the GPS coordinates used for the search origin. (e.g. Austin, Texas, United States). Either a center or a location parameter is required. These parameters can't be used together. |
center | string | No | Parameter defines coordinates of the center point of the region you want to search within. You can pass the coordinates as latitude,longitude. (e.g. 30.324639,-97.7304611 for Austin, TX). Either a center or a location parameter is r |
span | string | No | Parameter defines width and height of the search region as latitudeDelta,longitudeDelta. Smaller delta values correspond to a higher zoom level. (defaults to 0.5,0.5). |
sort | string | No | Parameter defines the sorting refinement for the search. Can be one of the following: distance - Sort by distance from the center/location. ratings - Sort by result ratings. default - Sort by best match for your query. This is the |
toggles | string | No | Parameter defines the toggle options for the search. A comma separated list of toggle key values can be passed to this parameter. See the refinements.toggles object of the response to see available toggles for a search. |
multi_select_options | string | No | Parameter defines the options you want to filter by for multi select refinements. A comma separated list of toggle key values can be passed to this parameter. See the refinement.multi_select.<type>.options object of the response to see |
open_at | string | No | Parameter defines the time at which result locations should be open at. The value must be a Unix timestamp that is in the future, and no more than 24 hours from the current time. (e.g. 1794559756). |
locale | string | No | Parameter defines the locale the results should be localized for. Locales for Apple Maps are represented as <LANGUAGE>-<REGION>. (defaults to en-US, the locale for U.S. English). Head to Apple Maps Locales for the list of available loca |
json_restrictor | string | No | Parameter defines the fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details. |
$0.010 per successful call. Failed calls are not charged.
เริ่มสร้าง
เอ็นด์พอยต์ของ Platform API ที่มีการยืนยันตัวตนและการติดตามการใช้งานแบบรวมศูนย์
curl -X POST "https://api.sandbase.ai/v1/api/apple-maps/search" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "coffee",
"location": "Austin, TX"
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
querystringจำเป็นParameter defines the query you want to search. You can use anything that you would use in a regular Apple Maps search.
locationstringParameter defines the GPS coordinates used for the search origin. (e.g. `Austin, Texas, United States`). Either a `center` or a `location` parameter is required. These parameters can't be used together.
centerstringParameter defines coordinates of the center point of the region you want to search within. You can pass the coordinates as `latitude,longitude`. (e.g. `30.324639,-97.7304611` for Austin, TX). Either a `center` or a `location` parameter is required. These parameters can't be used together.
spanstringParameter defines width and height of the search region as `latitudeDelta,longitudeDelta`. Smaller delta values correspond to a higher zoom level. (defaults to `0.5,0.5`).
sortstringParameter defines the sorting refinement for the search. Can be one of the following: `distance` - Sort by distance from the `center`/`location`. `ratings` - Sort by result ratings. `default` - Sort by best match for your query. This is the default.
togglesstringParameter defines the toggle options for the search. A comma separated list of toggle `key` values can be passed to this parameter. See the `refinements.toggles` object of the response to see available toggles for a search.
multi_select_optionsstringParameter defines the options you want to filter by for multi select refinements. A comma separated list of toggle `key` values can be passed to this parameter. See the `refinement.multi_select.<type>.options` object of the response to see available multi select refinements for the search.
open_atstringParameter defines the time at which result locations should be open at. The value must be a Unix timestamp that is in the future, and no more than 24 hours from the current time. (e.g. `1794559756`).
localestringParameter defines the locale the results should be localized for. Locales for Apple Maps are represented as `<LANGUAGE>-<REGION>`. (defaults to `en-US`, the locale for U.S. English). Head to Apple Maps Locales for the list of available locales.
json_restrictorstringParameter defines the fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details.
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
ยังไม่มีการเผยแพร่การตอบกลับที่บันทึกไว้ ให้รัน API ใน Playground เพื่อดูการตอบกลับ
สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
Apple Maps SearchAPI นี้ Apple Maps | $0.01 ต่อการเรียก | JSON |
Apple Maps | $0.01 ต่อการเรียก | JSON |
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/apple-maps/search โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.01 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: query (string). ตัวเลือก: location (string), center (string), span (string), sort (string), toggles (string) และ multi_select_options (string) และอีก 3 รายการ ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส)
ไม่จำเป็น Apple Maps Search ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Apple Maps API แยกต่างหาก