Baidu Tieba Scrape Content

Price is set by the requested scrape limits before submission
ae_baidu_tieba_scrape_content

异步采集百度贴吧内容。输入的是采集规格,可按关键词、话题、贴吧板块或帖子/主页链接指定范围,并设置帖子、评论和楼中楼的采集限制;提交后先获得异步任务,任务成功后返回实际采集到的帖子与评论结果。

Social
Price is set by the requested scrape limits before submission

Pricing

Price is set by the requested scrape limits before submission

Parameters

Optional parameters use the platform defaults when omitted.

ParameterTypeRequiredDescriptionDefault
urlsarrayConditionalYou can add direct URLs to scrape here. It can be a post URL, User Profile URL or Hot Topic URL.—
urls[].urlstringYesNo parameter description.—
forumsarrayConditionalEnter 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[].tabsarrayConditionalSelect the tabs you want to scrape.—
forums[].forumstringYesEnter the forum name, ID or URL you want to scrape—
forums[].customTabsarrayConditionalWrite the tab names in Chinese, it must match the website exactly—
forums[].maxPostsPerTabintegerYesMaximum number of posts to scrape per forum tab. The Actor will stop scraping once this limit is reached for the tab.—
topicsarrayConditionalEnter the topics you want to scrape. Example: '剧情' or '#剧情'. Alternatively, you can also add Topic URLs in the Start URLs section above.—
timeoutnumberNo本次 Actor 执行超时,单位秒。—
maxPostsintegerNoMaximum number of posts to be scraped per search term, topic, profile or hot topic.100
searchTermsarrayConditionalEnter one or more keywords to search for. Each keyword runs as a separate search.—
sortSearchByenum (most_relevant | latest | oldest)NoChoose 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)NoChoose 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)NoChoose 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
maxTotalChargeUsdnumberNo按事件计费运行的费用上限,单位美元。—
searchWithinForumstringNoIf 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.""
maxCommentsPerPostintegerNoThe maximum number of top-level comments to scrape per post.0
maxRepliesPerCommentintegerNoThe maximum number of replies to scrape per comment.0

Invocation example

Copy the request and explore its response example.

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

Submit first, then query with the returned task_id until the task completes.

Request coderequest.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 exampleresponse.json
JSONPartial content
{
  "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"
}

This example shows part of the response. Copied content is valid JSON.