PeumeAPI

Social media data · Reddit

Reddit API

Extract structured Reddit data via Reddit's official OAuth2 API: subreddits, posts, comments, users.

$0.003 per result

Call it

curl https://api.peume.com/v1/call/reddit-api \
  -H "Authorization: Bearer $PEUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "sort": "relevance",
    "time": "all",
    "maxItems": 100,
    "includeNSFW": false,
    "skipComments": false,
    "skipUserPosts": false
  }
}'

Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: reddit-api.

Parameters

startUrlsarray

Reddit URLs to scrape directly. Supports three URL types: • Subreddit (e.g. reddit.com/r/python/) — scrapes the subreddit feed • Post (e.g. reddit.com/r/python/comments/abc123/) — fetches that post and its comments • User (e.g. reddit.com/user/someuser/) — fetches the user profile and their recent posts Tip: combine with Search Queries to search within a specific subreddit instead of globally.

searchesarray

Keywords or phrases to search for on Reddit. Each query runs independently and returns up to Max Items results. Tip: wrap a query in quotes for exact phrase matching — e.g. '"web scraping"' will only match that exact phrase, while 'web scraping' matches posts containing both words anywhere. What gets searched depends on the search type flags below. If you also provide a subreddit in Start URLs, the search is scoped to that subreddit. Otherwise it searches all of Reddit.

sortstring

How to order results. For search queries: relevance (default) gives the best matches; new/top/hot/comments also work. For subreddit feeds: hot/new/top/controversial/rising. If you pick 'relevance' with a subreddit feed, it falls back to hot. relevance and comments are only valid for searches, not subreddit feeds.

relevance · hot · new · top · comments · controversial · rising

Example: relevance

timestring

Limits results to posts created within the selected time window. Applies to both subreddit feeds and search queries. Use 'all' to include posts from any time.

all · day · hour · month · week · year

Example: all

maxItemsinteger

Maximum number of results per job. Each search query, subreddit, or URL counts as a separate job, so total output can exceed this number when you have multiple inputs. Example: 2 search queries × maxItems 25 = up to 50 posts total.

Example: 100

includeNSFWboolean

Include NSFW (Not Safe For Work) content.

Example: false

skipCommentsboolean

When scraping a direct post URL, comments are fetched by default. Enable this to get only the post metadata without its comments. Does not affect the 'Fetch Comments for Each Post' option.

Example: false

skipUserPostsboolean

When scraping a user profile, recent posts are fetched by default alongside profile info. Enable this to get only the profile metadata.

Example: false

skipCommunityboolean

When scraping a subreddit feed, community metadata (member count, description, etc.) is fetched alongside posts. Enable this to skip that extra request and get only posts.

Example: true

ignorestartUrlsboolean

Forces search-only mode — Start URLs are ignored even if provided. Useful if you have URLs saved in your input but want to run a search-only job without deleting them.

Example: false

searchPostsboolean

Find posts matching the search keyword. Returns post objects with title, body, upvotes, and comment count. On by default — disable if you only want comments, communities, or users.

Example: true

searchCommentsboolean

Find comments matching the search keyword. Works by fetching posts that match the keyword and then filtering their comments — this uses more API calls than post search.

Example: false

fetchPostCommentsboolean

When enabled, each post returned from a subreddit or keyword search will include a 'comments' array with its top-level comments. Significantly increases API usage — one extra request per post.

Example: false

searchCommunitiesboolean

Find subreddits whose name or description matches the keyword. Returns community objects with member count, description, and URL.

Example: false

searchUsersboolean

Find Reddit user accounts matching the keyword. Returns user objects with karma, profile info, and account age.

Example: false

Start free · $1 of calls included

Every API your product needs. One key.

7,267 endpoints, one bill, and you only pay for calls that work.