Baidu Tieba Scrape Content

按输入采集规格计费,提交前确定价格
ae_baidu_tieba_scrape_content

这是一个异步百度贴吧采集工具。请提供关键词、话题、贴吧板块或帖子/主页链接等采集规格,并按需设置帖子、评论和楼中楼的采集范围;提交后先等待任务完成,成功时返回实际采集到的帖子与评论,不将采集规格误当作结果。

社交
按输入采集规格计费,提交前确定价格

价格说明

按输入采集规格计费,提交前确定价格

工具参数

未传入的可选参数将使用平台默认值。

参数类型必填说明默认值
urlsarray条件必填You can add direct URLs to scrape here. It can be a post URL, User Profile URL or Hot Topic URL.—
urls[].urlstring是暂无参数说明。—
forumsarray条件必填Enter the forums you want to scrape. You can enter the forum name, URL or ID. This is required if you are not using search terms above.—
forums[].tabsarray条件必填Select the tabs you want to scrape.—
forums[].forumstring是Enter the forum name, ID or URL you want to scrape—
forums[].customTabsarray条件必填Write the tab names in Chinese, it must match the website exactly—
forums[].maxPostsPerTabinteger是Maximum number of posts to scrape per forum tab. The Actor will stop scraping once this limit is reached for the tab.—
topicsarray条件必填Enter the topics you want to scrape. Example: '剧情' or '#剧情'. Alternatively, you can also add Topic URLs in the Start URLs section above.—
timeoutnumber否本次 Actor 执行超时,单位秒。—
maxPostsinteger否Maximum number of posts to be scraped per search term, topic, profile or hot topic.100
searchTermsarray条件必填Enter one or more keywords to search for. Each keyword runs as a separate search.—
sortSearchByenum (most_relevant | latest | oldest)否Choose how to sort the search results. 'Most Relevant' sorts by relevance to the search term, 'Latest' sorts by date with the newest posts first, and 'Oldest' sorts by date with the oldest posts first.most_relevant
sortCommentsByenum (popular | latest | oldest)否Choose how to sort the comments when scraping a post. 'Most Relevant' sorts by relevance to the post, 'Latest' sorts by date with the newest comments first, and 'Oldest' sorts by date with the oldest comments first.popular
sortTopicPostsByenum (hottest | latest)否Choose how to sort the posts when scraping a Hot Topic URL or Topic. 'Hottest' sorts by popularity, while 'Latest' sorts by date with the newest posts first.hottest
maxTotalChargeUsdnumber否按事件计费运行的费用上限,单位美元。—
searchWithinForumstring否If you want to search within a specific forum, enter the forum name, ID or URL here. This will limit the search results to that forum. Leave empty to search across all forums.""
maxCommentsPerPostinteger否The maximum number of top-level comments to scrape per post.0
maxRepliesPerCommentinteger否The maximum number of replies to scrape per comment.0

调用示例

提交任务并查询完成结果

POST/agent-api/v1/tool/executeX-Api-Key

先提交任务,再用返回的 task_id 查询,直至完成。

请求代码request.sh
curl --request POST \
  --url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_baidu_tieba_scrape_content' \
  --header "X-Api-Key: $AGENTEARTH_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "params": {
    "maxCommentsPerPost": 1,
    "maxPosts": 1,
    "maxRepliesPerComment": 0,
    "timeout": 300,
    "urls": [
      {
        "url": "https://tieba.baidu.com/p/11191193772"
      }
    ]
  }
}'
返回示例response.json
JSON部分内容
{
  "description": "task accepted; poll the result via query_tool with this task_id",
  "query_tool": "ae_get_result",
  "status": "created",
  "task_id": "370cd169-1e2f-4ea5-9d9b-af2b941db712"
}

返回示例仅展示部分内容,不代表完整响应;复制内容为合法 JSON。