Answers
How fresh is the data from a social media API?
Short answer
On okdata each call reads the platform at the moment you make it, and every response records when the data was read and whether a short-lived cache answered instead. So a number is as fresh as your last call: refreshing a TikTok video's stats costs $0.002, an X post $0.001, and the Douyin hot search list $0.002.
A report says a competitor's video has 1.2 million views. As of when? If nobody can answer, the number is not much use, and arguments about view counts that look wrong usually come down to two readings taken at different times. Freshness is a property of each response, so the useful habit is to keep the timestamp with the number.
What each response tells you
meta.fetched_at: when the data was read from the platform.meta.cached:trueonly if a short-lived cache answered instead of a fresh read.
Every metric in the response is a snapshot as of fetched_at. Likes keep rising after you read them; nothing updates in place.
curl -s -G "https://api.okdata.online/v1/x/posts/get" \
-H "Authorization: Bearer $OKDATA_API_KEY" \
--data-urlencode 'url=https://x.com/user/status/1850000000000000000' \
| jq '{fetched_at: .meta.fetched_at, cached: .meta.cached, metrics: .data.item.metrics}'
How fresh do you need it, and what it costs
| Use | Endpoint | Refresh | Cost |
|---|---|---|---|
| Hot search tracking | Douyin hot search board | hourly for a day | $0.048 |
| Same for Weibo | Weibo hot search | hourly for a month | $1.44 |
| Campaign video stats | TikTok video detail | 100 videos daily for 30 days | $6.00 |
| A viral post's reach | X post detail | every 15 minutes for 6 hours | $0.024 |
Most reporting needs daily numbers. Hot lists are the exception: they turn over within hours, so an hourly snapshot is what makes a history worth having.
Things that look like staleness but are not
- Platform-side delay. Some platforms update public counts on their own schedule. Two reads a minute apart can differ by more than the real change, or not at all.
- Hidden numbers. When a platform does not show a metric publicly, it comes back null and
meta.unavailablenames it. A null is not an old value. - Your own cache. A spreadsheet or dashboard that stores old responses will show old numbers. Show
fetched_atnext to every figure.
If you track numbers over time, poll at a fixed interval and store each snapshot with its timestamp, instead of overwriting the last value. The trend research guide shows that pattern for hot lists.
Updated