# Weibo User Post Search API

> Returns posts from a specified Weibo user matching optional search keywords. Supports filtering by post types such as images, videos, and retweets, as well as date ranges.

Source: https://www.sandbase.ai/apis/weibo/web-v2/search-user-posts
API reference: https://www.sandbase.ai/apis/weibo/web-v2/search-user-posts/docs

## Facts

- Provider: Weibo
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/weibo/web-v2/search-user-posts`
- Price: $0.0015 per call
- Free allowance: 100 calls per organization per UTC day, shared across eligible APIs
- Capabilities: api, weibo
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

`POST https://api.sandbase.ai/v1/api/weibo/web-v2/search-user-posts` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `uid` | string | yes |  |
| `endtime` | any | no |  |
| `hasmusic` | integer | no |  |
| `hasori` | integer | no |  |
| `haspic` | integer | no |  |
| `hasret` | integer | no |  |
| `hastext` | integer | no |  |
| `hasvideo` | integer | no |  |
| `page` | integer | no |  |
| `q` | string | no |  |
| `starttime` | any | no |  |

## FAQ

### How do I use the Weibo User Post Search API?

Send a POST request to https://api.sandbase.ai/v1/api/weibo/web-v2/search-user-posts with your SandBase API key in the Authorization header (Bearer) and the parameters as a JSON body. You can also try it in the Playground on this page without writing code.

### How much does the Weibo User Post Search API cost?

$0.0015 per call. Every organization gets 100 free calls per UTC day, shared across eligible SandBase APIs including this one; after that each call is billed at this price from your SandBase balance. There is no subscription.

### What parameters does the Weibo User Post Search API accept?

Required: uid (string). Optional: endtime (any), hasmusic (integer), hasori (integer), haspic (integer), hasret (integer) and hastext (integer) and 4 more. The Parameters table and the Playground on this page list every field.

### What does the Weibo User Post Search API return?

A JSON response returned in the same HTTP request (synchronous).

### Do I need a Weibo developer account or API key?

No. Weibo User Post Search runs through SandBase, so one SandBase API key covers this endpoint and every other API and model in the catalog. You do not need to apply for Weibo API access separately.

## README

### Weibo User Post Search API

Search posts from a specific Weibo account using `uid`. Filter results by keyword with `q`, media format flags, and Unix timestamp bounds.

#### Use cases

- Search a specific Weibo creator timeline for keyword or brand mentions.
- Filter an account post history by media type such as images or videos.
- Retrieve user posts within a specific time range using timestamps.

#### Request

```bash
curl -X POST "https://api.sandbase.ai/v1/api/weibo/web-v2/search-user-posts" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"uid": "8431518763"}'
```

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `uid` | string | Yes | User ID (required) |
| `q` | string | No | Search keyword (optional, empty string means search all content) |
| `page` | integer | No | Page number, starts from 1 (default 1) |
| `hasori` | integer | No | Include original posts (default 1 include) |
| `haspic` | integer | No | Include image posts (default 1 include) |
| `hasret` | integer | No | Include retweets (default 1 include) |
| `endtime` | string | No | End timestamp (optional, Unix timestamp format) |
| `hastext` | integer | No | Include text posts (default 1 include) |
| `hasmusic` | integer | No | Include music posts (default 1 include) |
| `hasvideo` | integer | No | Include video posts (default 1 include) |
| `starttime` | string | No | Start timestamp (optional, Unix timestamp format) |

#### Notes

- `uid` is required, while `q` can be left empty to return all content.
- Pagination is handled with `page`, which defaults to 1.
- Date filters `starttime` and `endtime` accept Unix timestamps.

#### Related APIs

- [Weibo Advanced Search](/model/weibo/web-v2/advanced-search): Search Weibo posts by keyword with filters for time range, post type (hot, original, verified, media) and content type (images, video, links).
- [Weibo AI Related Search Content](/model/weibo/web-v2/ai-related-search): Returns AI-generated content extensions for a keyword, including related questions, recommended bloggers, and reference posts.
- [Weibo AI Search](/model/weibo/web-v2/ai-search): Returns multimodal search results and relevance scores from Weibo intelligent search for a specified keyword or topic query.
