API Hop 文件
Google Maps 介面參考
搜尋 Google Maps 本地商家和地點,或依地點 ID 查詢。 地點評論 · 地點照片 · 照片中繼資料 · 商家動態 · 路線規劃 · 地點自動完成 · 貢獻者評論 · 本地搜尋 · 本地服務 · 活動搜尋.
並行上限
AI 與 Data 分別共用帳戶層級的並行名額,預設 5 AI / 2 Data,訂閱方案可調整上限。介面個別設定仍受類別總上限約束。達到任一上限回傳 HTTP 429;非同步任務執行結束前占用名額。
GET /v1/google-maps/search GET /v1/google-maps/reviews GET /v1/google-maps/photos GET /v1/google-maps/photos/meta GET /v1/google-maps/posts GET /v1/google-maps/directions GET /v1/google-maps/autocomplete GET /v1/google-maps/contributor/reviews GET /v1/google-maps/local GET /v1/google-maps/local/services GET /v1/google-maps/events 搜尋 Google Maps 本地商家和地點,或依地點 ID 查詢。 地點評論 · 地點照片 · 照片中繼資料 · 商家動態 · 路線規劃 · 地點自動完成 · 貢獻者評論 · 本地搜尋 · 本地服務 · 活動搜尋.
- 搜尋 Google Maps 地點:
GET https://api.apihop.ai/v1/google-maps/search - 地點評論:
GET https://api.apihop.ai/v1/google-maps/reviews - 地點照片:
GET https://api.apihop.ai/v1/google-maps/photos - 照片中繼資料:
GET https://api.apihop.ai/v1/google-maps/photos/meta - 商家動態:
GET https://api.apihop.ai/v1/google-maps/posts - 路線規劃:
GET https://api.apihop.ai/v1/google-maps/directions - 地點自動完成:
GET https://api.apihop.ai/v1/google-maps/autocomplete - 貢獻者評論:
GET https://api.apihop.ai/v1/google-maps/contributor/reviews - 本地搜尋:
GET https://api.apihop.ai/v1/google-maps/local - 本地服務:
GET https://api.apihop.ai/v1/google-maps/local/services - 活動搜尋:
GET https://api.apihop.ai/v1/google-maps/events
驗證與計費
預設每次成功請求 $0.0003(300 credits)。 使用 API Hop API Key;可用性取決於已啟用閘道與金鑰權限。成功請求價格以目前目錄與帳戶為準,帳戶專屬價格優先。成功的空結果也會計費,失敗會釋放預留額度。逾時為 60 秒,不自動重試或分頁,結算失敗不會重複呼叫上游。
Authorization: Bearer YOUR_API_KEY請求參數
搜尋 Google Maps 地點
GET https://api.apihop.ai/v1/google-maps/search
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
query | string | 搜尋詞 | coffee shop |
type | string | 模式; search, place | - |
place_id | string | 地點 ID | ChIJP8p2kJC1RIYR2qrGoXZtZCk |
data_cid | string | 十進位 CID | 2982629209513831130 |
latitude | number | 緯度; min: -90; max: 90 | 30.2672 |
longitude | number | 經度; min: -180; max: 180 | -97.7431 |
location | string | 命名起點 | Austin, TX |
zoom | number | 縮放; min: 3; max: 30 | 13.1 |
m | number | 視圖高度(公尺); min: 1; max: 15028132 | - |
start | integer | 結果偏移量; min: 0; max: 9007199254740991 | 0 |
gl | string | 國家提示 | us |
hl | string | 介面語言 | en-US |
nearby | boolean | 附近偏好 | - |
zero_trace | boolean | 停用回應歸檔 | - |
min_price | integer | 最低價格; min: 0; max: 9007199254740991 | - |
max_price | integer | 最高價格; min: 0; max: 9007199254740991 | - |
min_rating | number | 偏好最低評分; 2, 2.5, 3, 3.5, 4, 4.5 | - |
open_state | string | 營業狀態; now, 24h | - |
open_on_day | string | 當地星期; mon, tue, wed, thu, fri, sat, sun | - |
open_at_hour | integer | 當地小時; min: 0; max: 23 | - |
地點評論
GET https://api.apihop.ai/v1/google-maps/reviews
按地點查詢評論,可按排序、文字或主題篩選;文字與主題不能同時提供。
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
country | string | 兩個字母的國家代碼,例如 us。; ^[A-Za-z]{2}$ | us |
language | string | 介面語言代碼,例如 en。 | en |
device | string | 來源頁面的裝置顯示類型。; desktop, mobile, tablet | - |
zero_trace | boolean | 不封存回應產物;仍保留計費中繼資料。 | - |
no_cache | boolean | 相容參數;true 和 false 均取得新資料並按成功請求正常計費。 | - |
id | string | Google place_id 或十六進位 data_id;不支援十進位 CID 和貢獻者 ID。; 必填 | - |
next_page_token | string | 不透明續頁權杖,一小時後到期;沿用同一帳戶、參數、裝置和 limit。; maxLength: 24576 | - |
limit | integer | 最多回傳的筆數;實際結果可能更少。; ≥ 1; ≤ 20 | - |
sort_by | string | 評論排序方式;貢獻者評論僅支援 newest。; relevance, newest, rating_high, rating_low, qualityScore, newestFirst, ratingHigh, ratingLow | - |
query | string | 按文字篩選評論,最多 500 個 UTF-8 位元組;與 topic_id 互斥。; maxLength: 500 | - |
topic_id | string | 結果篩選器中的評論主題 ID,與 query 互斥。; maxLength: 131; ^(?:[A-Za-z0-9_-]{1,128}|/[mg]/[A-Za-z0-9_-]{1,128})$ | - |
GET query only; unknown, repeated, empty, control-character values rejected; no request bodyquery: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwiseid: Google place_id OR hexadecimal data_id; NOT decimal CID, contributor IDquery XOR topic_id (optional)next_page_token: opaque; expires after 1 hour; preserve account, parameters, device and limit; no automatic paginationno_cache: true OR false both fetch fresh results; normal successful-request billing
curl --get "https://api.apihop.ai/v1/google-maps/reviews" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "id=ChIJM8w7rqS1RIYRhEz2-KuoqzE" \
--data-urlencode "limit=10"地點照片
GET https://api.apihop.ai/v1/google-maps/photos
讀取地點圖庫;下一頁權杖和分類 ID 應從該地點的回傳結果複製。
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
country | string | 兩個字母的國家代碼,例如 us。; ^[A-Za-z]{2}$ | us |
language | string | 介面語言代碼,例如 en。 | en |
device | string | 來源頁面的裝置顯示類型。; desktop, mobile, tablet | - |
zero_trace | boolean | 不封存回應產物;仍保留計費中繼資料。 | - |
no_cache | boolean | 相容參數;true 和 false 均取得新資料並按成功請求正常計費。 | - |
id | string | 從對應 Google Maps 結果複製的地點識別碼。; 必填 | - |
next_page_token | string | 不透明續頁權杖,一小時後到期;沿用同一帳戶、參數、裝置和 limit。; maxLength: 24576 | - |
limit | integer | 最多回傳的筆數;實際結果可能更少。; ≥ 1; ≤ 100 | - |
category_id | string | 從該地點圖庫複製的照片分類 ID。; maxLength: 1024; ^[A-Za-z0-9_-]+={0,2}$ | - |
GET query only; unknown, repeated, empty, control-character values rejected; no request bodyquery: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwiseid: Google Maps place identifier; category_id: copy from this place gallerynext_page_token: opaque; expires after 1 hour; preserve account, parameters, device and limit; no automatic paginationno_cache: true OR false both fetch fresh results; normal successful-request billing
curl --get "https://api.apihop.ai/v1/google-maps/photos" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "id=0x8644b5a4ae3bcc33:0x31aba8abf8f64c84" \
--data-urlencode "limit=10"照片中繼資料
GET https://api.apihop.ai/v1/google-maps/photos/meta
讀取單張照片的貢獻者、位置、日期和圖片中繼資料。請複製照片列表 results 中照片項目的 id 欄位,不要使用 data_id 地點識別碼。日期使用 YYYY-MM-DD。
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
country | string | 兩個字母的國家代碼,例如 us。; ^[A-Za-z]{2}$ | us |
language | string | 介面語言代碼,例如 en。 | en |
zero_trace | boolean | 不封存回應產物;仍保留計費中繼資料。 | - |
no_cache | boolean | 相容參數;true 和 false 均取得新資料並按成功請求正常計費。 | - |
id | string | 從照片列表結果複製的照片 id,不是地點 data_id。; 必填; maxLength: 255; ^[A-Za-z0-9_-]{20,255}$ | - |
GET query only; unknown, repeated, empty, control-character values rejected; no request bodyquery: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwiseid: copy photo ID from GET https://api.apihop.ai/v1/google-maps/photos results; NOT place data_idno_cache: true OR false both fetch fresh results; normal successful-request billing
curl --get "https://api.apihop.ai/v1/google-maps/photos/meta" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "id=AF1QipPFfVtTCFKV9n-uOBqTTOHuRemFBg0PWN7xdVxp"商家動態
GET https://api.apihop.ai/v1/google-maps/posts
讀取商家動態、活動詳情和連結;使用回傳的下一頁權杖繼續查詢。
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
country | string | 兩個字母的國家代碼,例如 us。; ^[A-Za-z]{2}$ | us |
language | string | 介面語言代碼,例如 en。 | en |
device | string | 來源頁面的裝置顯示類型。; desktop, mobile, tablet | - |
zero_trace | boolean | 不封存回應產物;仍保留計費中繼資料。 | - |
no_cache | boolean | 相容參數;true 和 false 均取得新資料並按成功請求正常計費。 | - |
id | string | 從對應 Google Maps 結果複製的地點識別碼。; 必填 | - |
next_page_token | string | 不透明續頁權杖,一小時後到期;沿用同一帳戶、參數、裝置和 limit。; maxLength: 24576 | - |
limit | integer | 最多回傳的筆數;實際結果可能更少。; ≥ 1; ≤ 100 | - |
GET query only; unknown, repeated, empty, control-character values rejected; no request bodyquery: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwiseid: Google Maps place identifiernext_page_token: opaque; expires after 1 hour; preserve account, parameters, device and limit; no automatic paginationno_cache: true OR false both fetch fresh results; normal successful-request billing
curl --get "https://api.apihop.ai/v1/google-maps/posts" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "id=0x8644b5a4ae3bcc33:0x31aba8abf8f64c84" \
--data-urlencode "limit=10"路線規劃
GET https://api.apihop.ai/v1/google-maps/directions
起點和終點各選擇地址、十六進位地點 ID 或座標中的一種表示。大眾運輸偏好 route、prefer 及 last_available 需要 travel_mode=transit。
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
country | string | 兩個字母的國家代碼,例如 us。; ^[A-Za-z]{2}$ | us |
language | string | 介面語言代碼,例如 en。 | en |
device | string | 來源頁面的裝置顯示類型。; desktop, mobile, tablet | - |
zero_trace | boolean | 不封存回應產物;仍保留計費中繼資料。 | - |
no_cache | boolean | 相容參數;true 和 false 均取得新資料並按成功請求正常計費。 | - |
origin | string | 路線起點地址;與 start_data_id、start_coords 三選一。 | - |
destination | string | 路線終點地址;與 end_data_id、end_coords 三選一。 | - |
start_data_id | string | 起點的十六進位 Maps 地點資料 ID。; maxLength: 37; ^0x[0-9a-fA-F]{1,16}:0x[0-9a-fA-F]{1,16}$ | - |
end_data_id | string | 終點的十六進位 Maps 地點資料 ID。; maxLength: 37; ^0x[0-9a-fA-F]{1,16}:0x[0-9a-fA-F]{1,16}$ | - |
start_coords | string | 起點座標,格式為 緯度,經度。; maxLength: 80 | - |
end_coords | string | 終點座標,格式為 緯度,經度。; maxLength: 80 | - |
travel_mode | string | 出行方式。; driving, walking, bicycling, transit, two-wheeler, best, flight | - |
distance_unit | integer | 距離單位:0 為公里,1 為英里。; ≥ 0; ≤ 1 | - |
avoid | string | 要避開的道路類型,以逗號分隔。 | - |
prefer | string | 偏好的大眾運輸方式,以逗號分隔;需要 travel_mode=transit。 | - |
route | integer | 大眾運輸偏好:2 少轉乘,3 少步行,4 無障礙;需要 transit。; ≥ 2; ≤ 4 | - |
time | string | 出發/到達時間:depart_at:秒級時間戳 或 arrive_by:秒級時間戳;last_available 僅用於大眾運輸。; maxLength: 40 | - |
limit | integer | 最多回傳的筆數;實際結果可能更少。; ≥ 1; ≤ 100 | - |
GET query only; unknown, repeated, empty, control-character values rejected; no request bodyquery: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwiseorigin XOR start_data_id XOR start_coords (required)destination XOR end_data_id XOR end_coords (required)start_coords, end_coords: latitude,longitude; latitude: -90..90; longitude: -180..180prefer, route => travel_mode=transit; time=last_available => travel_mode=transittime: depart_at:Unix_seconds OR arrive_by:Unix_seconds OR last_availabledistance_unit: 0=km, 1=mi; route: 2=fewer transfers, 3=less walking, 4=wheelchair accessibleno_cache: true OR false both fetch fresh results; normal successful-request billing
curl --get "https://api.apihop.ai/v1/google-maps/directions" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "origin=Austin, TX" \
--data-urlencode "destination=Dallas, TX" \
--data-urlencode "travel_mode=driving"地點自動完成
GET https://api.apihop.ai/v1/google-maps/autocomplete
回傳搜尋詞和地點建議。游標位置按 UTF-16 計數;座標須成對提供;視窗支援縮放或公尺高度。
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
country | string | 兩個字母的國家代碼,例如 us。; ^[A-Za-z]{2}$ | us |
language | string | 介面語言代碼,例如 en。 | en |
device | string | 來源頁面的裝置顯示類型。; desktop, mobile, tablet | - |
zero_trace | boolean | 不封存回應產物;仍保留計費中繼資料。 | - |
no_cache | boolean | 相容參數;true 和 false 均取得新資料並按成功請求正常計費。 | - |
query | string | 搜尋詞,最多 8192 個 UTF-8 位元組。; 必填 | - |
latitude | number | 緯度;必須同時提供 longitude。; ≥ -90; ≤ 90 | - |
longitude | number | 經度;必須同時提供 latitude。; ≥ -180; ≤ 180 | - |
limit | integer | 最多回傳的筆數;實際結果可能更少。; ≥ 1; ≤ 100 | - |
ll | string | 地圖視窗:@緯度,經度,縮放z(3–21)或 @緯度,經度,高度m(正數公尺)。; maxLength: 120 | - |
cp | integer | 搜尋詞中的游標位置,按 UTF-16 碼元計數,不能超過 query 長度。; ≥ 0 | - |
GET query only; unknown, repeated, empty, control-character values rejected; no request bodyquery: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwiselatitude AND longitude (optional)cp <= query.length (UTF-16)ll: @latitude,longitude,zoomz (3..21) OR @latitude,longitude,heightm (>0)no_cache: true OR false both fetch fresh results; normal successful-request billing
curl --get "https://api.apihop.ai/v1/google-maps/autocomplete" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=coffee in Austin" \
--data-urlencode "limit=5"貢獻者評論
GET https://api.apihop.ai/v1/google-maps/contributor/reviews
按貢獻者 ID 讀取最新排序的前 200 筆評論。page 預設 1,limit 預設 20;大於 1 的 page 不可與續頁權杖同用。
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
country | string | 兩個字母的國家代碼,例如 us。; ^[A-Za-z]{2}$ | us |
language | string | 介面語言代碼,例如 en。 | en |
device | string | 來源頁面的裝置顯示類型。; desktop, mobile, tablet | - |
zero_trace | boolean | 不封存回應產物;仍保留計費中繼資料。 | - |
no_cache | boolean | 相容參數;true 和 false 均取得新資料並按成功請求正常計費。 | - |
id | string | Google Maps 貢獻者資料網址中的數字貢獻者 ID。; 必填; ^[0-9]+$ | - |
next_page_token | string | 不透明續頁權杖,一小時後到期;沿用同一帳戶、參數、裝置和 limit。; maxLength: 24576 | - |
page | integer | 從 1 開始的頁碼,僅遍歷前 200 筆評論;page 大於 1 時不能使用續頁權杖。; ≥ 1; ≤ 200 | - |
limit | integer | 最多回傳的筆數;實際結果可能更少。; ≥ 1; ≤ 50 | - |
sort_by | string | 評論排序方式;貢獻者評論僅支援 newest。; newest | - |
GET query only; unknown, repeated, empty, control-character values rejected; no request bodyquery: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwiseid: numeric Google Maps contributor profile ID(page - 1) * limit < 200; page default: 1; limit default: 20page > 1 => NOT next_page_tokennext_page_token: opaque; expires after 1 hour; preserve account, parameters, device and limit; no automatic paginationno_cache: true OR false both fetch fresh results; normal successful-request billing
curl --get "https://api.apihop.ai/v1/google-maps/contributor/reviews" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "id=112967280418127956987" \
--data-urlencode "limit=20"本地搜尋
GET https://api.apihop.ai/v1/google-maps/local
搜尋 Google 本地結果。命名地點、經緯度和 uule 三種定位方式互斥,start 為結果偏移量。
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
country | string | 兩個字母的國家代碼,例如 us。; ^[A-Za-z]{2}$ | us |
language | string | 介面語言代碼,例如 en。 | en |
device | string | 來源頁面的裝置顯示類型。; desktop, mobile, tablet | - |
zero_trace | boolean | 不封存回應產物;仍保留計費中繼資料。 | - |
no_cache | boolean | 相容參數;true 和 false 均取得新資料並按成功請求正常計費。 | - |
query | string | 搜尋詞,最多 8192 個 UTF-8 位元組。; 必填 | - |
location | string | 地點名稱;與經緯度及 uule 互斥。 | - |
latitude | number | 緯度;必須同時提供 longitude。; ≥ -90; ≤ 90 | - |
longitude | number | 經度;必須同時提供 latitude。; ≥ -180; ≤ 180 | - |
uule | string | 編碼後的 Google 地理位置;與 location 和經緯度互斥。; maxLength: 4096 | - |
google_domain | string | Google 國家網域,例如 google.com 或 google.co.uk。 | - |
start | integer | 結果偏移量,從 0 開始。; ≥ 0; ≤ 1000 | - |
tbs | string | Google 原生篩選條件,以逗號分隔的 key:value 表示。; maxLength: 512 | - |
ludocid | string | Google 地點客戶識別碼 CID;保留為十進位字串。; ^[0-9]{1,20}$ | - |
GET query only; unknown, repeated, empty, control-character values rejected; no request bodyquery: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwise(latitude AND longitude) XOR location XOR uule (optional)tbs: comma-separated key:value filters; ludocid: Google place CIDno_cache: true OR false both fetch fresh results; normal successful-request billing
curl --get "https://api.apihop.ai/v1/google-maps/local" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=coffee shop" \
--data-urlencode "location=Austin, TX"本地服務
GET https://api.apihop.ai/v1/google-maps/local/services
搜尋本地贊助服務商,或複製結果中的 cid、bid、pid 三個值一起查詢服務商資料;query 選擇服務類別。地理 data_cid 指城市或行政區,與 location 互斥。
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
country | string | 兩個字母的國家代碼,例如 us。; ^[A-Za-z]{2}$ | us |
language | string | 介面語言代碼,例如 en。 | en |
device | string | 來源頁面的裝置顯示類型。; desktop, mobile, tablet | - |
zero_trace | boolean | 不封存回應產物;仍保留計費中繼資料。 | - |
no_cache | boolean | 相容參數;true 和 false 均取得新資料並按成功請求正常計費。 | - |
query | string | 搜尋詞,最多 8192 個 UTF-8 位元組。; 必填 | - |
location | string | 地點名稱;與經緯度及 uule 互斥。 | - |
limit | integer | 最多回傳的筆數;實際結果可能更少。; ≥ 1; ≤ 20 | - |
data_cid | string | 城市或行政區的非零無符號 64 位十進位 CID,與 location 互斥。 | - |
job_type | string | 搜尋服務類別中的具體服務,例如電工的 restore_power。; maxLength: 100; ^[a-z][a-z0-9_]{0,99}$ | - |
cid | string | 結果中的服務商 CID,必須與 bid、pid 一起提供。; ^[0-9]{1,20}$ | - |
bid | string | 結果中的服務商 BID,必須與 cid、pid 一起提供。; ^[0-9]{1,20}$ | - |
pid | string | 結果中的服務商 PID,必須與 cid、bid 一起提供。; ^[0-9]{1,20}$ | - |
GET query only; unknown, repeated, empty, control-character values rejected; no request bodyquery: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwisedata_cid: geographic city/district CID, string 1..18446744073709551615; NOT locationcid AND bid AND pid (optional group); query selects the service categoryno_cache: true OR false both fetch fresh results; normal successful-request billing
curl --get "https://api.apihop.ai/v1/google-maps/local/services" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=plumber" \
--data-urlencode "location=Austin, TX" \
--data-urlencode "limit=5"活動搜尋
GET https://api.apihop.ai/v1/google-maps/events
搜尋 Google 活動卡片。命名地點、經緯度和 uule 三種定位方式互斥。
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
country | string | 兩個字母的國家代碼,例如 us。; ^[A-Za-z]{2}$ | us |
language | string | 介面語言代碼,例如 en。 | en |
device | string | 來源頁面的裝置顯示類型。; desktop, mobile, tablet | - |
zero_trace | boolean | 不封存回應產物;仍保留計費中繼資料。 | - |
no_cache | boolean | 相容參數;true 和 false 均取得新資料並按成功請求正常計費。 | - |
query | string | 搜尋詞,最多 8192 個 UTF-8 位元組。; 必填 | - |
location | string | 地點名稱;與經緯度及 uule 互斥。 | - |
latitude | number | 緯度;必須同時提供 longitude。; ≥ -90; ≤ 90 | - |
longitude | number | 經度;必須同時提供 latitude。; ≥ -180; ≤ 180 | - |
uule | string | 編碼後的 Google 地理位置;與 location 和經緯度互斥。; maxLength: 4096 | - |
GET query only; unknown, repeated, empty, control-character values rejected; no request bodyquery: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwise(latitude AND longitude) XOR location XOR uule (optional)no_cache: true OR false both fetch fresh results; normal successful-request billing
curl --get "https://api.apihop.ai/v1/google-maps/events" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=events in Austin" \
--data-urlencode "location=Austin, TX"驗證規則
僅接受查詢參數,拒絕本文、未知欄位、重複欄位、空值與控制字元。搜尋需要 query;place_id 與 data_cid 互斥並選擇地點查詢,type 必須相符。CID 保留為十進位字串。經緯度必須成對且與 location 互斥。m 與 nearby 需要起點,m 與 zoom 互斥。最低價格不得高於最高價格。open_state 與星期及小時互斥,小時需要星期,0 表示午夜。gl 是兩字母國碼,hl 是語言碼。無預設值,字串最多 8192 字元。start 通常為 0、20、40,每頁最多 20 筆。以下符號列出全部依賴與範圍。
search: query; type = search (optional)place: place_id XOR data_cid; type = place (optional); data_cid: 1..18446744073709551615 (string)place: NOT latitude, longitude, location, zoom, m, start, nearby, min_price, max_price, min_rating, open_state, open_on_day, open_at_hourorigin (optional): (latitude AND longitude) XOR location; m => (coordinates OR location) AND NOT zoom; nearby => coordinates OR locationmin_price <= max_price; open_at_hour => open_on_day; open_state => NOT open_on_day AND NOT open_at_hourgl: /^[a-z]{2}$/i; hl: /^[a-z]{2,3}(?:-[a-z]{2,4})?$/i; string.length <= 8192
範例
curl --get "https://api.apihop.ai/v1/google-maps/search" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=coffee shop" \
--data-urlencode "latitude=30.2672" \
--data-urlencode "longitude=-97.7431" \
--data-urlencode "start=0"curl --get "https://api.apihop.ai/v1/google-maps/search" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "data_cid=2982629209513831130" \
--data-urlencode "hl=en"回應與錯誤
保留原生 JSON 與數字精確度。以下是空成功結果範例。HTTP 400 輸入無效;401 需驗證;402 餘額不足;403 無權限或未開放;405 方法不支援;429 限流;5xx 服務錯誤。請保留 X-Request-Id。
{
"success": true,
"request_id": "example-request",
"data": {
"format": "json",
"content": {
"search_parameters": {
"q": "coffee shop",
"type": "maps",
"engine": "google_maps"
},
"has_next_page": false,
"results": []
}
}
}