Posts of one subreddit listing (hot, new or top with a time window), cursor paged.
2 credits/ call
Never more than 35 credits a call.
You only pay when data comes back.
curl -X POST "https://api.primaryapi.com/v1/run/reddit.subreddit_posts" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"subreddit":"webscraping","sort":"hot"}'{
"output": {
"found": true,
"data": {
"nextCursor": "<string | null>",
"posts": [
{
"title": "<string | null>",
"score": "<integer | null>",
"upvoteRatio": "<number | null>",
"nsfw": "<boolean | null>", …
}
]
}
},
"credits": 2
}Input and output
6 fields
webscraping.hot.cursor (takes the same nextCursor values). Prefer cursor.17 fields
cursor to get the next page; null at the endGood to know
One page per call. Send nextCursor back as cursor to read the next page.
Unknown subreddit? It comes back as not found, not as an error.
Terms of use. Usernames and user content are personal data under GDPR/CCPA even when pseudonymous: use for lawful purposes only, honour deletions, do not keep removed content, and do not train AI models on it without rightsholder permission (Data API Terms §2.4).
The same key and credits work for every API.