API Hop

文件目錄

API Hop 文件

Google Search 介面參考

Google Search: 網頁搜尋 · AI Mode 回答 · AI 摘要 · 輕量搜尋 · 搜尋建議 · 相關問題 · 論壇搜尋 · 搜尋廣告 · 來源資訊 · 廣告素材搜尋 · 廣告素材詳情.

並行上限

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

GET /v1/google-search/search
預設並行上限: 2
GET /v1/google-search/ai-mode
預設並行上限: 2
GET /v1/google-search/ai-overview
預設並行上限: 2
GET /v1/google-search/light
預設並行上限: 2
GET /v1/google-search/autocomplete
預設並行上限: 2
GET /v1/google-search/related-questions
預設並行上限: 2
GET /v1/google-search/forums
預設並行上限: 2
GET /v1/google-search/ads
預設並行上限: 2
GET /v1/google-search/about-this-result
預設並行上限: 2
GET /v1/google-search/ads-transparency
預設並行上限: 2
GET /v1/google-search/ads-transparency-details
預設並行上限: 2

Google Search: 網頁搜尋 · AI Mode 回答 · AI 摘要 · 輕量搜尋 · 搜尋建議 · 相關問題 · 論壇搜尋 · 搜尋廣告 · 來源資訊 · 廣告素材搜尋 · 廣告素材詳情.

驗證與計費

預設每次成功請求 $0.0003(300 credits)。 使用 API Hop API Key;可用性取決於已啟用閘道與金鑰權限。成功請求價格以目前目錄與帳戶為準,帳戶專屬價格優先。成功的空結果也會計費,失敗會釋放預留額度。逾時為 60 秒,不自動重試或分頁,結算失敗不會重複呼叫上游。

http
Authorization: Bearer YOUR_API_KEY

僅接受查詢參數,不接受本文。拒絕未知、重複、空白或無效值。僅支援 JSON,不自動分頁或重試。識別碼及續查權杖應從最新回應複製,範例僅供說明。每次完成的查詢分別計費,包括已確認的空結果或不可用結果。XOR 表示二選一,NOT 表示不得提供,=> 表示需要。

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

請求參數

欄位類型限制範例
urlstring完整 HTTPS 搜尋網址 (url); url: optional; maxLength: 32768https://www.google.com/search?q=coffee%20beans&hl=en&gl=us
device_osstring行動裝置作業系統 (device_os); device_os: optional; android, iosios
querystring搜尋詞; query: optional; minLength: 1; maxLength: 24576; UTF-8 bytes: 8192coffee
query_encodedboolean查詢詞已經 URL 編碼 (query_encoded); query_encoded: optionaltrue
uulestringGoogle 編碼位置,原樣傳遞;與 location、coordinates、radius 互斥。來源可能忽略不支援的位置。; uule: optional; minLength: 3; maxLength: 4096; ^[wa]\+(?:[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}$w+CAIQICIaQXVzdGluLFRleGFzLFVuaXRlZCBTdGF0ZXM
rewrite_linksboolean解析 HTML 中的轉址連結 (rewrite_links); rewrite_links: optionaltrue
zero_traceboolean不封存回應產物; zero_trace: optionaltrue
devicestring裝置; device: optional; mobile, tablet, desktopmobile
safestring結果篩選 (safe); safe: optional; active, offactive
color_schemestring頁面配色 (color_scheme); color_scheme: optional; light, darklight
ludocidstringGoogle 地點 CID,非零無符號 64 位十進位字串;保持字串以避免精度遺失。; ludocid: optional; maxLength: 20-
lsigstring本地搜尋結果中的地點簽章,用於選擇地圖或知識圖譜檢視。; lsig: optional; maxLength: 2048-
kgmidstring以 /m/ 或 /g/ 開頭的 Google 知識圖譜實體 ID;可能沿用該實體原有的搜尋情境。; kgmid: optional; maxLength: 131-
sistring選擇快取搜尋或知識圖譜分頁的 Google 原生權杖;可能沿用原查詢情境。; si: optional; maxLength: 8192-
ibpstringGoogle 頁面配置選擇器,例如 gwp;0,7 可展開地點知識圖譜。; ibp: optional; maxLength: 2048-
udsstring從 Google 篩選連結複製的原生搜尋篩選權杖。; uds: optional; maxLength: 8192-
pwsinteger0 要求關閉 Google 個人化,1 允許個人化;省略使用預設值。不會關閉地區、語言或裝置影響,也不依本服務帳戶個人化。; pws: optional; 0, 10
nfprinteger1 依原搜尋詞查詢,不自動修正拼字;0 保留正常修正行為。; nfpr: optional; 0, 10
filterintegerGoogle 重複結果篩選:1 啟用,0 關閉;搜尋來源不保證始終遵循。; filter: optional; 0, 10
lrstring結果文件語言限制,格式為 lang_fr;多個語言用 | 連接。; lr: optional; ^lang_[a-z]{2,3}(\|lang_[a-z]{2,3})*$lang_fr
crstring依結果文件所屬國家限制,格式為 countryUS;多個國家用 | 連接,例如 countryUS|countryCA。; cr: optional; ^country[A-Za-z]{2}(\|country[A-Za-z]{2})*$countryFR
startinteger結果偏移量; start: optional; min: 010
google_domainstringGoogle 搜尋網域,不含協定與 www.;獨立於國家、語言及位置參數。; google_domain: optional; google.com, google.ad, google.ae, google.com.af, google.com.ag, google.al, google.am, google.co.ao, google.com.ar, google.as, ... 186google.co.uk
glstring兩字母國家代碼;提高對應國家結果的優先順序,不是嚴格國家篩選。; gl: optional; ad, ae, af, ag, ai, al, am, an, ao, aq, ... 252ad
hlstringGoogle 介面語言,也可能影響跨語言查詢的結果選擇。; hl: optional; af, sq, am, ar, hy, az, bn, bg, my, ca, ... 76af
locationstring搜尋起點; 來源; location: optional; minLength: 1Austin,Texas,United States
coordinatesstring座標 JSON(latitude 與 longitude) (coordinates); coordinates: optional{"latitude":30.2672,"longitude":-97.7431}
radiusinteger定位半徑(公尺) (radius); radius: optional; min: 1; max: 1000150
tbsstring時間範圍 (tbs); tbs: optionalqdr:h
tbmstring搜尋分類代碼:nws 新聞、vid 影片、isch 圖片、shop 購物、lcl 本地、bks 圖書。與 udm 互斥;新聞分類不支援 site:。; tbm: optional; nws, vid, isch, shop, lcl, bksnws
udminteger搜尋分頁:1 本地、2 圖片、6 論壇、7 影片、12 新聞、14 網頁、28 購物、36 圖書、50 AI Mode。與 tbm 互斥;新聞不支援 site:。; udm: optional; 1, 2, 6, 7, 12, 14, 28, 36, 502

驗證規則

  • GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supported
  • boolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejected
  • coordinates: JSON object {"latitude":number,"longitude":number}; latitude -90..90; longitude -180..180; NOT (location AND coordinates); NOT (uule AND location); NOT (uule AND coordinates)
  • radius => coordinates; NOT uule; desktop radius <= 199 meters, mobile/tablet radius <= 1000 meters
  • device_os => device = mobile OR tablet
  • query XOR url; tbm XOR udm when selecting a search tab
  • query: <= 8192 UTF-8 bytes after decoding; query_encoded=true => URL-encoded query value, not a URL or q= prefix
  • url: HTTPS Google /search with nonempty q or as_q; only device, device_os, zero_trace and rewrite_links may accompany url
  • ludocid: nonzero unsigned 64-bit decimal string; preserve numeric precision

範例

bash
curl --get "https://api.apihop.ai/v1/google-search/search" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "query=coffee"

Google Search: AI Mode 回答

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

請求參數

欄位類型限制範例
querystring搜尋詞; query: REQUIRED; minLength: 1; UTF-8 bytes: 8192how do solar panels work
countrystring國家篩選 (country); country: optional; ^[A-Za-z]{2}$-
languagestring語言; language: optional-
devicestring裝置; device: optional; desktop, mobile, tabletdesktop
zero_traceboolean不封存回應產物; zero_trace: optionaltrue
locationstring搜尋起點; location: optional-
coordinatesstring座標 JSON(latitude 與 longitude) (coordinates); coordinates: optional{"latitude":30.2672,"longitude":-97.7431}
uulestringGoogle 編碼位置,原樣傳遞;與 location、coordinates、radius 互斥。來源可能忽略不支援的位置。; uule: optional; maxLength: 4096-
image_urlstring公開 HTTPS 圖片網址 (image_url); image_url: optional; maxLength: 2048-
continuableboolean傳回可用於後續追問的對話權杖;Google 對話自首次請求起最多保留 15 分鐘,來源可能提前失效。; continuable: optionaltrue
subsequent_request_tokenstring本介面傳回的對話權杖;同時提交新問題,並保持原語言、地區及位置。; subsequent_request_token: optional; maxLength: 24576-

驗證規則

  • GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supported
  • boolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejected
  • coordinates: JSON object {"latitude":number,"longitude":number}; latitude -90..90; longitude -180..180; NOT (location AND coordinates); NOT (uule AND location); NOT (uule AND coordinates)
  • continuable=true: return a conversation token; subsequent_request_token: new query, optional image_url, same original locale/location; token expires after 15 minutes or earlier at the source
  • image_url: public HTTPS image URL; no credentials, fragment or port

範例

bash
curl --get "https://api.apihop.ai/v1/google-search/ai-mode" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "query=how do solar panels work"

Google Search: AI 摘要

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

請求參數

欄位類型限制範例
querystring搜尋詞; query: optional; minLength: 1; UTF-8 bytes: 8192how do solar panels work
countrystring國家篩選 (country); country: optional; ^[A-Za-z]{2}$-
languagestring語言; language: optional-
devicestring裝置; device: optional; desktop, mobile, tabletdesktop
zero_traceboolean不封存回應產物; zero_trace: optionaltrue
page_tokenstringGoogle Search 傳回的 AI Overview 權杖,須在一分鐘內使用;保留原查詢、地區及裝置。; page_token: optional; maxLength: 24576-

驗證規則

  • GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supported
  • boolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejected
  • query XOR page_token; page_token: copy from a fresh search response; preserve original query and locale
  • page_token: use within one minute; valid page without AI Overview => feature_available=false

範例

bash
curl --get "https://api.apihop.ai/v1/google-search/ai-overview" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "query=how do solar panels work"

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

請求參數

欄位類型限制範例
querystring搜尋詞; query: REQUIRED; minLength: 1; UTF-8 bytes: 8192coffee
countrystring國家篩選 (country); country: optional; ^[A-Za-z]{2}$-
languagestring語言; language: optional-
pageinteger頁碼(從 1 開始); page: optional; min: 1; max: 10001
locationstring搜尋起點; location: optional-
safestring結果篩選 (safe); safe: optional; active, offactive
time_rangestring時間範圍 (time_range); time_range: optional-
devicestring裝置; device: optional; desktop, mobile, tabletdesktop
zero_traceboolean不封存回應產物; zero_trace: optionaltrue
coordinatesstring座標 JSON(latitude 與 longitude) (coordinates); coordinates: optional{"latitude":30.2672,"longitude":-97.7431}
uulestringGoogle 編碼位置,原樣傳遞;與 location、coordinates、radius 互斥。來源可能忽略不支援的位置。; uule: optional; maxLength: 4096-
google_domainstringGoogle 搜尋網域,不含協定與 www.;獨立於國家、語言及位置參數。; google_domain: optional-
lrstring結果文件語言限制,格式為 lang_fr;多個語言用 &#124; 連接。; lr: optional; ^lang_[a-z]{2,3}(?:\&#124;lang_[a-z]{2,3})*$-
nfprinteger1 依原搜尋詞查詢,不自動修正拼字;0 保留正常修正行為。; nfpr: optional; 0, 10
filterintegerGoogle 重複結果篩選:1 啟用,0 關閉;搜尋來源不保證始終遵循。; filter: optional; 0, 10
startinteger結果偏移量; start: optional; min: 0; max: 10000

驗證規則

  • GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supported
  • boolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejected
  • coordinates: JSON object {"latitude":number,"longitude":number}; latitude -90..90; longitude -180..180; NOT (location AND coordinates); NOT (uule AND location); NOT (uule AND coordinates)

範例

bash
curl --get "https://api.apihop.ai/v1/google-search/light" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "query=coffee"

Google Search: 搜尋建議

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

請求參數

欄位類型限制範例
querystring搜尋詞; query: REQUIRED; minLength: 1; maxLength: 100; UTF-8 bytes: 8192coffee
countrystring國家篩選 (country); country: optional; ^[A-Za-z]{2}$-
languagestring語言; language: optional-
limitinteger結果上限; limit: optional; min: 1; max: 201
devicestring裝置; device: optional; desktop, mobile, tabletdesktop
zero_traceboolean不封存回應產物; zero_trace: optionaltrue
clientstringGoogle 自動完成的原生用戶端,預設 firefox。; client: optional; chrome, chrome-omni, gws-wiz, safari, firefox, psy-ab, toolbar, youtube, gws-wiz-localchrome
cpinteger自動完成查詢文字中的游標位置。; cp: optional; min: 0; max: 81920

驗證規則

  • GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supported
  • boolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejected

範例

bash
curl --get "https://api.apihop.ai/v1/google-search/autocomplete" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "query=coffee"

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

請求參數

欄位類型限制範例
querystring搜尋詞; query: optional; minLength: 1; UTF-8 bytes: 8192how do solar panels work
countrystring國家篩選 (country); country: optional; ^[A-Za-z]{2}$-
languagestring語言; language: optional-
devicestring裝置; device: optional; desktop, mobile, tabletdesktop
zero_traceboolean不封存回應產物; zero_trace: optionaltrue
next_page_tokenstring從上次回應複製的續查權杖;保持原帳戶、查詢、裝置及篩選條件。有效期限通常為一小時,過期後重新開始。; next_page_token: optional; minLength: 1; maxLength: 24576-

驗證規則

  • GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supported
  • boolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejected
  • next_page_token: copy from a fresh response; keep original query, localization and filters; do not fabricate tokens
  • query OR next_page_token: required; result tokens expand an individual question

範例

bash
curl --get "https://api.apihop.ai/v1/google-search/related-questions" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "query=how do solar panels work"

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

請求參數

欄位類型限制範例
querystring搜尋詞; query: REQUIRED; minLength: 1; UTF-8 bytes: 8192best coffee grinder
countrystring國家篩選 (country); country: optional; ^[A-Za-z]{2}$-
languagestring語言; language: optional-
pageinteger頁碼(從 1 開始); page: optional; min: 1; max: 10001
locationstring搜尋起點; location: optional-
safestring結果篩選 (safe); safe: optional; active, offactive
time_rangestring時間範圍 (time_range); time_range: optional-
devicestring裝置; device: optional; desktop, mobile, tabletdesktop
zero_traceboolean不封存回應產物; zero_trace: optionaltrue
coordinatesstring座標 JSON(latitude 與 longitude) (coordinates); coordinates: optional{"latitude":30.2672,"longitude":-97.7431}
uulestringGoogle 編碼位置,原樣傳遞;與 location、coordinates、radius 互斥。來源可能忽略不支援的位置。; uule: optional; maxLength: 4096-
nfprinteger1 依原搜尋詞查詢,不自動修正拼字;0 保留正常修正行為。; nfpr: optional; 0, 10
filterintegerGoogle 重複結果篩選:1 啟用,0 關閉;搜尋來源不保證始終遵循。; filter: optional; 0, 10
startinteger結果偏移量; start: optional; min: 0; max: 10000
tbsstring時間範圍 (tbs); tbs: optional; maxLength: 512-
period_unitstring時間範圍 (period_unit); period_unit: optional; s, n, h, d, w, m, ys
period_valueinteger時間範圍 (period_value); period_value: optional; min: 1; max: 21474836471
start_datestring日期邊界 (start_date); start_date: optional; ^[0-9]{8}$-
end_datestring日期邊界 (end_date); end_date: optional; ^[0-9]{8}$-

驗證規則

  • GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supported
  • boolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejected
  • coordinates: JSON object {"latitude":number,"longitude":number}; latitude -90..90; longitude -180..180; NOT (location AND coordinates); NOT (uule AND location); NOT (uule AND coordinates)

範例

bash
curl --get "https://api.apihop.ai/v1/google-search/forums" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "query=best coffee grinder"

Google Search: 搜尋廣告

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

請求參數

欄位類型限制範例
querystring搜尋詞; query: REQUIRED; minLength: 1; UTF-8 bytes: 8192car insurance
countrystring國家篩選 (country); country: optional; ^[A-Za-z]{2}$-
languagestring語言; language: optional-
locationstring搜尋起點; location: optional-
devicestring裝置; device: optional; desktop, mobile, tabletdesktop
zero_traceboolean不封存回應產物; zero_trace: optionaltrue
coordinatesstring座標 JSON(latitude 與 longitude) (coordinates); coordinates: optional{"latitude":30.2672,"longitude":-97.7431}
safestring結果篩選 (safe); safe: optional; active, offactive
nfprinteger1 依原搜尋詞查詢,不自動修正拼字;0 保留正常修正行為。; nfpr: optional; 0, 10

驗證規則

  • GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supported
  • boolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejected
  • coordinates: JSON object {"latitude":number,"longitude":number}; latitude -90..90; longitude -180..180; NOT (location AND coordinates); NOT (uule AND location); NOT (uule AND coordinates)
  • valid page without ads => ads_available=false; this endpoint reads ads and does not create campaigns

範例

bash
curl --get "https://api.apihop.ai/v1/google-search/ads" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "query=car insurance"

Google Search: 來源資訊

GET https://api.apihop.ai/v1/google-search/about-this-result

請求參數

欄位類型限制範例
querystring要查詢來源資訊的網站 URL,與 req_token 二選一。; query: optional; minLength: 1; UTF-8 bytes: 8192https://www.starbucks.com/
req_tokenstringAbout This Result 傳回的原生 req 權杖,作為 query 的替代參數。; req_token: optional; maxLength: 16384; ^[A-Za-z0-9_-]+={0,2}$-
countrystring國家篩選 (country); country: optional; ^[A-Za-z]{2}$-
languagestring語言; language: optional-
google_domainstringGoogle 搜尋網域,不含協定與 www.;獨立於國家、語言及位置參數。; google_domain: optional-
zero_traceboolean不封存回應產物; zero_trace: optionaltrue

驗證規則

  • GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supported
  • boolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejected
  • query XOR req_token; query: website URL; req_token: copy from a fresh About This Result selector

範例

bash
curl --get "https://api.apihop.ai/v1/google-search/about-this-result" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "query=https://www.starbucks.com/"

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

請求參數

欄位類型限制範例
querystring廣告素材搜尋文字,例如廣告主網站網域;與 id、advertiser_id 三選一。; query: optional; minLength: 1; UTF-8 bytes: 8192nike.com
countrystring國家篩選 (country); country: optional; ad, ae, af, ag, ai, al, am, ao, aq, ar, ... 244; ^[A-Za-z]{2}$ad
languagestring語言; language: optional-
limitinteger結果上限; limit: optional; min: 1; max: 1001
idstring廣告主 AR 識別碼或逗號分隔清單;與 query、advertiser_id 三選一。; id: optional-
categorystring廣告素材格式選擇器,與 creative_format 互斥;可選值見列舉。; category: optional; image, text, videoimage
next_page_tokenstring從上次回應複製的續查權杖;保持原帳戶、查詢、裝置及篩選條件。有效期限通常為一小時,過期後重新開始。; next_page_token: optional; minLength: 1; maxLength: 24576-
devicestring裝置; device: optional; desktop, mobile, tabletdesktop
zero_traceboolean不封存回應產物; zero_trace: optionaltrue
advertiser_idstring廣告主 AR 識別碼;素材搜尋可用逗號分隔最多 100 個,素材詳情只接受單一廣告主。; advertiser_id: optional; maxLength: 3499-
platformstring廣告投放平台篩選,可選平台見列舉。; platform: optional; PLAY, MAPS, SEARCH, SHOPPING, YOUTUBEPLAY
political_adsboolean僅查詢政治廣告;啟用時必須指定國家或非 anywhere 地區。; political_ads: optionaltrue
get_advertiserboolean同時取得廣告主詳情;啟用時必須提供單一廣告主 ID。; get_advertiser: optionaltrue
regionstring地區定位 (region); 範例: US=2840; region: optional; anywhere, 2004, 2008, 2010, 2012, 2016, 2020, 2024, 2028, 2031, ... 245; maxLength: 8anywhere
start_datestring日期邊界 (start_date); start_date: optional; ^[0-9]{8}$-
end_datestring日期邊界 (end_date); end_date: optional; ^[0-9]{8}$-
creative_formatstring廣告素材格式,與 category 互斥;可選值見列舉。; creative_format: optional; image, text, videoimage

驗證規則

  • GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supported
  • boolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejected
  • next_page_token: copy from a fresh response; keep original query, localization and filters; do not fabricate tokens
  • exactly one of query, id, advertiser_id; category XOR creative_format when selecting a creative format
  • id, advertiser_id: AR-prefixed IDs, comma-separated, up to 100; get_advertiser=true => exactly one advertiser ID
  • political_ads=true => explicit country or region other than anywhere; start_date < end_date; dates must exist

範例

bash
curl --get "https://api.apihop.ai/v1/google-search/ads-transparency" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "query=nike.com"

Google Search: 廣告素材詳情

GET https://api.apihop.ai/v1/google-search/ads-transparency-details

請求參數

欄位類型限制範例
advertiser_idstring廣告主 AR 識別碼;素材搜尋可用逗號分隔最多 100 個,素材詳情只接受單一廣告主。; advertiser_id: REQUIRED; maxLength: 34; ^AR[0-9]{1,32}$${ADVERTISER_ID}
creative_idstring廣告素材 CR 識別碼,從素材詳情 URL 或本次素材搜尋回應取得。; creative_id: REQUIRED; maxLength: 34; ^CR[0-9]{1,32}$${CREATIVE_ID}
regionstring地區定位 (region); region: optional; anywhere, 2004, 2008, 2010, 2012, 2016, 2020, 2024, 2028, 2031, ... 245anywhere
zero_traceboolean不封存回應產物; zero_trace: optionaltrue

驗證規則

  • GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supported
  • boolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejected
  • advertiser_id AND creative_id: copy from a fresh ads-transparency response; sample identifiers do not prove availability

範例

bash
curl --get "https://api.apihop.ai/v1/google-search/ads-transparency-details" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  --data-urlencode "advertiser_id=${ADVERTISER_ID}" \
  --data-urlencode "creative_id=${CREATIVE_ID}"

回應與錯誤

保留原生 JSON 與數字精確度。以下是空成功結果範例。HTTP 400 輸入無效;401 需驗證;402 餘額不足;403 無權限或未開放;405 方法不支援;429 限流;5xx 服務錯誤。請保留 X-Request-Id。

json
{
  "success": true,
  "request_id": "example-request",
  "data": {
    "format": "json",
    "content": {
      "results": []
    }
  }
}