Social Media
Reddit Subreddit Posts
Fetch a subreddit's post feed — post id, title, author, author icon, subreddit, timestamp, score, comment count, share count, and url — with sorting and pagination, as JSON. Costs 1 credit per request.
POST/api/v1/reddit/subreddit/posts
Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is your Scavio API key (e.g. Bearer sk_live_your_key).
Body
application/jsonsubredditstringrequiredSubreddit name, without the r/ prefix (1-100 characters).
Example: AskReddit
sortenum<string>default:HOTFeed sort order.
HOT— Currently trending in the subreddit.BEST— Reddit's blended best ranking.NEW— Most recent posts first.TOP— Highest-scoring posts.RISING— Posts gaining traction quickly.CONTROVERSIAL— Most divisive posts first.
cursorstringPagination cursor from a previous response (next_cursor). Keep passing it while has_more is true.
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
results = client.reddit.subreddit_posts(subreddit="AskReddit", sort="HOT")
print(results)Response
"next_cursor": "dDNfMXY3YWJjZA",
"has_more": true
},
"response_time": 1211,
"credits_used": 1,
"credits_remaining": 4747
}