Reddit Subreddit Posts
Subreddit posts are public community submissions with titles, body text, authors, flair, media, publication times, and visible voting and comment signals. These content, context, and engagement fields support community monitoring, topic research, and aligned comparisons across subreddit listings.
Reddit Subreddit Posts API Features
- Subreddit listing discoveryDiscover public posts from accepted /r/{subreddit} URLs and choose the new, top, or hot listing for every subreddit in the request.
- Per-subreddit collection depthApply results_limit separately to each submitted subreddit URL, with a default of 100 and an accepted range from 1 through 2,000.
- Normalized post content and authorsReturn post identifiers, source URLs, titles, body text, available author fields, and media references in a consistent record shape.
- Community and engagement contextKeep flair, community details, publication and collection times, upvotes_count, comments_count, upvote_ratio, and discovery_input with each post.
Reddit Subreddit Posts API Parameters
| Parameters | Required | Description |
|---|---|---|
urls | Required | Required list of public Reddit subreddit URLs using the exact /r/{subreddit} path on a supported Reddit host. |
results_limit | Optional | Maximum posts requested for each subreddit URL; defaults to 100 and accepts integers from 1 through 2,000. |
sort_by | Optional | Listing applied to every submitted subreddit URL; defaults to new and supports new, top, or hot. |
How to Use the Reddit Subreddit Posts API
Submit public subreddit URLs to the Reddit Subreddit Posts API with one listing mode and a per-subreddit result limit, then read the asynchronous task results with cursor pagination.
- Prepare one or more public Reddit URLs whose path is /r/{subreddit}.
- POST urls, results_limit, and sort_by to /v1/reddit/subreddit-posts, then store the returned task_id.
- Poll /v1/tasks/{task_id} until the task succeeds or returns a failure.
- Read data.results.items and request the returned next_cursor while has_more remains true.
curl -X POST "https://api.socq.ai/v1/reddit/subreddit-posts" \
-H "Authorization: Bearer $SOCQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{"urls":["https://www.reddit.com/r/learnpython/"],"results_limit":100,"sort_by":"new"}'
# Poll GET /v1/tasks/{task_id}
# Read data.results.items and follow next_cursor while has_more is trueReddit Subreddit Posts API Use Cases
- Community post monitoring: Collect the new listing with the Reddit Subreddit Posts API and retain post IDs, created_at, collected_at, titles, and text to review recent public submissions across selected subreddits.
- Subreddit topic research: Group titles, body text, flair, and community fields to examine recurring subjects and formats within defined public communities.
- Aligned listing comparison: Use the same sort_by across subreddit URLs and compare publication times, upvotes_count, comments_count, and upvote_ratio under one listing mode.
Reddit Subreddit Posts API Pro Tips
- Submit the canonical /r/{subreddit} home URL rather than a subreddit name, post URL, or deeper path so the request passes URL validation.
- Calculate requested depth as the number of urls multiplied by results_limit because the limit and credit estimate apply separately to each subreddit.
- Run separate Reddit Subreddit Posts API tasks when comparing new, top, and hot because one sort_by value is applied to every subreddit URL in a request.
- Retain discovery_input and collected_at with each record so downstream datasets preserve the source subreddit and observation time.
- Allow author, media, flair, community, timestamp, and engagement fields to be null or empty when a public listing does not expose them.
Related APIs
Beyond the Reddit Subreddit Posts API, use these APIs when you need a different type of public Reddit data.
- Reddit Posts API — Collect public post text, authors, community context, media, timestamps, and visible engagement from supported Reddit URLs.
- Reddit Comments API — Collect public comment text, authors, post and parent-comment references, community context, timestamps, and visible engagement from supported post URLs.
- Reddit Search API — Search public Reddit posts by text query and publication window, returning normalized content, authors, community context, timestamps, media, and visible engagement.
- Reddit Subreddit Details API
- Reddit User Posts API — Collect a Reddit user's post history from one username, sorted by new, top or hot, with title and body, score, comments and media.
- Reddit Popular Feed API — Collect r/popular posts in hot, best, new, rising or top order, with title and body, author, score, comments and media.