# user_posts

POST /v1/user_posts is the user posts action: posts from one account. It is offered on 15 platforms (TikTok, Instagram, X, Reddit, Facebook, LinkedIn and 9 more), and the platform is a parameter of the request. One call costs 2 to 12 credits, depending on the platform; a call that fails costs nothing.

- Page: https://socialtoai.com/docs/api/user-posts/
- Last updated: 2026-10-17

- POST: `https://api.socialtoai.com/v1/user_posts`

## Request

A JSON body. These are the same for every action; the rest depends on the platform, below.

| Name | Type | Where | Required | What it is |
| --- | --- | --- | --- | --- |
| `platform` | string | body | Yes | The platform to read. One of the platforms this action is offered on. |
| `max_cost_credits` | integer | body | No | The most this call may cost. Over it, the call is refused for free and the answer carries the quote. |
| `Idempotency-Key` | string | header | No | 1 to 255 visible ASCII characters. The same key with the same parameters returns the first result again and is not charged twice. |

## Platforms and credits

Each platform takes its own parameters. Its own page has the full parameter and field tables and a request you can change.

| Platform | Price key | Credits | Required | Optional | Per page |
| --- | --- | --- | --- | --- | --- |
| [TikTok](https://socialtoai.com/tiktok-user-posts-api.md) | `tiktok.user_posts` | 2 | `username` | `sort` | 10 |
| [Instagram](https://socialtoai.com/instagram-user-posts-api.md) | `instagram.user_posts` | 2 | `username` | `type` | 12 |
| [X](https://socialtoai.com/x-user-posts-api.md) | `x.user_posts` | 2 | `username` | `tab` | 60 |
| [Reddit](https://socialtoai.com/reddit-user-posts-api.md) | `reddit.user_posts` | 2 | `username` | – | 25 |
| [Facebook](https://socialtoai.com/facebook-user-posts-api.md) | `facebook.user_posts` | 2 | one of `id`, `username`, `url` | – | 3 |
| [LinkedIn](https://socialtoai.com/linkedin-user-posts-api.md) | `linkedin.user_posts` | 2 | one of `username`, `url` | – | 10 |
| [Threads](https://socialtoai.com/threads-user-posts-api.md) | `threads.user_posts` | 2 | `username` | – | 30 |
| [Telegram](https://socialtoai.com/telegram-user-posts-api.md) | `telegram.user_posts` | 2 | `username` | – | 20 |
| [Xiaohongshu](https://socialtoai.com/xiaohongshu-user-posts-api.md) | `xiaohongshu.user_posts` | 12 | one of `id`, `url` | – | 30 |
| [Douyin](https://socialtoai.com/douyin-user-posts-api.md) | `douyin.user_posts` | 2 | `id` | – | 20 |
| [WeChat Articles](https://socialtoai.com/wechat-user-posts-api.md) | `wechat.user_posts` | 12 | `id` | – | 20 |
| [Bilibili](https://socialtoai.com/bilibili-user-posts-api.md) | `bilibili.user_posts` | 2 | `id` | – | 30 |
| [Zhihu](https://socialtoai.com/zhihu-user-posts-api.md) | `zhihu.user_posts` | 2 | `username` | – | 20 |
| [Kuaishou](https://socialtoai.com/kuaishou-user-posts-api.md) | `kuaishou.user_posts` | 12 | `id` | – | 20 |
| [WeChat Channels](https://socialtoai.com/wechat-channels-user-posts-api.md) | `wechat_channels.user_posts` | 12 | `id` | – | 30 |

Some platforms have another form of this action, selected by a parameter and priced on its own:

| Platform | Price key | Credits | Selected by |
| --- | --- | --- | --- |
| Zhihu | `zhihu.user_posts:answers` | 2 | `type=answer` |
| Zhihu | `zhihu.user_posts:pins` | 2 | `type=pin` |

## Parameters

| Name | Type | What it is | Taken by |
| --- | --- | --- | --- |
| `username` | string | TikTok handle, without the @ | TikTok, Instagram, X, Reddit, Facebook, LinkedIn, Threads, Telegram and Zhihu |
| `sort` | string | Newest first, or most popular first Values vary by platform: `latest`, `popular` | TikTok |
| `type` | string | Every post, or reels only Values vary by platform: `all`, `reel` | Instagram |
| `tab` | string | Which tab of the profile: posts (retweets among them), replies (with the posts replied to), or media Values vary by platform: `posts`, `replies`, `media` | X |
| `id` | string | Page ID, a string of digits; faster than the handle | Facebook, Xiaohongshu, Douyin, WeChat Articles, Bilibili, Kuaishou and WeChat Channels |
| `url` | string | Link to the page, written facebook.com/handle | Facebook, LinkedIn and Xiaohongshu |

## Example

TikTok: The recent videos of one account.

**cURL**

```
curl https://api.socialtoai.com/v1/user_posts \
  -H "Authorization: Bearer $SOCIALTOAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "tiktok",
    "username": "nasa"
  }'
```

**Python**

```
import os
import requests

response = requests.post(
    "https://api.socialtoai.com/v1/user_posts",
    headers={"Authorization": f"Bearer {os.environ['SOCIALTOAI_KEY']}"},
    json={
        "platform": "tiktok",
        "username": "nasa",
    },
)
print(response.json())
```

**Response** (200 OK, 2 credits)

```
{
  "request_id": "req_00000000-0000-4000-8000-000000000001",
  "schema_version": "v1",
  "fetched_at": "2026-10-12T18:45:11.000Z",
  "action": "user_posts",
  "platform": "tiktok",
  "status": "ok",
  "items": [
    {
      "platform": "tiktok",
      "id": "…",
      "ref": "…",
      "approx": [],
      "type": "content",
      "url": "https://example.com/…",
      "format": "video",
      "title": null,
      "text": "…",
      "published_at": "2026-07-21T20:09:02.000Z",
      "author": {
        "id": "…",
        "username": "…",
        "name": "…",
        "verified": null,
        "followers": 2060928
      },
      "metrics": {
        "likes": 103312,
        "comments": 3021,
        "shares": 3253,
        "collects": 7513,
        "views": 1592522,
        "reposts": null
      },
      "images": null,
      "hashtags": [],
      "is_pinned": true
    }
  ],
  "unavailable": ["title", "author.verified", "metrics.reposts", "images"],
  "page": {
    "has_more": true,
    "cursor": "cur_…",
    "cursor_expires_at": "2026-10-12T19:15:11.000Z"
  },
  "warnings": [],
  "applied_params": {
    "username": "nasa"
  },
  "cost_credits": 2,
  "billing": {
    "cost_credits": 2,
    "balance_credits": 98,
    "today_spend_credits": 2,
    "daily_limit_credits": null,
    "daily_remaining_credits": null,
    "display": "This call: 2 credits. Balance: 98 credits."
  },
  "replayed": false
}
```

_Sample data: names, links and text are replaced by placeholders._

## What comes back

The [envelope](https://socialtoai.com/docs/api/response.md) with [`content`](https://socialtoai.com/docs/api/response.md) items. One call returns one page of up to 10 items; each page is its own call. A cursor works for up to 30 minutes.

A failed call costs 0 credits and says why: see [Errors](https://socialtoai.com/docs/api/errors.md).
