發送您的第一個請求

使用 Thordata 的 Web Scraper API 發送您的第一個請求。開始之前,您需要取得 API Token。 您可以在【API構建器】頁面獲得免費試用。 然後,在「Token」欄位複製您的憑證。 備註: 您獲得的 Token 屬於敏感信息,請妥善保管,切勿洩露。如因 Token 洩露導致您的資源被濫用,相關後果需由您自行承擔,本平台不負責任。 程式碼範例: 獲得 API 憑證後,請使用以下程式碼發送您的第一個請求:

curl -X POST "http://scraperapi.thordata.com/builder" \
  -H "Authorization: Bearer Token-ID" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "spider_name=amazon.com" \
  -d "individual_params={\"spider_parameters\":[{\"url\": \"https://www.amazon.com/HISDERN-Checkered-Handkerchief-Classic-Necktie/dp/B0BRXPR726\",\"zip_code\": \"94107\"}],\"spider_id\":\"amazon_product_by-url\",\"spider_errors\":true}" \
  -d "file_name={{TasksID}}"

發送請求後,系統會返回 JSON 或 CSV 格式的輸出結果,您可以前往「任務」列表查看。

如果您需要更多幫助,請通過電子郵件 [email protected] 聯絡我們。

Last updated

Was this helpful?