Call it
curl https://api.peume.com/v1/call/reddit-subreddit-posts-by-subreddit-name \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"subreddit_name": "AskReddit",
"sort": "HOT",
"need_format": false
}
}'const res = await fetch("https://api.peume.com/v1/call/reddit-subreddit-posts-by-subreddit-name", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"subreddit_name": "AskReddit",
"sort": "HOT",
"need_format": false
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/reddit-subreddit-posts-by-subreddit-name",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"subreddit_name": "AskReddit",
"sort": "HOT",
"need_format": 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-subreddit-posts-by-subreddit-name.
Parameters
subreddit_nameRequiredstringSubreddit name
Example: AskReddit
sortstringSort method: BEST, HOT, NEW, TOP, CONTROVERSIAL, RISING
Example: HOT
filter_postsarrayFilter out specified posts, by fullname (t3_ prefix)
afterstringPagination parameter
need_formatbooleanWhether to clean and format the data
Example: false
Other ways to do it
Same job, other sources, cheapest first.
List a subreddit's postsBest sourceList a subreddit's posts. Checks the cheapest source first and moves to the next one until it finds an answer.Posts of a subredditList the posts of one subreddit with title, link, author, time and the start of the text.Subreddit posts by name — sorted feedFetches posts from a subreddit with sorting and filtering options.
