SocialToAIStart freeConsole

user_posts

POST /v1/user_posts is the user posts action: posts from one account. It is offered on 17 platforms (TikTok, Instagram, X, Reddit, YouTube, Facebook and 11 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.

POSThttps://socialtoai.app/v1/user_posts

Request

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

NameTypeWhereRequiredWhat it is
platformstringbodyYesThe platform to read. One of the platforms this action is offered on.
limitintegerbodyNoOf search, trending, comments and user_posts: how many items you want. Pages are fetched one after another in the one call until there are that many or no more, each page charged as a call; pages not needed cost 0.
max_cost_creditsintegerbodyNoThe most this call may cost. Over it, the call is refused for free and the answer carries the quote.
Idempotency-KeystringheaderNo1 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.

PlatformPrice keyCreditsRequiredOptionalPer page
TikToktiktok.user_posts2usernamesort10
Instagraminstagram.user_posts2usernametype12
Xx.user_posts2usernametab60
Redditreddit.user_posts2username–25
YouTubeyoutube.user_posts2one of id, usernametype, sort60
Facebookfacebook.user_posts2one of id, username, url–3
LinkedInlinkedin.user_posts2one of username, url–10
Threadsthreads.user_posts2username–30
Telegramtelegram.user_posts2username–20
Xiaohongshuxiaohongshu.user_posts12one of id, url–30
Douyindouyin.user_posts2one of id, url–20
Weiboweibo.user_posts2id–25
WeChat Articleswechat.user_posts12idtab20
Bilibilibilibili.user_posts2id–30
Zhihuzhihu.user_posts2username–20
Kuaishoukuaishou.user_posts12id–20
WeChat Channelswechat_channels.user_posts12id–30

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

PlatformPrice keyCreditsSelected by
Zhihuzhihu.user_posts:answers2type=answer
Zhihuzhihu.user_posts:pins2type=pin

Parameters

NameTypeWhat it isTaken by
usernamestringTikTok handle, without the @TikTok, Instagram, X, Reddit, YouTube, Facebook, LinkedIn, Threads, Telegram and Zhihu
sortstringNewest first, or most popular first Values vary by platform: latest, popularTikTok and YouTube
typestringEvery post, or reels only Values vary by platform: all, reel, video, shortInstagram and YouTube
tabstringWhich tab of the profile: posts (retweets among them), replies (the account's own only: the posts of others it replies to are left out, and parent_id names them), or media Values vary by platform: posts, replies, media, articles, videos, imagesX and WeChat Articles
idstringChannel ID, starting with UCYouTube, Facebook, Xiaohongshu, Douyin, Weibo, WeChat Articles, Bilibili, Kuaishou and WeChat Channels
urlstringLink to the page, written facebook.com/handleFacebook, LinkedIn, Xiaohongshu and Douyin

Example

TikTok: The recent videos of one account.

curl https://socialtoai.app/v1/user_posts \  -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \  -H "Idempotency-Key: $(uuidgen)" \  -H "Content-Type: application/json" \  -d '{    "platform": "tiktok",    "username": "nasa"  }'
import osimport uuidimport requestsresponse = requests.post(    "https://socialtoai.app/v1/user_posts",    headers={        "Authorization": f"Bearer {os.environ['SOCIALTOAI_API_KEY']}",        # A new key for each request; the same one again retries it without paying twice.        "Idempotency-Key": str(uuid.uuid4()),    },    json={        "platform": "tiktok",        "username": "nasa",    },)print(response.json())
Response200 OK2 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": [],      "extra": {},      "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 (≈ $0.0067). Balance: 98 credits (≈ $0.33)."  },  "replayed": false}

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

What comes back

The envelope with content 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.

Last updated: