For AI

Endpoints by data type

Community posts API

2 endpoints on 2 platforms return community posts as the same Post object. The posts inside one community, group or forum, hot, newest or top first, each with its title, text, author, score and comment count. A call costs from $0.0003 to $0.004, each endpoint at its own price; a failed call is free.

Community posts · on each platform

PlatformEndpointPathA pagePrice
RedditReddit community postsGET /v1/reddit/subreddits/posts/list25$0.004 per call · about 25 posts per page
X (Twitter)X community postsGET /v1/x/communities/posts/list20$0.0003 per post · at most $0.006 per call

from $0.0003 to $0.004 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
# Reddit
curl -G "https://api.okdata.online/v1/reddit/subreddits/posts/list" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  --data-urlencode 'id=nasa'

# X (Twitter)
curl -G "https://api.okdata.online/v1/x/communities/posts/list" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  --data-urlencode 'id=1539231166569410560'

What people use it for

  • Read what a product’s own community complains about this week.
  • Collect the top posts of a niche community as research material.
  • Watch a community for posts that mention your brand.

Questions

Which order should I use?
Hot for what members discuss now, newest for monitoring, top for the best posts over a period. Where a top order takes a time window, the endpoint page says which windows it accepts.
How is this different from search?
Search looks across the whole platform for your words. A community list stays inside one community and returns its posts whether or not they contain your keyword.
Which platforms have it?
Platforms built around named communities, such as forums with sub-groups. Endpoints are added one platform at a time; the table above lists the ones you can call now.

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