Call it
curl https://api.peume.com/v1/call/reddit-subreddit-posts-2 \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"limit": 10,
"subreddit": "your subreddit"
}
}'const res = await fetch("https://api.peume.com/v1/call/reddit-subreddit-posts-2", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"limit": 10,
"subreddit": "your subreddit"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/reddit-subreddit-posts-2",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"limit": 10,
"subreddit": "your subreddit"
}
},
)
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-subreddit-posts-2.
Parameters
date_rangestringFilters posts by time range for subreddit and user listings. Allowed values are `all_time`, `past_hour`, `past_day`, `past_week`, `past_month`, and `past_year`. Whether filtering applies depends on the result set when using fixed post URLs or unsupported sort orders. This cannot be used to filter comments by date. One of: all_time, past_day, past_hour, past_month, past_week, past_year.
all_time · past_day · past_hour · past_month · past_week · past_year
limitintegerMaximum number of results, 1 to 100 (default 10). For some actions it counts pages or items per parent rather than final rows.
Example: 10
sortstringOrders Reddit post listings by `newest`, `popular`, `relevance`, `rising`, or `top`. The `post_detail` and `comments` actions do not accept `sort`. One of: newest, popular, relevance, rising, top.
newest · popular · relevance · rising · top
include_post_textbooleanOptional for `search`, `subreddit_posts` and `user_posts`, true or false (default false). With true, image, video and link posts also carry the text attached to them in `text`. Each post page is read for this, so the call is slower; a post whose text could not be read has `text` null. The price is the same.
subredditRequiredstringSpecifies the target subreddit for `subreddit_posts`, such as `python` or a full subreddit URL. For subreddit names that start with `r`, pass the full `/r/subreddit/` URL and check the result.
