For AI

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

PlatformEndpointPathA pagePrice
DouyinDouyin video play countGET /v1/douyin/videos/metrics1$0.002 per call
WeChat Official AccountsOfficial Account article statsGET /v1/wechat_mp/articles/metrics1$0.02 per call
WeChat ChannelsWeChat Channels video statsGET /v1/wechat_channels/videos/metrics1$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.

FieldTypeMeaning
idstringPost ID on the platform.
urlstringLink to the post.
typestringWhat kind of post it is.
titlestring | nullTitle, where the platform has one (videos, notes, articles).
textstringCaption, body or description as plain text; articles come as Markdown.
langstring | nullLanguage code, as reported or detected.
published_atstring | nullWhen 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.
authorAccountRefWho posted it.
metricsMetricsCounts at fetch time; a count the platform hides is null.
imagesstring[] | nullImage URLs for image posts and notes.
hashtagsstring[] | nullHashtags or topics, without the # sign.
extobjectPlatform-specific extras. Only returned with view=full.

The same call on two platforms

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

cURL
# 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.

Connect once, then just ask.

Every new key comes with $0.10 to try it. One sentence connects your agent.

Start free
Connect your AI

Paste this into your agent

Read https://okdata.online/agents.md and set up okdata for me; my key is in the OKDATA_API_KEY environment variable.

Claude Code, Cursor, Codex and other agents that can open a link set themselves up from it.

MCP serverhttps://api.okdata.online/mcp