# Post search API

> 12 endpoints on 12 platforms return search results as the same Post object. Posts, videos, notes or articles that match a keyword, as the platform’s own search returns them, a page at a time, each…

Canonical page: https://okdata.online/roles/posts-search/

12 endpoints on 12 platforms return search results as the same Post object. Posts, videos, notes or articles that match a keyword, as the platform’s own search returns them, a page at a time, each with its author and counts. A call costs from $0.002 to $0.02, each endpoint at its own price; a failed call is free.

## on each platform

| Platform | Endpoint | Path | A page | Price |
|---|---|---|---|---|
| Douyin | [Douyin video search](https://okdata.online/apis/douyin/videos/search/) | `GET /v1/douyin/videos/search` | 20 | $0.02 per call · about 20 videos per page |
| Xiaohongshu (RedNote) | [Xiaohongshu note search](https://okdata.online/apis/xiaohongshu/notes/search/) | `GET /v1/xiaohongshu/notes/search` | 20 | $0.02 per call · about 20 notes per page |
| Bilibili | [Bilibili video search](https://okdata.online/apis/bilibili/videos/search/) | `GET /v1/bilibili/videos/search` | 20 | $0.002 per call · about 20 videos per page |
| Weibo | [Weibo post search](https://okdata.online/apis/weibo/posts/search/) | `GET /v1/weibo/posts/search` | 10 | $0.002 per call · about 10 posts per page |
| TikTok | [TikTok video search](https://okdata.online/apis/tiktok/videos/search/) | `GET /v1/tiktok/videos/search` | 30 | $0.002 per call · about 30 videos per page |
| X (Twitter) | [X post search](https://okdata.online/apis/x/posts/search/) | `GET /v1/x/posts/search` | 20 | $0.002 per call · about 20 posts per page |
| YouTube | [YouTube video search](https://okdata.online/apis/youtube/videos/search/) | `GET /v1/youtube/videos/search` | 20 | $0.004 per call · about 20 videos per page |
| Reddit | [Reddit post search](https://okdata.online/apis/reddit/posts/search/) | `GET /v1/reddit/posts/search` | 25 | $0.004 per call · about 25 posts per page |
| Kuaishou | [Kuaishou video search](https://okdata.online/apis/kuaishou/videos/search/) | `GET /v1/kuaishou/videos/search` | 10 | $0.02 per call · about 10 videos per page |
| Zhihu | [Zhihu search](https://okdata.online/apis/zhihu/posts/search/) | `GET /v1/zhihu/posts/search` | 20 | $0.002 per call · about 20 posts per page |
| WeChat Channels | [WeChat Channels video search](https://okdata.online/apis/wechat_channels/videos/search/) | `GET /v1/wechat_channels/videos/search` | 10 | $0.02 per call · about 10 videos per page |
| WeChat Search | [WeChat Search articles and videos](https://okdata.online/apis/wechat/posts/search/) | `GET /v1/wechat/posts/search` | 20 | $0.02 per call · about 20 posts per page |

## The object it returns: [Post](https://okdata.online/docs/objects/post/)

Every endpoint above returns these fields with the same names and types. A field a platform does not show comes back null and is named in meta.unavailable.

| Field | Type | Meaning |
|---|---|---|
| `id` | `string` | Post ID on the platform. |
| `url` | `string` | Link to the post. |
| `type` | `string` | What kind of post it is. |
| `title` | `string \| null` | Title, where the platform has one (videos, notes, articles). |
| `text` | `string` | Caption, body or description as plain text; articles come as Markdown. |
| `lang` | `string \| null` | Language code, as reported or detected. |
| `published_at` | `string \| null` | When it was published, ISO 8601 in UTC; null only where the source gives no time (wechat_mp.articles.metrics, wechat_channels.videos.metrics, youtube.channels.videos.list with type=short), then listed in meta.unavailable. |
| `author` | `AccountRef` | Who posted it. |
| `metrics` | `Metrics` | Counts at fetch time; a count the platform hides is null. |
| `images` | `string[] \| null` | Image URLs for image posts and notes. |
| `hashtags` | `string[] \| null` | Hashtags or topics, without the # sign. |
| `ext` | `object` | Platform-specific extras. Only returned with view=full. |

## The same call on two platforms

Same parameters, same paging, same response shape. Only the path changes.

```bash
# Douyin
curl -G "https://api.okdata.online/v1/douyin/videos/search" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  --data-urlencode 'query=露营装备'

# Xiaohongshu (RedNote)
curl -G "https://api.okdata.online/v1/xiaohongshu/notes/search" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  --data-urlencode 'query=防晒霜 推荐'
```

## What people use it for

- Watch what people post about your brand or product name every day.
- Find the best-performing posts on a topic before you write your own.
- Compare how the same keyword plays on Douyin, Xiaohongshu and TikTok.

## Questions

### Will I see the same results as in the app?

They come from the platform’s own search, in the order you pick with sort, so they are close to the app. Like the app, they can shift between two searches a few minutes apart.

### How many results can I get for one keyword?

Page through with the cursor until page.has_more is false. Every platform stops somewhere, and the depth differs by platform and keyword. Each page is one call.

### Can I limit results to recent posts?

Most endpoints take sort=latest. Some also take a time filter, such as Reddit, Kuaishou and WeChat Channels; the parameters are on each endpoint page.

## Other data types

- [Comments API](https://okdata.online/roles/posts-comments-list/)
- [Trending topics API](https://okdata.online/roles/trends-list/)
- [Comment replies API](https://okdata.online/roles/comments-replies-list/)
- [Hashtag posts API](https://okdata.online/roles/topics-posts-list/)
- [Profile API](https://okdata.online/roles/accounts-get/)
- [Account posts API](https://okdata.online/roles/accounts-posts-list/)
- [Post detail API](https://okdata.online/roles/posts-get/)
- [Trending posts API](https://okdata.online/roles/posts-trending/)
- [Account search API](https://okdata.online/roles/accounts-search/)
- [Post metrics API](https://okdata.online/roles/posts-metrics/)
- [Community posts API](https://okdata.online/roles/communities-posts-list/)
- [Ad detail API](https://okdata.online/roles/ads-get/)
- [Advertiser ads API](https://okdata.online/roles/advertisers-ads-list/)
- [Ad search API](https://okdata.online/roles/ads-search/)
- [Transcript API](https://okdata.online/roles/transcripts-get/)
- [Followers list API](https://okdata.online/roles/accounts-followers-list/)
- [Product detail API](https://okdata.online/roles/products-get/)
- [Product reviews API](https://okdata.online/roles/products-reviews-list/)
- [Product search API](https://okdata.online/roles/products-search/)
- [Creator search API](https://okdata.online/roles/creators-search/)
- [Creator profile API](https://okdata.online/roles/creators-get/)
- [Creator audience API](https://okdata.online/roles/creators-audience-get/)
