Sand AISand AI MAGI-2MAGI-2 artık SandBase'de: yerel sesli 1080p videoŞimdi deneyin

Baidu Maps Search

API dokümanları
https://api.sandbase.ai/v1/api/baidu/maps

Search places on Baidu Maps by keyword in a city or around coordinates, with name, address, category, rating, phone and coordinates.

Fiyat
$0.01USD / çağrı
Yöntem
POST
Yanıt
JSON
Parametreler
1 gerekli · 5 isteğe bağlı

Oynatma Alanı

Girdi
Parameter defines the search query. You can use anything that you would use in a regular Baidu Maps search: a type of place, a business, a brand, or a landmark (e.g., `咖啡` (coffee), `酒店` (hotels), `星巴克` (Starbucks), or `故宫` (the Forbidden City)). Without `c`, the query can include the city to search in (e.g., `上海 咖啡` for coffee in Shanghai).
Parameter defines the city to search in, with its Baidu Maps city code (e.g., `131` for Beijing, `289` for Shanghai, or `257` for Guangzhou). Head to the Baidu Maps cities page for the cities of China. Cities in other countries have codes too (e.g., `49872` for Paris): a search near their coordinates returns it in `search_information.city_code`. Without it, Baidu Maps searches in the city named in `q`, in China or abroad, or lists the cities with results in `cities`. With `lat` and `lon`, it searches in the city at the coordinates. With `lat` and `lon`, the city must be the one where the coord
Parameter defines the latitude to search near (e.g., `39.908776`). Results are the places near these coordinates, and their `distance` field says how far each one is. In China, including Hong Kong, Macau and Taiwan, Baidu Maps uses coordinates shifted a few hundred meters from GPS coordinates, like all maps of mainland China (a system called GCJ-02). Parameter is required when using `lon` parameter. `c` is optional with coordinates: without it, the city at the coordinates is used. If it's set, it must be the city where the coordinates are.
Parameter defines the longitude to search near (e.g., `116.39759`). Results are the places near these coordinates, and their `distance` field says how far each one is. In China, including Hong Kong, Macau and Taiwan, Baidu Maps uses coordinates shifted a few hundred meters from GPS coordinates, like all maps of mainland China (a system called GCJ-02). Parameter is required when using `lat` parameter. `c` is optional with coordinates: without it, the city at the coordinates is used. If it's set, it must be the city where the coordinates are.
Value is used to get results on a specific page. (e.g., `1` (default) is the first page of results, `2` is the 2nd page of results, `3` is the 3rd page of results, etc.). Baidu Maps returns up to 10 results per page.
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.
ÇıktıHazır

Çıktınız burada görünecek

Girdileri tamamlayın, ardından Çalıştır'a tıklayın.

API README

Baidu Maps Search

Search places on Baidu Maps by keyword in a city or around coordinates, with name, address, category, rating, phone and coordinates.

Request

curl -X POST "https://api.sandbase.ai/v1/api/baidu/maps" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q": "咖啡", "c": "131"}'

The result is returned in outputs[0].data as structured JSON.

Parameters

NameTypeRequiredDescription
qstringYesParameter defines the search query. You can use anything that you would use in a regular Baidu Maps search: a type of place, a business, a brand, or a landmark (e.g., 咖啡 (coffee), 酒店 (hotels), 星巴克 (Starbucks), or 故宫 (the Forbidden C
cstringNoParameter defines the city to search in, with its Baidu Maps city code (e.g., 131 for Beijing, 289 for Shanghai, or 257 for Guangzhou). Head to the Baidu Maps cities page for the cities of China. Cities in other countries have codes t
latstringNoParameter defines the latitude to search near (e.g., 39.908776). Results are the places near these coordinates, and their distance field says how far each one is. In China, including Hong Kong, Macau and Taiwan, Baidu Maps uses coordina
lonstringNoParameter defines the longitude to search near (e.g., 116.39759). Results are the places near these coordinates, and their distance field says how far each one is. In China, including Hong Kong, Macau and Taiwan, Baidu Maps uses coordin
pagestringNoValue is used to get results on a specific page. (e.g., 1 (default) is the first page of results, 2 is the 2nd page of results, 3 is the 3rd page of results, etc.). Baidu Maps returns up to 10 results per page.
json_restrictorstringNoParameter defines the fields you want to include in the output, reducing payload size for faster response. See the JSON Restrictor documentation for more details.

Pricing

$0.010 per successful call. Failed calls are not charged.

Daha fazlasını keşfedin

İlgili APIs

Tüm APIs
APIFiyatYanıt
Baidu$0.01 çağrı başınaJSON
Baidu$0.03 çağrı başınaJSON
Baidu$0.03 çağrı başınaJSON
Baidu$0.03 çağrı başınaJSON
Baidu$0.015 çağrı başınaJSON
Baidu$0.03 çağrı başınaJSON

Sorular

SSS

Baidu Maps Search API'sini nasıl kullanırım?

SandBase API anahtarınızı Authorization başlığında (Bearer) ve parametreleri JSON gövdesi olarak ile https://api.sandbase.ai/v1/api/baidu/maps adresine bir POST isteği gönderin. Ayrıca bu sayfadaki Playground’da kod yazmadan da deneyebilirsiniz.

Baidu Maps Search API'sinin fiyatı nedir?

çağrı başına $0.01, SandBase bakiyenizden tahsil edilir. Yalnızca yaptığınız çağrılar için ücretlendirilirsiniz; abonelik yoktur.

Baidu Maps Search API'si hangi parametreleri kabul eder?

Gerekli: q (string). İsteğe bağlı: c (string), lat (string), lon (string), page (string) ve json_restrictor (string). Parametreler tablosu ve bu sayfadaki Playground, tüm alanları listeler.

Baidu Maps Search API'si ne döndürür?

Aynı HTTP isteğinde döndürülen bir JSON yanıtı (senkron).

Bir Baidu geliştirici hesabına veya API anahtarına ihtiyacım var mı?

Hayır. Baidu Maps Search, SandBase üzerinden çalışır; bu nedenle tek bir SandBase API anahtarı bu uç noktayı ve katalogdaki diğer tüm API'leri ve modelleri kapsar. Baidu API erişimi için ayrıca başvuru yapmanız gerekmez.