Skip to main content
All job types use the /api/v1/search/live POST endpoint and follow the same structure: a top-level type to define the data source, and a set of arguments defining the parameters of the job.

URL Scraping

Extract content from specific Reddit posts and comments

Post Search

Search across Reddit posts and comments

User Search

Find and retrieve information about Reddit users

Community Search

Discover Reddit communities (subreddits)

scrapeurls

Retrieves the complete content of one or more Reddit URLs. This job type is specifically designed for extracting data from Reddit posts and comments. Supported URLs:
  • Post URLs: https://reddit.com/r/{community}/comments/{post_id}/...
  • Comment URLs: https://reddit.com/r/{community}/comments/{post_id}/{title}/{comment_id}/...
Not Supported:
  • User profile URLs
  • Community/subreddit URLs
  • Reddit homepage or feed URLs

searchposts

Performs comprehensive searches across Reddit posts and comments based on keywords or phrases.

searchusers

Searches for Reddit user profiles and optionally retrieves their post history.

searchcommunities

Discovers Reddit communities (subreddits) based on search queries.

Parameters

Common Parameters

Job-Specific Parameters

scrapeurls Parameters

Search Job Parameters (searchposts, searchusers, searchcommunities)

Additional Search-Specific Parameters

Examples

scrapeurls

Scrape Reddit URLs

searchposts

Search Reddit posts

searchusers

Search Reddit users

searchcommunities

Search Reddit communities

Pagination

The Reddit API supports cursor-based pagination for handling large result sets. After receiving your initial results, use the next_cursor value from the response to fetch subsequent pages:

Best Practices

1. Efficient Querying

  • Use specific search terms to get more relevant results
  • Combine related queries in a single request when possible
  • Set appropriate max_* parameters based on your needs

2. Rate Limiting

  • Be mindful of API rate limits
  • Implement exponential backoff for retries
  • Cache results when appropriate

3. Content Filtering

  • Use the after parameter to get only recent content
  • Set include_nsfw appropriately for your use case
  • Use skip_posts when you only need user profile information

4. URL Validation

  • Ensure URLs are properly formatted Reddit URLs before scraping
  • Validate that URLs point to posts or comments, not profiles or communities

Error Handling

Common error scenarios and how to handle them:

Invalid URL Format

When using scrapeurls, ensure all URLs follow the correct Reddit URL pattern for posts and comments.

Missing Required Parameters

  • scrapeurls requires urls array
  • All search operations require queries array
  • These parameters are mutually exclusive

Invalid Job Type

Ensure the type parameter is one of: scrapeurls, searchposts, searchusers, or searchcommunities.

Response Structure

While the exact response structure may vary, typical responses include:
  • Posts: Title, content, author, timestamp, score, comments
  • Comments: Content, author, timestamp, score, parent context
  • Users: Username, karma, account age, recent posts (unless skip_posts is true)
  • Communities: Name, description, subscriber count, creation date

Limitations

  • URL scraping is limited to posts and comments only
  • Search results are subject to Reddit’s search algorithm
  • NSFW content is excluded by default
  • Maximum limits apply to all result types to prevent excessive API usage