Baidu Tieba Scrape Content
Price is set by the requested scrape limits before submission
ae_baidu_tieba_scrape_content
异步采集百度贴吧内容。输入的是采集规格,可按关键词、话题、贴吧板块或帖子/主页链接指定范围,并设置帖子、评论和楼中楼的采集限制;提交后先获得异步任务,任务成功后返回实际采集到的帖子与评论结果。
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.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
urls | array | Conditional | You can add direct URLs to scrape here. It can be a post URL, User Profile URL or Hot Topic URL. | — |
urls[].url | string | Yes | No parameter description. | — |
forums | array | Conditional | 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[].tabs | array | Conditional | Select the tabs you want to scrape. | — |
forums[].forum | string | Yes | Enter the forum name, ID or URL you want to scrape | — |
forums[].customTabs | array | Conditional | Write the tab names in Chinese, it must match the website exactly | — |
forums[].maxPostsPerTab | integer | Yes | Maximum number of posts to scrape per forum tab. The Actor will stop scraping once this limit is reached for the tab. | — |
topics | array | Conditional | Enter the topics you want to scrape. Example: '剧情' or '#剧情'. Alternatively, you can also add Topic URLs in the Start URLs section above. | — |
timeout | number | No | 本次 Actor 执行超时,单位秒。 | — |
maxPosts | integer | No | Maximum number of posts to be scraped per search term, topic, profile or hot topic. | 100 |
searchTerms | array | Conditional | Enter one or more keywords to search for. Each keyword runs as a separate search. | — |
sortSearchBy | enum (most_relevant | latest | oldest) | No | 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 |
sortCommentsBy | enum (popular | latest | oldest) | No | 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 |
sortTopicPostsBy | enum (hottest | latest) | No | 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 |
maxTotalChargeUsd | number | No | 按事件计费运行的费用上限,单位美元。 | — |
searchWithinForum | string | No | 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. | "" |
maxCommentsPerPost | integer | No | The maximum number of top-level comments to scrape per post. | 0 |
maxRepliesPerComment | integer | No | The 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-KeySubmit 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
{
"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.

