Baidu Tieba Search Posts
Search public Baidu Tieba posts by a keyword or phrase. Supply the required request_body object with a nonempty keyword, not a post URL, post ID, or pagination token. Optional sort_type accepts newest (default), oldest, or relevance. Leave page_token empty for the first page. To continue, pass the previous response's complete next_page_token unchanged and keep keyword and sort_type unchanged. An empty next_page_token means there are no more results. Success returns items and next_page_token. Items include post IDs, titles, authors, summaries, forum IDs and names, post links, publication and update times, like and share counts, and available images and videos. Times are Unix seconds; update_time may be null. Summaries are not full post bodies. Media may be incomplete, empty media arrays do not mean a post has no media, and media links may expire. Results may change as Tieba changes. Use forum-specific search to restrict results to one forum, or comprehensive search when its post ordering is needed.
Pricing
| Condition | Charge |
|---|---|
| Each call | 28.01 credits/call |
Charged for each successful call; failed requests are not charged.
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
request_body | object | Yes | 搜索请求对象,包含必填关键词及可选排序方式和分页令牌。 | — |
request_body.keyword | string | Yes | 搜索词或关键词短语,例如 方便面、旅行攻略;不要传帖子链接、帖子 ID 或分页令牌。需要限定某个贴吧时使用吧内帖子搜索。 | — |
request_body.sort_type | enum (newest | oldest | relevance) | No | 排序方式:newest 为最新、oldest 为最早、relevance 为相关。 | newest |
request_body.page_token | string | No | 分页令牌;首次留空。续页将上一页完整 next_page_token 原样传回,并保持 keyword 与 sort_type 不变。 | "" |
Invocation example
Copy the request and explore its response example.
/agent-api/v1/tool/executeX-Api-Keycurl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_baidu_tieba_search_posts' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"request_body": {
"keyword": "方便面",
"sort_type": "relevance"
}
}
}'{
"items": [
{
"author": {
"avatar_url": "https://gss0.bdstatic.com/6LZ1dD3d1sgCo2Kml5_Y_D3/sys/portrait/item/tb.1.ee1c741b.8xu2RQL1bpRB8WRcIta-VA",
"name": "贴吧用户_GQDN9EK",
"profile_url": "https://tieba.baidu.com/home/main?id=tb.1.ee1c741b.8xu2RQL1bpRB8WRcIta-VA&fr=frs",
"user_id": "5433572121"
},
"forum_id": "28176889",
"forum_name": "搬石",
"images": [
{
"height": null,
"url": "https://tiebapic.baidu.com/forum/pic/item/b3615b02738da977eb6cf923f651f8198718e36f.jpg?tbpicau=2026-11-22-05_4f83938a92f56fb8377fc75705f1df66",
"width": null
}
],
"like_count": 0,
"title": "方便面大神别具一格的挤酱料方式"
}
],
"next_page_token": "eyJ2IjoxLCJraW5kIjoiYmFpZHVfdGllYmFfc2VhcmNoIiwia2V5d29yZCI6Ilx1NjViOVx1NGZiZlx1OTc2MiIsInNvcnRfdHlwZSI6InJlbGV2YW5jZSIsInBhZ2UiOjJ9.AqlhlmngAhMkh-1Yo7tefBp8G9KfhCM0yvLZgjaf8LM"
}This example shows part of the response. Copied content is valid JSON.

