API Hop

文件目錄

API Hop 文件

Google Maps 介面參考

搜尋 Google Maps 本地商家和地點,或依地點 ID 查詢。 地點評論 · 地點照片 · 照片中繼資料 · 商家動態 · 路線規劃 · 地點自動完成 · 貢獻者評論 · 本地搜尋 · 本地服務 · 活動搜尋.

並行上限

AI 與 Data 分別共用帳戶層級的並行名額,預設 5 AI / 2 Data,訂閱方案可調整上限。介面個別設定仍受類別總上限約束。達到任一上限回傳 HTTP 429;非同步任務執行結束前占用名額。

GET /v1/google-maps/search
預設並行上限: 2
GET /v1/google-maps/reviews
預設並行上限: 2
GET /v1/google-maps/photos
預設並行上限: 2
GET /v1/google-maps/photos/meta
預設並行上限: 2
GET /v1/google-maps/posts
預設並行上限: 2
GET /v1/google-maps/directions
預設並行上限: 2
GET /v1/google-maps/autocomplete
預設並行上限: 2
GET /v1/google-maps/contributor/reviews
預設並行上限: 2
GET /v1/google-maps/local
預設並行上限: 2
GET /v1/google-maps/local/services
預設並行上限: 2
GET /v1/google-maps/events
預設並行上限: 2

搜尋 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 秒,不自動重試或分頁,結算失敗不會重複呼叫上游。

http
Authorization: Bearer YOUR_API_KEY

請求參數

搜尋 Google Maps 地點

GET https://api.apihop.ai/v1/google-maps/search

欄位類型限制範例
querystring搜尋詞coffee shop
typestring模式; search, place-
place_idstring地點 IDChIJP8p2kJC1RIYR2qrGoXZtZCk
data_cidstring十進位 CID2982629209513831130
latitudenumber緯度; min: -90; max: 9030.2672
longitudenumber經度; min: -180; max: 180-97.7431
locationstring命名起點Austin, TX
zoomnumber縮放; min: 3; max: 3013.1
mnumber視圖高度(公尺); min: 1; max: 15028132-
startinteger結果偏移量; min: 0; max: 90071992547409910
glstring國家提示us
hlstring介面語言en-US
nearbyboolean附近偏好-
zero_traceboolean停用回應歸檔-
min_priceinteger最低價格; min: 0; max: 9007199254740991-
max_priceinteger最高價格; min: 0; max: 9007199254740991-
min_ratingnumber偏好最低評分; 2, 2.5, 3, 3.5, 4, 4.5-
open_statestring營業狀態; now, 24h-
open_on_daystring當地星期; mon, tue, wed, thu, fri, sat, sun-
open_at_hourinteger當地小時; min: 0; max: 23-

地點評論

GET https://api.apihop.ai/v1/google-maps/reviews

按地點查詢評論,可按排序、文字或主題篩選;文字與主題不能同時提供。

欄位類型限制範例
countrystring兩個字母的國家代碼,例如 us。; ^[A-Za-z]{2}$us
languagestring介面語言代碼,例如 en。en
devicestring來源頁面的裝置顯示類型。; desktop, mobile, tablet-
zero_traceboolean不封存回應產物;仍保留計費中繼資料。-
no_cacheboolean相容參數;true 和 false 均取得新資料並按成功請求正常計費。-
idstringGoogle place_id 或十六進位 data_id;不支援十進位 CID 和貢獻者 ID。; 必填-
next_page_tokenstring不透明續頁權杖,一小時後到期;沿用同一帳戶、參數、裝置和 limit。; maxLength: 24576-
limitinteger最多回傳的筆數;實際結果可能更少。; ≥ 1; ≤ 20-
sort_bystring評論排序方式;貢獻者評論僅支援 newest。; relevance, newest, rating_high, rating_low, qualityScore, newestFirst, ratingHigh, ratingLow-
querystring按文字篩選評論,最多 500 個 UTF-8 位元組;與 topic_id 互斥。; maxLength: 500-
topic_idstring結果篩選器中的評論主題 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 body
  • query: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwise
  • id: Google place_id OR hexadecimal data_id; NOT decimal CID, contributor ID
  • query XOR topic_id (optional)
  • next_page_token: opaque; expires after 1 hour; preserve account, parameters, device and limit; no automatic pagination
  • no_cache: true OR false both fetch fresh results; normal successful-request billing
bash
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 應從該地點的回傳結果複製。

欄位類型限制範例
countrystring兩個字母的國家代碼,例如 us。; ^[A-Za-z]{2}$us
languagestring介面語言代碼,例如 en。en
devicestring來源頁面的裝置顯示類型。; desktop, mobile, tablet-
zero_traceboolean不封存回應產物;仍保留計費中繼資料。-
no_cacheboolean相容參數;true 和 false 均取得新資料並按成功請求正常計費。-
idstring從對應 Google Maps 結果複製的地點識別碼。; 必填-
next_page_tokenstring不透明續頁權杖,一小時後到期;沿用同一帳戶、參數、裝置和 limit。; maxLength: 24576-
limitinteger最多回傳的筆數;實際結果可能更少。; ≥ 1; ≤ 100-
category_idstring從該地點圖庫複製的照片分類 ID。; maxLength: 1024; ^[A-Za-z0-9_-]+={0,2}$-
  • GET query only; unknown, repeated, empty, control-character values rejected; no request body
  • query: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwise
  • id: Google Maps place identifier; category_id: copy from this place gallery
  • next_page_token: opaque; expires after 1 hour; preserve account, parameters, device and limit; no automatic pagination
  • no_cache: true OR false both fetch fresh results; normal successful-request billing
bash
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。

欄位類型限制範例
countrystring兩個字母的國家代碼,例如 us。; ^[A-Za-z]{2}$us
languagestring介面語言代碼,例如 en。en
zero_traceboolean不封存回應產物;仍保留計費中繼資料。-
no_cacheboolean相容參數;true 和 false 均取得新資料並按成功請求正常計費。-
idstring從照片列表結果複製的照片 id,不是地點 data_id。; 必填; maxLength: 255; ^[A-Za-z0-9_-]{20,255}$-
  • GET query only; unknown, repeated, empty, control-character values rejected; no request body
  • query: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwise
  • id: copy photo ID from GET https://api.apihop.ai/v1/google-maps/photos results; NOT place data_id
  • no_cache: true OR false both fetch fresh results; normal successful-request billing
bash
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

讀取商家動態、活動詳情和連結;使用回傳的下一頁權杖繼續查詢。

欄位類型限制範例
countrystring兩個字母的國家代碼,例如 us。; ^[A-Za-z]{2}$us
languagestring介面語言代碼,例如 en。en
devicestring來源頁面的裝置顯示類型。; desktop, mobile, tablet-
zero_traceboolean不封存回應產物;仍保留計費中繼資料。-
no_cacheboolean相容參數;true 和 false 均取得新資料並按成功請求正常計費。-
idstring從對應 Google Maps 結果複製的地點識別碼。; 必填-
next_page_tokenstring不透明續頁權杖,一小時後到期;沿用同一帳戶、參數、裝置和 limit。; maxLength: 24576-
limitinteger最多回傳的筆數;實際結果可能更少。; ≥ 1; ≤ 100-
  • GET query only; unknown, repeated, empty, control-character values rejected; no request body
  • query: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwise
  • id: Google Maps place identifier
  • next_page_token: opaque; expires after 1 hour; preserve account, parameters, device and limit; no automatic pagination
  • no_cache: true OR false both fetch fresh results; normal successful-request billing
bash
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。

欄位類型限制範例
countrystring兩個字母的國家代碼,例如 us。; ^[A-Za-z]{2}$us
languagestring介面語言代碼,例如 en。en
devicestring來源頁面的裝置顯示類型。; desktop, mobile, tablet-
zero_traceboolean不封存回應產物;仍保留計費中繼資料。-
no_cacheboolean相容參數;true 和 false 均取得新資料並按成功請求正常計費。-
originstring路線起點地址;與 start_data_id、start_coords 三選一。-
destinationstring路線終點地址;與 end_data_id、end_coords 三選一。-
start_data_idstring起點的十六進位 Maps 地點資料 ID。; maxLength: 37; ^0x[0-9a-fA-F]{1,16}:0x[0-9a-fA-F]{1,16}$-
end_data_idstring終點的十六進位 Maps 地點資料 ID。; maxLength: 37; ^0x[0-9a-fA-F]{1,16}:0x[0-9a-fA-F]{1,16}$-
start_coordsstring起點座標,格式為 緯度,經度。; maxLength: 80-
end_coordsstring終點座標,格式為 緯度,經度。; maxLength: 80-
travel_modestring出行方式。; driving, walking, bicycling, transit, two-wheeler, best, flight-
distance_unitinteger距離單位:0 為公里,1 為英里。; ≥ 0; ≤ 1-
avoidstring要避開的道路類型,以逗號分隔。-
preferstring偏好的大眾運輸方式,以逗號分隔;需要 travel_mode=transit。-
routeinteger大眾運輸偏好:2 少轉乘,3 少步行,4 無障礙;需要 transit。; ≥ 2; ≤ 4-
timestring出發/到達時間:depart_at:秒級時間戳 或 arrive_by:秒級時間戳;last_available 僅用於大眾運輸。; maxLength: 40-
limitinteger最多回傳的筆數;實際結果可能更少。; ≥ 1; ≤ 100-
  • GET query only; unknown, repeated, empty, control-character values rejected; no request body
  • query: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwise
  • origin 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..180
  • prefer, route => travel_mode=transit; time=last_available => travel_mode=transit
  • time: depart_at:Unix_seconds OR arrive_by:Unix_seconds OR last_available
  • distance_unit: 0=km, 1=mi; route: 2=fewer transfers, 3=less walking, 4=wheelchair accessible
  • no_cache: true OR false both fetch fresh results; normal successful-request billing
bash
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 計數;座標須成對提供;視窗支援縮放或公尺高度。

欄位類型限制範例
countrystring兩個字母的國家代碼,例如 us。; ^[A-Za-z]{2}$us
languagestring介面語言代碼,例如 en。en
devicestring來源頁面的裝置顯示類型。; desktop, mobile, tablet-
zero_traceboolean不封存回應產物;仍保留計費中繼資料。-
no_cacheboolean相容參數;true 和 false 均取得新資料並按成功請求正常計費。-
querystring搜尋詞,最多 8192 個 UTF-8 位元組。; 必填-
latitudenumber緯度;必須同時提供 longitude。; ≥ -90; ≤ 90-
longitudenumber經度;必須同時提供 latitude。; ≥ -180; ≤ 180-
limitinteger最多回傳的筆數;實際結果可能更少。; ≥ 1; ≤ 100-
llstring地圖視窗:@緯度,經度,縮放z(3–21)或 @緯度,經度,高度m(正數公尺)。; maxLength: 120-
cpinteger搜尋詞中的游標位置,按 UTF-16 碼元計數,不能超過 query 長度。; ≥ 0-
  • GET query only; unknown, repeated, empty, control-character values rejected; no request body
  • query: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwise
  • latitude 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
bash
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 不可與續頁權杖同用。

欄位類型限制範例
countrystring兩個字母的國家代碼,例如 us。; ^[A-Za-z]{2}$us
languagestring介面語言代碼,例如 en。en
devicestring來源頁面的裝置顯示類型。; desktop, mobile, tablet-
zero_traceboolean不封存回應產物;仍保留計費中繼資料。-
no_cacheboolean相容參數;true 和 false 均取得新資料並按成功請求正常計費。-
idstringGoogle Maps 貢獻者資料網址中的數字貢獻者 ID。; 必填; ^[0-9]+$-
next_page_tokenstring不透明續頁權杖,一小時後到期;沿用同一帳戶、參數、裝置和 limit。; maxLength: 24576-
pageinteger從 1 開始的頁碼,僅遍歷前 200 筆評論;page 大於 1 時不能使用續頁權杖。; ≥ 1; ≤ 200-
limitinteger最多回傳的筆數;實際結果可能更少。; ≥ 1; ≤ 50-
sort_bystring評論排序方式;貢獻者評論僅支援 newest。; newest-
  • GET query only; unknown, repeated, empty, control-character values rejected; no request body
  • query: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwise
  • id: numeric Google Maps contributor profile ID
  • (page - 1) * limit < 200; page default: 1; limit default: 20
  • page > 1 => NOT next_page_token
  • next_page_token: opaque; expires after 1 hour; preserve account, parameters, device and limit; no automatic pagination
  • no_cache: true OR false both fetch fresh results; normal successful-request billing
bash
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 為結果偏移量。

欄位類型限制範例
countrystring兩個字母的國家代碼,例如 us。; ^[A-Za-z]{2}$us
languagestring介面語言代碼,例如 en。en
devicestring來源頁面的裝置顯示類型。; desktop, mobile, tablet-
zero_traceboolean不封存回應產物;仍保留計費中繼資料。-
no_cacheboolean相容參數;true 和 false 均取得新資料並按成功請求正常計費。-
querystring搜尋詞,最多 8192 個 UTF-8 位元組。; 必填-
locationstring地點名稱;與經緯度及 uule 互斥。-
latitudenumber緯度;必須同時提供 longitude。; ≥ -90; ≤ 90-
longitudenumber經度;必須同時提供 latitude。; ≥ -180; ≤ 180-
uulestring編碼後的 Google 地理位置;與 location 和經緯度互斥。; maxLength: 4096-
google_domainstringGoogle 國家網域,例如 google.com 或 google.co.uk。-
startinteger結果偏移量,從 0 開始。; ≥ 0; ≤ 1000-
tbsstringGoogle 原生篩選條件,以逗號分隔的 key:value 表示。; maxLength: 512-
ludocidstringGoogle 地點客戶識別碼 CID;保留為十進位字串。; ^[0-9]{1,20}$-
  • GET query only; unknown, repeated, empty, control-character values rejected; no request body
  • query: 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 CID
  • no_cache: true OR false both fetch fresh results; normal successful-request billing
bash
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 互斥。

欄位類型限制範例
countrystring兩個字母的國家代碼,例如 us。; ^[A-Za-z]{2}$us
languagestring介面語言代碼,例如 en。en
devicestring來源頁面的裝置顯示類型。; desktop, mobile, tablet-
zero_traceboolean不封存回應產物;仍保留計費中繼資料。-
no_cacheboolean相容參數;true 和 false 均取得新資料並按成功請求正常計費。-
querystring搜尋詞,最多 8192 個 UTF-8 位元組。; 必填-
locationstring地點名稱;與經緯度及 uule 互斥。-
limitinteger最多回傳的筆數;實際結果可能更少。; ≥ 1; ≤ 20-
data_cidstring城市或行政區的非零無符號 64 位十進位 CID,與 location 互斥。-
job_typestring搜尋服務類別中的具體服務,例如電工的 restore_power。; maxLength: 100; ^[a-z][a-z0-9_]{0,99}$-
cidstring結果中的服務商 CID,必須與 bid、pid 一起提供。; ^[0-9]{1,20}$-
bidstring結果中的服務商 BID,必須與 cid、pid 一起提供。; ^[0-9]{1,20}$-
pidstring結果中的服務商 PID,必須與 cid、bid 一起提供。; ^[0-9]{1,20}$-
  • GET query only; unknown, repeated, empty, control-character values rejected; no request body
  • query: UTF-8 bytes <= 8192 unless maxLength specifies otherwise; strings: length <= 8192 unless maxLength specifies otherwise
  • data_cid: geographic city/district CID, string 1..18446744073709551615; NOT location
  • cid AND bid AND pid (optional group); query selects the service category
  • no_cache: true OR false both fetch fresh results; normal successful-request billing
bash
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 三種定位方式互斥。

欄位類型限制範例
countrystring兩個字母的國家代碼,例如 us。; ^[A-Za-z]{2}$us
languagestring介面語言代碼,例如 en。en
devicestring來源頁面的裝置顯示類型。; desktop, mobile, tablet-
zero_traceboolean不封存回應產物;仍保留計費中繼資料。-
no_cacheboolean相容參數;true 和 false 均取得新資料並按成功請求正常計費。-
querystring搜尋詞,最多 8192 個 UTF-8 位元組。; 必填-
locationstring地點名稱;與經緯度及 uule 互斥。-
latitudenumber緯度;必須同時提供 longitude。; ≥ -90; ≤ 90-
longitudenumber經度;必須同時提供 latitude。; ≥ -180; ≤ 180-
uulestring編碼後的 Google 地理位置;與 location 和經緯度互斥。; maxLength: 4096-
  • GET query only; unknown, repeated, empty, control-character values rejected; no request body
  • query: 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
bash
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_hour
  • origin (optional): (latitude AND longitude) XOR location; m => (coordinates OR location) AND NOT zoom; nearby => coordinates OR location
  • min_price <= max_price; open_at_hour => open_on_day; open_state => NOT open_on_day AND NOT open_at_hour
  • gl: /^[a-z]{2}$/i; hl: /^[a-z]{2,3}(?:-[a-z]{2,4})?$/i; string.length <= 8192

範例

bash
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"
bash
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。

json
{
  "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": []
    }
  }
}