Baidu Tieba Get Post Comments
Read first-level comments from a Baidu Tieba thread. Supply the required request_body with exactly one of thread_id (numeric ID as a string) or url (a full thread link supporting /p/numericID/). Search results' thread_id and post_url can supply these values respectively. Optional sort_type is hot (default), newest, or oldest; actual ordering is determined by Tieba. Pagination uses page_token: leave it empty initially, then copy the complete next_page_token from the preceding response unchanged and keep the same thread and sort_type. An empty next_page_token means no more results. Do not use search tokens or tokens from other threads. Success returns items and next_page_token. Comments include ID, thread floor number, plain-text content, publication time in Unix seconds, like count, nested-reply count and presence flag, author details, IP location, and recognized user mentions. Nested-reply content is not returned. Emoji are represented as [表情]. Anonymous authors have empty ID, name, and profile URL and a default avatar. Missing IP location is empty and does not establish location at posting time; mentions do not establish reply relationships. HTTP 200 may instead contain a business error; do not treat HTTP 200 alone as success.
Pricing
| Condition | Charge |
|---|---|
| Each call | 28.01 credits/call |
The fixed fee per call is 28.01 credits.
Successful calls are charged per call; failed calls are not charged. When retrieving subsequent pages, each successful call is charged separately. The number of comments returned does not affect the fee for that call.
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
request_body | object | Yes | 评论查询请求;提供 thread_id 或 url 二选一,可指定排序和分页令牌。 | — |
request_body.url | string | null | No | 百度贴吧主题帖完整链接,可取搜索结果的 post_url,支持 /p/数字ID/;不要传纯 ID。与 thread_id 二选一。 | null |
request_body.sort_type | enum (newest | oldest | hot) | No | 评论排序请求:hot 请求热门评论(默认),newest 请求最新评论,oldest 请求最早评论;实际返回顺序以贴吧为准。 | hot |
request_body.thread_id | string | null | No | 主题帖数字 ID,可取搜索结果的 thread_id;不要传帖子链接。与 url 二选一。 | null |
request_body.page_token | string | No | 分页令牌;首次留空。续页将上一页完整 next_page_token 原样传回,并保持同一帖子与 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_get_post_comments' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"request_body": {
"thread_id": "11177657812"
}
}
}'{
"items": [
{
"author": {
"avatar_url": "https://gss0.bdstatic.com/6LZ1dD3d1sgCo2Kml5_Y_D3/sys/portrait/item/tb.1.b3b037e6.n3TRMJc7jl7cL6FEQ6WK_g?t=1794370663",
"name": "吃瓜群众279",
"profile_url": "https://tieba.baidu.com/home/main?id=tb.1.b3b037e6.n3TRMJc7jl7cL6FEQ6WK_g%3Ft%3D1794370663&fr=frs",
"user_id": "2579521610"
},
"comment_id": "154119181015",
"content": "是人啊,这,。。。。这是ai图片吧",
"floor": 0,
"has_replies": true,
"ip_location": "河北"
}
],
"next_page_token": ""
}This example shows part of the response. Copied content is valid JSON.

