Call it
curl https://api.peume.com/v1/call/pull-reddit-posts \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"ignoreStartUrls": false,
"searchPosts": true,
"searchComments": false,
"searchCommunities": false,
"searchUsers": false,
"searchMedia": false
}
}'const res = await fetch("https://api.peume.com/v1/call/pull-reddit-posts", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"ignoreStartUrls": false,
"searchPosts": true,
"searchComments": false,
"searchCommunities": false,
"searchUsers": false,
"searchMedia": false
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/pull-reddit-posts",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"ignoreStartUrls": False,
"searchPosts": True,
"searchComments": False,
"searchCommunities": False,
"searchUsers": False,
"searchMedia": 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: pull-reddit-posts.
Parameters
sessionTokenstringProvide the value of your 'reddit_session' cookie from a dedicated Reddit account (found in Browser DevTools -> Application -> Cookies -> https://www.reddit.com). Also accepts exported Cookie-Editor JSON or Cookie header strings. When omitted, the scraper runs in HTML-only mode using Puppeteer browser with rate limiting intact.
startUrlsarrayIf you already have URL(s) of page(s) you wish to scrape, you can set them here. If you want to use the search field below, remove all startUrls here.
searchesarrayHere you can provide a search query which will be used to search Reddit`s topics.
searchCommunityNamestringIf provided, the search will be performed only inside this community (e.g., 'programming').
ignoreStartUrlsbooleanMainly used as a fix for ignoring starUrl on Zapier
Example: false
searchPostsbooleanWill search for posts with the provided search
Example: true
searchCommentsbooleanWill search for comments with the provided search
Example: false
searchCommunitiesbooleanWill search for communities with the provided search
Example: false
searchUsersbooleanWill search for users with the provided search
Example: false
searchMediabooleanWill search for media with the provided search
Example: false
sortstringSort search by Relevance, Hot, Top, New or Comments
· relevance · hot · top · new · rising · comments
Example: new
timestringFilter posts by last hour, week, day, month or year
all · hour · day · week · month · year
skipCommentsbooleanThis will skip scrapping comments when going through posts (both from Start URLs and search results)
Example: false
skipUserPostsbooleanThis will skip scrapping user posts when going through user activity or community posts
Example: false
skipCommunitybooleanThis will skip scrapping community info but will still get community posts if they were not skipped.
Example: false
includeMediaLinksbooleanThis will include upVotes, upVoteRatio, imageUrls, videoUrls, and numberOfComments when scraping posts. Enabling this will use a more detailed extraction method, which may affect performance.
Example: false
includeNSFWbooleanYou can choose to include or exclude NSFW content from your search
Example: true
maxItemsintegerThe maximum number of items that will be saved in the dataset. If you are scrapping for Communities&Users, remember to consider that each category inside a community is saved as a separated item.
Example: 10
maxPostCountintegerThe maximum number of posts that will be scraped for each Posts Page or Communities&Users URL
Example: 10
postDateLimitstringUse this value to only retrieve posts published after a specific date.
commentDateLimitstringUse this value to only retrieve comments published after a specific date inside a post.
maxCommentsintegerThe maximum number of comments that will be scraped for each Comments Page. If you don't want to scrape comments you can set this to zero.
Example: 10
maxCommunitiesCountintegerThe maximum number of `Communities`'s pages that will be scraped if your search or startUrl is a Communities type.
Example: 2
maxUserCountintegerThe maximum number of `Users`'s pages that will be scraped.
Example: 2
scrollTimeoutintegerSet the timeout in seconds in which the page will stop scrolling down to load new items
Example: 40
navigationTimeoutintegerSet the navigation timeout in seconds for page loading
Example: 60
maxRequestRetriesintegerThe maximum number of times the crawler will retry a failed request.
Example: 6
debugModebooleanAdds progress lines to the run log: what each page was read as, how many items it added, and when a page had nothing to scrape. Useful when results look incomplete. It does not change what the Actor scrapes.
Example: false
