reddit-alienReddit

Introduction

The YouTube API provides access to video and channel discovery, detailed metadata, comments, and transcript data. In this guide, we'll demonstrate a complete workflow for finding and analyzing recent news content by searching for videos about a breaking news story, getting comprehensive details, and accessing the full transcript for content analysis.

  • Base URL: https://api.webit.live/api/v1/realtime/social/reddit/v1

circle-info

Billing: Reddit API requests are billed using the VX12 driver.

Key Endpoints

  • Discover: The Discover endpoints let you search across Reddit for posts, subreddits, users, and comments using free-text queries and pagination. They provide high-level discovery capabilities to identify trends, communities, creators, and conversations before diving into deeper analysis.

  • Subreddit: The Subreddit endpoints give you complete access to subreddit-level data including metadata, rules, moderators, wiki pages, and posts. They are ideal for understanding a community’s structure and exploring its content in a focused, contextual way.

  • Posts: The Posts endpoints allow you to retrieve detailed post information by ID and fetch full discussion trees with nested comments. They support deep content analysis, engagement research, and conversational mapping for any Reddit post.

  • User: The User endpoints provide detailed user profiles, posts, comments, and their most active subreddits. They are designed to analyze user behavior, content patterns, influence, and community participation.

  • Comments: The Comments endpoints let you fetch individual comments by ID along with their parent post context. They are useful for precise comment-level retrieval, sentiment analysis, and reconstructing discussions.

FAQ

chevron-rightHow do I use pagination with cursors?hashtag

Reddit API endpoints that return large result sets use cursor-based pagination. The response includes:

  • cursor - Use this value to fetch the next page of results or to navigate deeper into nested comment threads

  • hasNextPage - Boolean indicating whether additional pages are available

For paginated results, include the cursor value from your previous response in your next request. When hasNextPage is false, you've reached the end of the results.

For comment threads, the cursor allows you to drill down into nested replies at specific depths and branches within the discussion tree.

chevron-rightWhat is the maximum query length for search endpoints?hashtag

Search queries can be up to 256 URL-encoded characters, including operators, keywords, and special characters.

chevron-rightWhat search operators are available?hashtag

Boolean Operators and Grouping

Operator
Description
Example

AND logic

Use AND between terms to require all connected words.

technology AND innovation

OR logic

Use OR between terms. Any of the terms can appear in results.

machine OR artificial

NOT logic

Use NOT to exclude terms. Cannot be used alone.

python NOT snake

Grouping

Use parentheses to group conditions.

(machine OR artificial) AND intelligence

Search by Author and Subreddit

Filter
Description
Example

author:

Posts by specific user. No space after colon.

author:reddit

subreddit:

Posts in specific subreddit. No space after colon.

subreddit:technology

self:

Filter by post type. Use true for text posts only, false for link posts only.

self:true

Search by Content

Filter
Description
Example

url:

Posts linking to specific URL.

url:example.com

site:

Posts from specific domain.

site:github.com

selftext:

Search within post body text.

selftext:tutorial or selftext:"step by step"

title:

Search within post titles only.

title:announcement or title:"security update"

flair:

Posts with specific flair.

flair:discussion

circle-info

Note: When searching for multiple words within a field, wrap the query in double or single quotes.

chevron-rightWhy don't my search results match my query exactly?hashtag

Reddit uses fuzzy search by default, which means results may not contain all your search terms exactly as written.

For post searches, Reddit requires some but not necessarily all words in your query to match. For comment and people searches, all words in your query must currently match, though this behavior may change in the future.

chevron-rightWhat's the difference between best, hot, and top sorting?hashtag

Best sorts by upvote-to-downvote ratio, favoring content with higher approval percentages. When ratios are similar, content with more total votes ranks higher.

Hot prioritizes recent posts with strong engagement. Newer posts can outrank older posts even if they have fewer total votes.

Top sorts by net score (upvotes minus downvotes), ignoring recency and vote ratios.

chevron-rightCan I search private subreddit communities?hashtag

No, Reddit API only returns data from public subreddits and posts. Private subreddit communities and their content are not accessible through the API.

chevron-rightWhy do user posts and comments return empty results?hashtag

Users can set their content to private. When requesting posts, comments, or subreddit subscriptions from a private profile, the user info endpoint returns their profile data normally, but content endpoints return empty arrays:

JSON

The user's profile information will show their karma and contribution counts, but you won't be able to access the actual posts or comments. You'll receive the same empty structure whether requesting posts, comments, or subreddits.

chevron-rightWhat do deleted and unavailable user responses mean?hashtag

User profiles may be inaccessible for several reasons, each returning different response structures:

Deleted users return a minimal response indicating the account was deleted:

JSON

Banned users return an unavailable status:

JSON

When encountering these responses, the user's historical content may still be visible on Reddit but their profile information is no longer accessible through the API.

Last updated