Endpoints by data type
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 call costs from $0.002 to $0.02, each endpoint at its own price; a failed call is free.
Post metrics · on each platform
| Platform | Endpoint | Path | A page | Price |
|---|---|---|---|---|
| Douyin | Douyin video play count | GET /v1/douyin/videos/metrics | 1 | $0.002 per call |
| WeChat Official Accounts | Official Account article stats | GET /v1/wechat_mp/articles/metrics | 1 | $0.02 per call |
| WeChat Channels | WeChat Channels video stats | GET /v1/wechat_channels/videos/metrics | 1 | $0.015 per call |
from $0.002 to $0.02 a call, each endpoint at its own price. A call that fails costs nothing.
The object it returns: 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.
# 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.