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
}
}'const res = await fetch("https://api.peume.com/v1/call/reddit-api", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"sort": "relevance",
"time": "all",
"maxItems": 100,
"includeNSFW": false,
"skipComments": false,
"skipUserPosts": false
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/reddit-api",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"sort": "relevance",
"time": "all",
"maxItems": 100,
"includeNSFW": False,
"skipComments": False,
"skipUserPosts": False
}
},
)
print(res.json()["output"])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
startUrlsarrayReddit 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.
searchesarrayKeywords 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.
sortstringHow 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
timestringLimits 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
maxItemsintegerMaximum 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
includeNSFWbooleanInclude NSFW (Not Safe For Work) content.
Example: false
skipCommentsbooleanWhen 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
skipUserPostsbooleanWhen scraping a user profile, recent posts are fetched by default alongside profile info. Enable this to get only the profile metadata.
Example: false
skipCommunitybooleanWhen 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
ignorestartUrlsbooleanForces 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
searchPostsbooleanFind 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
searchCommentsbooleanFind 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
fetchPostCommentsbooleanWhen 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
searchCommunitiesbooleanFind subreddits whose name or description matches the keyword. Returns community objects with member count, description, and URL.
Example: false
searchUsersbooleanFind Reddit user accounts matching the keyword. Returns user objects with karma, profile info, and account age.
Example: false
