search
POST /v1/search is the search action: find posts or accounts by keyword. It is offered on 16 platforms (TikTok, Instagram, X, Reddit, YouTube, LinkedIn and 10 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.
https://api.socialtoai.com/v1/searchRequest
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 | tiktok.search | 2 | query | sort, published_within | 30 |
instagram.search:user | 3 | query, type=user | – | 50 | |
| X | x.search | 2 | query | sort | 20 |
reddit.search | 2 | query | sort, published_within | 25 | |
| YouTube | youtube.search | 2 | query | sort, published_within | 100 |
linkedin.search | 2 | query | published_within | 10 | |
| Threads | threads.search | 2 | query | since, until | 20 |
pinterest.search | 2 | query | – | 50 | |
| Xiaohongshu | xiaohongshu.search | 12 | query | sort | 20 |
| Douyin | douyin.search | 12 | query | sort, published_within | 20 |
weibo.search | 2 | query | – | 20 | |
| WeChat Articles | wechat.search | 12 | query | sort, published_within | 30 |
| Bilibili | bilibili.search | 2 | query | sort | 20 |
| Zhihu | zhihu.search | 2 | query | type, sort | 20 |
| Kuaishou | kuaishou.search | 12 | query | – | 20 |
| WeChat Channels | wechat_channels.search | 12 | query | sort, published_within | 20 |
Some platforms have another form of this action, selected by a parameter and priced on its own:
| Platform | Price key | Credits | Selected by |
|---|---|---|---|
| TikTok | tiktok.search:user | 2 | type=user |
| X | x.search:latest | 2 | sort=latest |
| X | x.search:user | 5 | type=user |
| Xiaohongshu | xiaohongshu.search:user | 12 | type=user |
| Xiaohongshu | xiaohongshu.search:image | 12 | type=image |
| Douyin | douyin.search:user | 2 | type=user |
weibo.search:user | 2 | type=user | |
| Zhihu | zhihu.search:user | 2 | type=user |
Parameters
| Name | Type | What it is | Taken by |
|---|---|---|---|
query | string | Search terms | All |
sort | string | By relevance, by likes, or newest first Values vary by platform: relevance, popular, latest | TikTok, X, Reddit, YouTube, Xiaohongshu, Douyin, WeChat Articles, Bilibili, Zhihu and WeChat Channels |
published_within | string | Only videos posted within this period Values vary by platform: day, week, month, half_year, year | TikTok, Reddit, YouTube, LinkedIn, Douyin, WeChat Articles and WeChat Channels |
since | datetime | Published on or after this day (filtered by UTC date; the time of day is ignored) | Threads |
until | datetime | Published on or before this day (filtered by UTC date; the time of day is ignored) | Threads |
type | string | Answers only, or articles only; both when left out Values vary by platform: answer, article | Zhihu |
Example
TikTok: Find videos by keyword: text, author, likes, comment count, views and publish time.
curl https://api.socialtoai.com/v1/search \ -H "Authorization: Bearer $SOCIALTOAI_KEY" \ -H "Content-Type: application/json" \ -d '{ "platform": "tiktok", "query": "space station" }'import osimport requestsresponse = requests.post( "https://api.socialtoai.com/v1/search", headers={"Authorization": f"Bearer {os.environ['SOCIALTOAI_KEY']}"}, json={ "platform": "tiktok", "query": "space station", },)print(response.json()){ "request_id": "req_00000000-0000-4000-8000-000000000001", "schema_version": "v1", "fetched_at": "2026-10-12T19:17:24.000Z", "action": "search", "platform": "tiktok", "status": "ok", "items": [ { "platform": "tiktok", "id": "…", "ref": "…", "approx": [], "type": "content", "url": "https://example.com/…", "format": "video", "title": null, "text": "…", "published_at": "2026-10-11T23:17:34.000Z", "author": { "id": "…", "username": "…", "name": "…", "verified": null, "followers": 92601 }, "metrics": { "likes": 353, "comments": 11, "shares": 19, "collects": 40, "views": 7561, "reposts": null }, "images": null, "hashtags": ["…", "…"], "is_pinned": null } ], "unavailable": ["title", "author.verified", "metrics.reposts", "images", "is_pinned"], "page": { "has_more": true, "cursor": "cur_…", "cursor_expires_at": "2026-10-12T19:47:24.000Z" }, "warnings": [], "applied_params": { "query": "space station" }, "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 with content and account items. One call returns one page of up to 30 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: