API Hop 文件
Google Search 介面參考
Google Search: 網頁搜尋 · AI Mode 回答 · AI 摘要 · 輕量搜尋 · 搜尋建議 · 相關問題 · 論壇搜尋 · 搜尋廣告 · 來源資訊 · 廣告素材搜尋 · 廣告素材詳情.
並行上限
AI 與 Data 分別共用帳戶層級的並行名額,預設 5 AI / 2 Data,訂閱方案可調整上限。介面個別設定仍受類別總上限約束。達到任一上限回傳 HTTP 429;非同步任務執行結束前占用名額。
GET /v1/google-search/search GET /v1/google-search/ai-mode GET /v1/google-search/ai-overview GET /v1/google-search/light GET /v1/google-search/autocomplete GET /v1/google-search/related-questions GET /v1/google-search/forums GET /v1/google-search/ads GET /v1/google-search/about-this-result GET /v1/google-search/ads-transparency GET /v1/google-search/ads-transparency-details Google Search: 網頁搜尋 · AI Mode 回答 · AI 摘要 · 輕量搜尋 · 搜尋建議 · 相關問題 · 論壇搜尋 · 搜尋廣告 · 來源資訊 · 廣告素材搜尋 · 廣告素材詳情.
驗證與計費
預設每次成功請求 $0.0003(300 credits)。 使用 API Hop API Key;可用性取決於已啟用閘道與金鑰權限。成功請求價格以目前目錄與帳戶為準,帳戶專屬價格優先。成功的空結果也會計費,失敗會釋放預留額度。逾時為 60 秒,不自動重試或分頁,結算失敗不會重複呼叫上游。
Authorization: Bearer YOUR_API_KEY僅接受查詢參數,不接受本文。拒絕未知、重複、空白或無效值。僅支援 JSON,不自動分頁或重試。識別碼及續查權杖應從最新回應複製,範例僅供說明。每次完成的查詢分別計費,包括已確認的空結果或不可用結果。XOR 表示二選一,NOT 表示不得提供,=> 表示需要。
Google Search: 網頁搜尋
GET https://api.apihop.ai/v1/google-search/search
請求參數
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
url | string | 完整 HTTPS 搜尋網址 (url); url: optional; maxLength: 32768 | https://www.google.com/search?q=coffee%20beans&hl=en&gl=us |
device_os | string | 行動裝置作業系統 (device_os); device_os: optional; android, ios | ios |
query | string | 搜尋詞; query: optional; minLength: 1; maxLength: 24576; UTF-8 bytes: 8192 | coffee |
query_encoded | boolean | 查詢詞已經 URL 編碼 (query_encoded); query_encoded: optional | true |
uule | string | Google 編碼位置,原樣傳遞;與 location、coordinates、radius 互斥。來源可能忽略不支援的位置。; uule: optional; minLength: 3; maxLength: 4096; ^[wa]\+(?:[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}$ | w+CAIQICIaQXVzdGluLFRleGFzLFVuaXRlZCBTdGF0ZXM |
rewrite_links | boolean | 解析 HTML 中的轉址連結 (rewrite_links); rewrite_links: optional | true |
zero_trace | boolean | 不封存回應產物; zero_trace: optional | true |
device | string | 裝置; device: optional; mobile, tablet, desktop | mobile |
safe | string | 結果篩選 (safe); safe: optional; active, off | active |
color_scheme | string | 頁面配色 (color_scheme); color_scheme: optional; light, dark | light |
ludocid | string | Google 地點 CID,非零無符號 64 位十進位字串;保持字串以避免精度遺失。; ludocid: optional; maxLength: 20 | - |
lsig | string | 本地搜尋結果中的地點簽章,用於選擇地圖或知識圖譜檢視。; lsig: optional; maxLength: 2048 | - |
kgmid | string | 以 /m/ 或 /g/ 開頭的 Google 知識圖譜實體 ID;可能沿用該實體原有的搜尋情境。; kgmid: optional; maxLength: 131 | - |
si | string | 選擇快取搜尋或知識圖譜分頁的 Google 原生權杖;可能沿用原查詢情境。; si: optional; maxLength: 8192 | - |
ibp | string | Google 頁面配置選擇器,例如 gwp;0,7 可展開地點知識圖譜。; ibp: optional; maxLength: 2048 | - |
uds | string | 從 Google 篩選連結複製的原生搜尋篩選權杖。; uds: optional; maxLength: 8192 | - |
pws | integer | 0 要求關閉 Google 個人化,1 允許個人化;省略使用預設值。不會關閉地區、語言或裝置影響,也不依本服務帳戶個人化。; pws: optional; 0, 1 | 0 |
nfpr | integer | 1 依原搜尋詞查詢,不自動修正拼字;0 保留正常修正行為。; nfpr: optional; 0, 1 | 0 |
filter | integer | Google 重複結果篩選:1 啟用,0 關閉;搜尋來源不保證始終遵循。; filter: optional; 0, 1 | 0 |
lr | string | 結果文件語言限制,格式為 lang_fr;多個語言用 | 連接。; lr: optional; ^lang_[a-z]{2,3}(\|lang_[a-z]{2,3})*$ | lang_fr |
cr | string | 依結果文件所屬國家限制,格式為 countryUS;多個國家用 | 連接,例如 countryUS|countryCA。; cr: optional; ^country[A-Za-z]{2}(\|country[A-Za-z]{2})*$ | countryFR |
start | integer | 結果偏移量; start: optional; min: 0 | 10 |
google_domain | string | Google 搜尋網域,不含協定與 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, ... 186 | google.co.uk |
gl | string | 兩字母國家代碼;提高對應國家結果的優先順序,不是嚴格國家篩選。; gl: optional; ad, ae, af, ag, ai, al, am, an, ao, aq, ... 252 | ad |
hl | string | Google 介面語言,也可能影響跨語言查詢的結果選擇。; hl: optional; af, sq, am, ar, hy, az, bn, bg, my, ca, ... 76 | af |
location | string | 搜尋起點; 來源; location: optional; minLength: 1 | Austin,Texas,United States |
coordinates | string | 座標 JSON(latitude 與 longitude) (coordinates); coordinates: optional | {"latitude":30.2672,"longitude":-97.7431} |
radius | integer | 定位半徑(公尺) (radius); radius: optional; min: 1; max: 1000 | 150 |
tbs | string | 時間範圍 (tbs); tbs: optional | qdr:h |
tbm | string | 搜尋分類代碼:nws 新聞、vid 影片、isch 圖片、shop 購物、lcl 本地、bks 圖書。與 udm 互斥;新聞分類不支援 site:。; tbm: optional; nws, vid, isch, shop, lcl, bks | nws |
udm | integer | 搜尋分頁:1 本地、2 圖片、6 論壇、7 影片、12 新聞、14 網頁、28 購物、36 圖書、50 AI Mode。與 tbm 互斥;新聞不支援 site:。; udm: optional; 1, 2, 6, 7, 12, 14, 28, 36, 50 | 2 |
驗證規則
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedboolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejectedcoordinates: 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 metersdevice_os => device = mobile OR tabletquery XOR url; tbm XOR udm when selecting a search tabquery: <= 8192 UTF-8 bytes after decoding; query_encoded=true => URL-encoded query value, not a URL or q= prefixurl: HTTPS Google /search with nonempty q or as_q; only device, device_os, zero_trace and rewrite_links may accompany urlludocid: nonzero unsigned 64-bit decimal string; preserve numeric precision
範例
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
請求參數
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
query | string | 搜尋詞; query: REQUIRED; minLength: 1; UTF-8 bytes: 8192 | how do solar panels work |
country | string | 國家篩選 (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | 語言; language: optional | - |
device | string | 裝置; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | 不封存回應產物; zero_trace: optional | true |
location | string | 搜尋起點; location: optional | - |
coordinates | string | 座標 JSON(latitude 與 longitude) (coordinates); coordinates: optional | {"latitude":30.2672,"longitude":-97.7431} |
uule | string | Google 編碼位置,原樣傳遞;與 location、coordinates、radius 互斥。來源可能忽略不支援的位置。; uule: optional; maxLength: 4096 | - |
image_url | string | 公開 HTTPS 圖片網址 (image_url); image_url: optional; maxLength: 2048 | - |
continuable | boolean | 傳回可用於後續追問的對話權杖;Google 對話自首次請求起最多保留 15 分鐘,來源可能提前失效。; continuable: optional | true |
subsequent_request_token | string | 本介面傳回的對話權杖;同時提交新問題,並保持原語言、地區及位置。; subsequent_request_token: optional; maxLength: 24576 | - |
驗證規則
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedboolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejectedcoordinates: 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 sourceimage_url: public HTTPS image URL; no credentials, fragment or port
範例
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
請求參數
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
query | string | 搜尋詞; query: optional; minLength: 1; UTF-8 bytes: 8192 | how do solar panels work |
country | string | 國家篩選 (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | 語言; language: optional | - |
device | string | 裝置; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | 不封存回應產物; zero_trace: optional | true |
page_token | string | Google Search 傳回的 AI Overview 權杖,須在一分鐘內使用;保留原查詢、地區及裝置。; page_token: optional; maxLength: 24576 | - |
驗證規則
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedboolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejectedquery XOR page_token; page_token: copy from a fresh search response; preserve original query and localepage_token: use within one minute; valid page without AI Overview => feature_available=false
範例
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"Google Search: 輕量搜尋
GET https://api.apihop.ai/v1/google-search/light
請求參數
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
query | string | 搜尋詞; query: REQUIRED; minLength: 1; UTF-8 bytes: 8192 | coffee |
country | string | 國家篩選 (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | 語言; language: optional | - |
page | integer | 頁碼(從 1 開始); page: optional; min: 1; max: 1000 | 1 |
location | string | 搜尋起點; location: optional | - |
safe | string | 結果篩選 (safe); safe: optional; active, off | active |
time_range | string | 時間範圍 (time_range); time_range: optional | - |
device | string | 裝置; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | 不封存回應產物; zero_trace: optional | true |
coordinates | string | 座標 JSON(latitude 與 longitude) (coordinates); coordinates: optional | {"latitude":30.2672,"longitude":-97.7431} |
uule | string | Google 編碼位置,原樣傳遞;與 location、coordinates、radius 互斥。來源可能忽略不支援的位置。; uule: optional; maxLength: 4096 | - |
google_domain | string | Google 搜尋網域,不含協定與 www.;獨立於國家、語言及位置參數。; google_domain: optional | - |
lr | string | 結果文件語言限制,格式為 lang_fr;多個語言用 | 連接。; lr: optional; ^lang_[a-z]{2,3}(?:\|lang_[a-z]{2,3})*$ | - |
nfpr | integer | 1 依原搜尋詞查詢,不自動修正拼字;0 保留正常修正行為。; nfpr: optional; 0, 1 | 0 |
filter | integer | Google 重複結果篩選:1 啟用,0 關閉;搜尋來源不保證始終遵循。; filter: optional; 0, 1 | 0 |
start | integer | 結果偏移量; start: optional; min: 0; max: 1000 | 0 |
驗證規則
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedboolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejectedcoordinates: JSON object {"latitude":number,"longitude":number}; latitude -90..90; longitude -180..180; NOT (location AND coordinates); NOT (uule AND location); NOT (uule AND coordinates)
範例
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
請求參數
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
query | string | 搜尋詞; query: REQUIRED; minLength: 1; maxLength: 100; UTF-8 bytes: 8192 | coffee |
country | string | 國家篩選 (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | 語言; language: optional | - |
limit | integer | 結果上限; limit: optional; min: 1; max: 20 | 1 |
device | string | 裝置; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | 不封存回應產物; zero_trace: optional | true |
client | string | Google 自動完成的原生用戶端,預設 firefox。; client: optional; chrome, chrome-omni, gws-wiz, safari, firefox, psy-ab, toolbar, youtube, gws-wiz-local | chrome |
cp | integer | 自動完成查詢文字中的游標位置。; cp: optional; min: 0; max: 8192 | 0 |
驗證規則
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedboolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejected
範例
curl --get "https://api.apihop.ai/v1/google-search/autocomplete" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "query=coffee"Google Search: 相關問題
GET https://api.apihop.ai/v1/google-search/related-questions
請求參數
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
query | string | 搜尋詞; query: optional; minLength: 1; UTF-8 bytes: 8192 | how do solar panels work |
country | string | 國家篩選 (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | 語言; language: optional | - |
device | string | 裝置; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | 不封存回應產物; zero_trace: optional | true |
next_page_token | string | 從上次回應複製的續查權杖;保持原帳戶、查詢、裝置及篩選條件。有效期限通常為一小時,過期後重新開始。; next_page_token: optional; minLength: 1; maxLength: 24576 | - |
驗證規則
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedboolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejectednext_page_token: copy from a fresh response; keep original query, localization and filters; do not fabricate tokensquery OR next_page_token: required; result tokens expand an individual question
範例
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"Google Search: 論壇搜尋
GET https://api.apihop.ai/v1/google-search/forums
請求參數
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
query | string | 搜尋詞; query: REQUIRED; minLength: 1; UTF-8 bytes: 8192 | best coffee grinder |
country | string | 國家篩選 (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | 語言; language: optional | - |
page | integer | 頁碼(從 1 開始); page: optional; min: 1; max: 1000 | 1 |
location | string | 搜尋起點; location: optional | - |
safe | string | 結果篩選 (safe); safe: optional; active, off | active |
time_range | string | 時間範圍 (time_range); time_range: optional | - |
device | string | 裝置; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | 不封存回應產物; zero_trace: optional | true |
coordinates | string | 座標 JSON(latitude 與 longitude) (coordinates); coordinates: optional | {"latitude":30.2672,"longitude":-97.7431} |
uule | string | Google 編碼位置,原樣傳遞;與 location、coordinates、radius 互斥。來源可能忽略不支援的位置。; uule: optional; maxLength: 4096 | - |
nfpr | integer | 1 依原搜尋詞查詢,不自動修正拼字;0 保留正常修正行為。; nfpr: optional; 0, 1 | 0 |
filter | integer | Google 重複結果篩選:1 啟用,0 關閉;搜尋來源不保證始終遵循。; filter: optional; 0, 1 | 0 |
start | integer | 結果偏移量; start: optional; min: 0; max: 1000 | 0 |
tbs | string | 時間範圍 (tbs); tbs: optional; maxLength: 512 | - |
period_unit | string | 時間範圍 (period_unit); period_unit: optional; s, n, h, d, w, m, y | s |
period_value | integer | 時間範圍 (period_value); period_value: optional; min: 1; max: 2147483647 | 1 |
start_date | string | 日期邊界 (start_date); start_date: optional; ^[0-9]{8}$ | - |
end_date | string | 日期邊界 (end_date); end_date: optional; ^[0-9]{8}$ | - |
驗證規則
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedboolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejectedcoordinates: JSON object {"latitude":number,"longitude":number}; latitude -90..90; longitude -180..180; NOT (location AND coordinates); NOT (uule AND location); NOT (uule AND coordinates)
範例
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
請求參數
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
query | string | 搜尋詞; query: REQUIRED; minLength: 1; UTF-8 bytes: 8192 | car insurance |
country | string | 國家篩選 (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | 語言; language: optional | - |
location | string | 搜尋起點; location: optional | - |
device | string | 裝置; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | 不封存回應產物; zero_trace: optional | true |
coordinates | string | 座標 JSON(latitude 與 longitude) (coordinates); coordinates: optional | {"latitude":30.2672,"longitude":-97.7431} |
safe | string | 結果篩選 (safe); safe: optional; active, off | active |
nfpr | integer | 1 依原搜尋詞查詢,不自動修正拼字;0 保留正常修正行為。; nfpr: optional; 0, 1 | 0 |
驗證規則
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedboolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejectedcoordinates: 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
範例
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
請求參數
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
query | string | 要查詢來源資訊的網站 URL,與 req_token 二選一。; query: optional; minLength: 1; UTF-8 bytes: 8192 | https://www.starbucks.com/ |
req_token | string | About This Result 傳回的原生 req 權杖,作為 query 的替代參數。; req_token: optional; maxLength: 16384; ^[A-Za-z0-9_-]+={0,2}$ | - |
country | string | 國家篩選 (country); country: optional; ^[A-Za-z]{2}$ | - |
language | string | 語言; language: optional | - |
google_domain | string | Google 搜尋網域,不含協定與 www.;獨立於國家、語言及位置參數。; google_domain: optional | - |
zero_trace | boolean | 不封存回應產物; zero_trace: optional | true |
驗證規則
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedboolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejectedquery XOR req_token; query: website URL; req_token: copy from a fresh About This Result selector
範例
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/"Google Search: 廣告素材搜尋
GET https://api.apihop.ai/v1/google-search/ads-transparency
請求參數
| 欄位 | 類型 | 限制 | 範例 |
|---|---|---|---|
query | string | 廣告素材搜尋文字,例如廣告主網站網域;與 id、advertiser_id 三選一。; query: optional; minLength: 1; UTF-8 bytes: 8192 | nike.com |
country | string | 國家篩選 (country); country: optional; ad, ae, af, ag, ai, al, am, ao, aq, ar, ... 244; ^[A-Za-z]{2}$ | ad |
language | string | 語言; language: optional | - |
limit | integer | 結果上限; limit: optional; min: 1; max: 100 | 1 |
id | string | 廣告主 AR 識別碼或逗號分隔清單;與 query、advertiser_id 三選一。; id: optional | - |
category | string | 廣告素材格式選擇器,與 creative_format 互斥;可選值見列舉。; category: optional; image, text, video | image |
next_page_token | string | 從上次回應複製的續查權杖;保持原帳戶、查詢、裝置及篩選條件。有效期限通常為一小時,過期後重新開始。; next_page_token: optional; minLength: 1; maxLength: 24576 | - |
device | string | 裝置; device: optional; desktop, mobile, tablet | desktop |
zero_trace | boolean | 不封存回應產物; zero_trace: optional | true |
advertiser_id | string | 廣告主 AR 識別碼;素材搜尋可用逗號分隔最多 100 個,素材詳情只接受單一廣告主。; advertiser_id: optional; maxLength: 3499 | - |
platform | string | 廣告投放平台篩選,可選平台見列舉。; platform: optional; PLAY, MAPS, SEARCH, SHOPPING, YOUTUBE | PLAY |
political_ads | boolean | 僅查詢政治廣告;啟用時必須指定國家或非 anywhere 地區。; political_ads: optional | true |
get_advertiser | boolean | 同時取得廣告主詳情;啟用時必須提供單一廣告主 ID。; get_advertiser: optional | true |
region | string | 地區定位 (region); 範例: US=2840; region: optional; anywhere, 2004, 2008, 2010, 2012, 2016, 2020, 2024, 2028, 2031, ... 245; maxLength: 8 | anywhere |
start_date | string | 日期邊界 (start_date); start_date: optional; ^[0-9]{8}$ | - |
end_date | string | 日期邊界 (end_date); end_date: optional; ^[0-9]{8}$ | - |
creative_format | string | 廣告素材格式,與 category 互斥;可選值見列舉。; creative_format: optional; image, text, video | image |
驗證規則
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedboolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejectednext_page_token: copy from a fresh response; keep original query, localization and filters; do not fabricate tokensexactly one of query, id, advertiser_id; category XOR creative_format when selecting a creative formatid, advertiser_id: AR-prefixed IDs, comma-separated, up to 100; get_advertiser=true => exactly one advertiser IDpolitical_ads=true => explicit country or region other than anywhere; start_date < end_date; dates must exist
範例
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_id | string | 廣告主 AR 識別碼;素材搜尋可用逗號分隔最多 100 個,素材詳情只接受單一廣告主。; advertiser_id: REQUIRED; maxLength: 34; ^AR[0-9]{1,32}$ | ${ADVERTISER_ID} |
creative_id | string | 廣告素材 CR 識別碼,從素材詳情 URL 或本次素材搜尋回應取得。; creative_id: REQUIRED; maxLength: 34; ^CR[0-9]{1,32}$ | ${CREATIVE_ID} |
region | string | 地區定位 (region); region: optional; anywhere, 2004, 2008, 2010, 2012, 2016, 2020, 2024, 2028, 2031, ... 245 | anywhere |
zero_trace | boolean | 不封存回應產物; zero_trace: optional | true |
驗證規則
GET query only; body = null; response = JSON; html, output, json_restrictor, no_cache: NOT supportedboolean = true OR false; integer: safe integer; unknown, repeated, empty or invalid query values: rejectedadvertiser_id AND creative_id: copy from a fresh ads-transparency response; sample identifiers do not prove availability
範例
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。
{
"success": true,
"request_id": "example-request",
"data": {
"format": "json",
"content": {
"results": []
}
}
}