# Post metrics API

> 3 endpoints on 3 platforms return post metrics as the same Post object. The current counts of one post on their own: views or reads, likes, comments, shares and saves, without the text or images. A…

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

3 endpoints on 3 platforms return post metrics as the same Post object. The current counts of one post on their own: views or reads, likes, comments, shares and saves, without the text or images. 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 play count](https://okdata.online/apis/douyin/videos/metrics/) | `GET /v1/douyin/videos/metrics` | 1 | $0.002 per call |
| WeChat Official Accounts | [Official Account article stats](https://okdata.online/apis/wechat_mp/articles/metrics/) | `GET /v1/wechat_mp/articles/metrics` | 1 | $0.02 per call |
| WeChat Channels | [WeChat Channels video stats](https://okdata.online/apis/wechat_channels/videos/metrics/) | `GET /v1/wechat_channels/videos/metrics` | 1 | $0.015 per call |

## 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/metrics" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  --data-urlencode 'id=7706732036270132480'

# WeChat Official Accounts
curl -G "https://api.okdata.online/v1/wechat_mp/articles/metrics" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  --data-urlencode 'url=https://mp.weixin.qq.com/s?__biz=MjM5MjAxNDM4MA==&mid=2667044935&idx=1&sn=05212d520417484f4402bdad73f527ec'
```

## What people use it for

- Re-check the numbers of sponsored posts after a campaign ends.
- Track how fast a post grows in its first 48 hours.
- Feed engagement numbers into a dashboard without storing whole posts.

## Questions

### Don’t post detail endpoints already give metrics?

Yes. Post detail returns metrics with each post, taken at fetch time. On a platform without a metrics endpoint in the table above, use post detail; separate metrics are not available there.

### Why would metrics be a separate call?

On some platforms the counts come from a different request than the post itself, and when you only need the numbers, a smaller answer is easier to store and compare.

### Are the numbers live?

They are what the platform shows at the moment of the call. Store each read with its time if you want a growth curve.

## 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/)
- [Post search API](https://okdata.online/roles/posts-search/)
- [Trending posts API](https://okdata.online/roles/posts-trending/)
- [Account search API](https://okdata.online/roles/accounts-search/)
- [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/)
