# Weibo User Timeline API

> Get the posts on a Weibo user's timeline: text, publish time, region, images and repost, comment and like counts, with page and month filters.

Source: https://www.sandbase.ai/model/weibo/app/user-timeline
API reference: https://www.sandbase.ai/model/weibo/app/user-timeline/docs

## Facts

- Provider: Weibo
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/weibo/app/user-timeline`
- 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/app/user-timeline` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `uid` | string | yes |  |
| `filter_type` | string | no |  |
| `month` | any | no |  |
| `page` | integer | no |  |

## FAQ

### How do I use the Weibo User Timeline API?

Send a POST request to https://api.sandbase.ai/v1/api/weibo/app/user-timeline 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 Timeline 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 Timeline API accept?

Required: uid (string). Optional: filter_type (string), month (any) and page (integer). The Parameters table and the Playground on this page list every field.

### What does the Weibo User Timeline API return?

A JSON response returned in the same HTTP request (synchronous). The README on this page includes a sample response.

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

No. Weibo User Timeline 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 Timeline API

Pass a Weibo user ID and get that user's posts page by page, with full engagement counts.

#### Use cases

- Monitor posts from brands, media or public figures.
- Analyze posting frequency and engagement.
- Archive an account's posts.

#### Request

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

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `uid` | string | Yes | User ID (required) |
| `page` | integer | No | Page number, starts from 1 (default 1) |
| `month` | string | No | Time filter parameter, format YYYYMMDD (only used when filter_type=month) |
| `filter_type` | string | No | Filter type (default "all") |

#### Example response

Real response for the request above, trimmed to the main fields. User names and long IDs are masked.

```json
{
  "items": [
    {
      "category": "feed",
      "data": {
        "id": 5019473113516768,
        "mblogid": "O8aAfeKS4",
        "created_at": "Thu Apr 04 16:25:10 +0800 2024",
        "reposts_count": 796,
        "comments_count": 11619,
        "attitudes_count": 38445,
        "region_name": "发布于 浙江",
        "pic_num": 0,
        "text": "<post text>",
        "user": {
          "screen_name": "<user>"
        }
      }
    }
  ],
  "pageData": {
    "page": 1
  }
}
```

#### Notes

- `filter_type` filters the timeline (default `all`); use `month` (YYYYMMDD) with `filter_type=month`.

#### Related APIs

- [AI Smart Search](/model/weibo/app/ai-smart-search): App Ai Smart Search provides a focused capability for applications, automation, and data workflows.
- [Get home recommend feed](/model/weibo/app/home-recommend-feed): Get the home recommend feed from Weibo.
- [Get hot search](/model/weibo/app/hot-search): Get Weibo hot search ranking, supports multiple categories.
