What you get#
Onekey exposes Reddit as 21 endpoints behind one API key: 4 endpoints return one record (data is an object) and 17 endpoints return a list (data is an array). Every answer uses the same envelope (success, data, metadata, error), the cost is reported in metadata.credits_charged, and fields are mapped onto the unified schema so the code you write for Reddit also works for the rest of the social networks category.
Endpoints#
| Endpoint | What it does | Parameters | Credits | Status |
|---|---|---|---|---|
frontpage | Reddit r/all hot posts. | cursor | 2 | beta may need a pack |
new_subreddits | Newly created subreddits. | cursor | 2 | beta may need a pack |
popular_subreddits | Popular subreddits. | cursor | 2 | beta may need a pack |
post | A Reddit post by id (with its listing metadata). | id* | 2 | beta may need a pack |
post_comments | Top-level comments of a Reddit post. | id* | 2 | beta may need a pack |
post_transcript | Transcript of a Reddit video post. | url* | 2 | beta needs a pack |
search_comments | Search Reddit comments across all communities. | query* | 1 | beta may need a pack |
search_media | Search Reddit image and video posts. | query* | 1 | beta may need a pack |
search_posts | Search Reddit posts. | q*, cursor | 2 | beta may need a pack |
search_subreddit | Search posts inside one subreddit. | subreddit*, q*, cursor | 2 | beta may need a pack |
search_subreddits | Search subreddits. | q*, cursor | 2 | beta may need a pack |
subreddit_about | A subreddit's profile. | subreddit* | 2 | beta may need a pack |
subreddit_controversial | Controversial posts of a subreddit (past week). | subreddit*, cursor | 2 | beta may need a pack |
subreddit_hot | Hot posts of a subreddit. | subreddit*, cursor | 2 | beta may need a pack |
subreddit_new | Newest posts of a subreddit. | subreddit*, cursor | 2 | beta may need a pack |
subreddit_rising | Rising posts of a subreddit. | subreddit*, cursor | 2 | beta may need a pack |
subreddit_rules | Rules of a subreddit. | subreddit* | 2 | beta may need a pack |
subreddit_top | Top posts of a subreddit (past week). | subreddit*, cursor | 2 | beta may need a pack |
user_about | A Reddit user's profile. | username* | 1 | beta may need a pack |
user_comments | Comments written by a Reddit user. | username*, cursor | 2 | beta may need a pack |
user_posts | Posts submitted by a Reddit user. | username*, cursor | 2 | beta may need a pack |
A * marks a required parameter. Each endpoint name links to its reference page with the full parameter table, caching window and a recorded response.
Make a request#
This calls reddit.user_about (1 credit, beta). Replace YOUR_API_KEY with your key; sign up, no card. 1,000 free credits cover the open-platform endpoints. Hard-to-reach platforms (X, TikTok, Instagram, Reddit, and others marked on their page) need a verified email and a purchased pack.
curl "https://api.onekey.dev/v1/reddit/user_about?username=spez" \
-H "x-api-key: YOUR_API_KEY"Fields you get back#
These unified fields come back from Reddit, with the same names as on every other platform. The count is how many of its 21 mapped endpoints return the field; a field the source lacks is null, never missing. 3 platform-specific fields (ext.<name>) come on top, documented on each endpoint page.
| Field | Type | Endpoints |
|---|---|---|
content.createdAt | ISO 8601 date | 20 |
content.id | string | 19 |
content.text | string | 19 |
content.title | string | 19 |
entity.name | string | 19 |
author.username | string | 15 |
engagement.likes | integer | 15 |
media.thumbnailUrl | URL | 15 |
engagement.comments | integer | 12 |
content.url | URL | 11 |
engagement.upvoteRatio | number | 10 |
entity.stats.followers | integer | 4 |
author.avatarUrl | URL | 1 |
author.id | string | 1 |
content.language | string | 1 |
media.url | URL | 1 |
The full schema is in Unified schema.
Pricing#
Reddit calls cost 1 to 2 credits, flat per endpoint. Free when served from cache (0.2 credit for a cached response over 100 KB). Invalid, failed or not-found calls are not charged. See pricing for credit packs.