Twitter 抓取參數

Web Scraper API Twitter 抓取參數

使用 Thordata 的 Web Scraper API 配置 Twitter 抓取參數,包括URL、用戶名、開始日期、結束日期等参数。

唯一標識:

chevron-righttoken 訪問令牌(必填)hashtag

此參數用作 API 訪問令牌,以確保抓取請求的合法性。

請求示例:

Authorization: Bearer ********************

curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer ********************" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=x.com" ^
  -d "spider_id=twitter_profiles_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://x.com/fabrizioromano\",\"max_number_of_posts\": \"10\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"

一、產品 - 抓取 Twitter 個人資料信息:

1. Twitter - 通過 URL 抓取個人資料信息

chevron-rightspider_id所屬抓取工具(必填)hashtag

它定義了要使用的抓取工具。

請求示例:

spider_id=twitter_profiles_by-url

curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=x.com" ^
  -d "spider_id=twitter_profiles_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://x.com/fabrizioromano\",\"max_number_of_posts\": \"10\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
chevron-righturlProfile URL(必填)hashtag

該參數用於指定待抓取的 Twitter 個人資料 URL。

請求示例:

"url": "https://x.com/fabrizioromano"

curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=x.com" ^
  -d "spider_id=twitter_profiles_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://x.com/fabrizioromano\",\"max_number_of_posts\": \"10\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"
chevron-rightmax_number_of_posts最大帖子數(可選)hashtag

該參數用於指定抓取帖子的最大數量。

请求示例:

"max_number_of_posts": "10"

curl -X POST "https://scraperapi.thordata.com/builder" ^
  -H "Authorization: Bearer Token-ID" ^
  -H "Content-Type: application/x-www-form-urlencoded" ^
  -d "spider_name=x.com" ^
  -d "spider_id=twitter_profiles_by-url" ^
  -d "spider_parameters=[{\"url\": \"https://x.com/fabrizioromano\",\"max_number_of_posts\": \"10\"}]" ^
  -d "spider_errors=true" ^
  -d "file_name={{TasksID}}"

2. Twitter -通過用户名抓取個人資料信息

chevron-rightspider_id所屬抓取工具(必填)hashtag

它定義了要使用的抓取工具。

請求示例:

spider_id=twitter_profiles_by-username

chevron-rightuser_nameTwitter 用户名(必填)hashtag

該參數用於指定待抓取的 Twitter 的個人資料用戶名。

請求示例:

"user_name": "elonmusk"

二、产品-抓取 Twitter 帖子信息:

1. Twitter - -通過 URL 抓取帖子信息

chevron-rightspider_id所屬抓取工具(必填)hashtag

它定義了要使用的抓取工具。

請求示例:

spider_id=twitter_by-posturl_by-url

chevron-righturlURL(必填)hashtag

該參數用於指定待抓取的 Twitter 帖子的 URL。

請求示例:

"url": "https://x.com/FabrizioRomano/status/1683559267524136962"

2. Twitter - 通過個人資料 URL 抓取帖子信息

chevron-rightspider_id所屬抓取工具(必填)hashtag

它定義了要使用的抓取工具。

請求示例:

spider_id=twitter_by-posturl_by-profileurl

chevron-righturlProfile URL(必填)hashtag

該參數用於指定抓取 Twitter 帖子信息的個人資料的 URL。

請求示例:

"url": "https://x.com/elonmusk"

chevron-rightstart_date開始日期(可選)hashtag

該參數用於指定帖子髮佈的開始時間,格式:dd-mm-yyyy,yyyy-mm-dd,應低於“end_date”。

請求示例:

"start_date": "2023-01-15T16:31:04.000Z"

chevron-rightend_date結束日期(可選)hashtag

該參數用於指定帖子髮佈的結束時間,格式:dd-mm-yyyy,yyyy-mm-dd,應大於“start_date”。

請求示例:

"end_date": "2024-01-01"

如果您需要進一步的幫助,請通過電子郵件聯繫 [email protected]

Last updated