Weibo Search User Posts
Search a specified Weibo user's posts by keyword, with optional pagination, time boundaries, and post-type filters. Inputs: - uid (required): The user's ID as a string. - q: Search keyword; defaults to "" for no keyword restriction. Other filters still apply. - page: Page number, starting at 1; defaults to 1. - starttime and endtime: Optional start and end Unix timestamps, accepting integers or null. Both have a schema default of 1772294400; omitting them should not be treated as requesting an unrestricted time range. - hasori, hasret, hastext, haspic, hasvideo, hasmusic: Include original posts, reposts, text, images, video, and music, respectively. Each uses 1 for include and 0 for exclude, and defaults to 1. Returns a response containing the search results, described as including post content, author information, and interaction data. The exact result-item structure is not specified, so available fields must be checked in the response. Results are affected by user privacy settings; this tool does not guarantee access to all of a user's posts.
Pricing
| Condition | Charge |
|---|---|
| Each call | 2.07 credits/call |
2.07 credits/call Charges are per query. A successful query is billed even if it returns no results.
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
q | string | No | 搜索关键词/Search keyword | "" |
uid | string | Yes | 用户ID/User ID | — |
page | integer | No | 页数/Page number | 1 |
hasori | integer | No | 是否包含原创微博,1=包含,0=不包含/Include original posts, 1=include, 0=exclude | 1 |
haspic | integer | No | 是否包含图片微博,1=包含,0=不包含/Include image posts, 1=include, 0=exclude | 1 |
hasret | integer | No | 是否包含转发微博,1=包含,0=不包含/Include retweets, 1=include, 0=exclude | 1 |
endtime | integer | null | No | 结束时间戳/End timestamp | 1772294400 |
hastext | integer | No | 是否包含文字微博,1=包含,0=不包含/Include text posts, 1=include, 0=exclude | 1 |
hasmusic | integer | No | 是否包含音乐微博,1=包含,0=不包含/Include music posts, 1=include, 0=exclude | 1 |
hasvideo | integer | No | 是否包含视频微博,1=包含,0=不包含/Include video posts, 1=include, 0=exclude | 1 |
starttime | integer | null | No | 开始时间戳/Start timestamp | 1772294400 |
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_weibo_search_user_posts' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"endtime": 1788192000,
"hasmusic": 1,
"hasori": 1,
"haspic": 1,
"hasret": 1,
"hastext": 1,
"hasvideo": 1,
"page": 2,
"q": "直播",
"starttime": 1767196800,
"uid": "2449560947"
}
}'{
"code": 200,
"data": {
"data": {
"list": [],
"total": 0
},
"ok": 1
},
"docs": "https://api.tikhub.io/#/Weibo-Web-V2-API/search_user_posts_api_v1_weibo_web_v2_search_user_posts_get",
"message": "Request successful. This request will incur a charge.",
"message_zh": "请求成功,本次请求将被计费。",
"params": {
"endtime": "1788192000",
"hasmusic": "1",
"hasori": "1",
"haspic": "1",
"hasret": "1",
"hastext": "1"
}
}This example shows part of the response. Copied content is valid JSON.

