Search posts inside one subreddit by query, sort order and time window, cursor paged.
2 credits/ call
Never more than 44 credits a call.
You only pay when data comes back.
curl -X POST "https://api.primaryapi.com/v1/run/reddit.subreddit_search" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"subreddit":"webscraping","query":"proxy","sort":"relevance","timeframe":"year"}'{
"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.proxy.relevance.year.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.
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.