Search Reddit posts by keyword. Returns each post's title, URL, subreddit, author, publication date, text, score, comment count, flair, and video and gallery links. Sort by newest, relevance, hot, top or most commented, narrow to a time window from the past hour to the past year or to one subreddit, and optionally include NSFW posts.
curl "https://apidirect.io/v1/reddit/posts?query=programming&page=1&sort_by=hot" \
-H "X-API-Key: YOUR_API_KEY"
{
"posts": [
{
"post_id": "1x8r41q",
"title": "Trauma Based Programming",
"url": "https://www.reddit.com/r/Vaporwave/comments/1x8r41q/trauma_based_programming/",
"date": "2026-10-18 01:48:31",
"author": "planomania-",
"author_url": "https://www.reddit.com/user/planomania-",
"source": "Reddit",
"domain": "reddit.com",
"snippet": "Trauma Based Programming",
"subreddit": "Vaporwave",
"upvotes": 51,
"upvote_ratio": 0.93,
"comments": 5,
"crossposts": 0,
"flair": "Video",
"link_url": "https://v.redd.it/j0e5l6pgs4wh1",
"thumbnail": "https://external-preview.redd.it/cnYxMDNma2dzNHdoMegLt1Xvsyv80gIh_B9028HKtv_zyFY-Iep2LPcXiPLG.jpeg?width=140&height=107&format=jpg&auto=webp&s=e9624aebe61f11dbf2668c392ad42fe0118d9bd5",
"is_video": true,
"nsfw": false,
"spoiler": false,
"locked": false,
"stickied": false,
"video_url": "https://v.redd.it/j0e5l6pgs4wh1/CMAF_1080.mp4?source=fallback",
"video_hls_url": "https://v.redd.it/j0e5l6pgs4wh1/HLSPlaylist.m3u8?a=1794925791%2CYzAxYjJlZGNlMGY1MjUxOTVhYjVjYjk3YWIwOTM5YTEzNTRhNzZhZmQ4OWYxNmQ3N2VmNThmNjA2MTAyYmU0OQ%3D%3D&v=1&f=sd",
"images": [],
"sentiment": {
"emotions": {
"joy": 40,
"trust": 55,
"fear": 0,
"surprise": 10,
"sadness": 0,
"disgust": 0,
"anger": 0,
"anticipation": 30
},
"dominant_emotion": "trust",
"emotional_intensity": 5,
"polarity": "positive"
}
}
],
"page": 1,
"count": 20
}
Hot shows trending posts with recent activity. Top shows highest-voted posts. Most_commented shows the posts with the most comments. Most_recent shows posts in chronological order, newest first.
Use the posted_ago parameter: 1h for the past hour, 24h for the past day, 7d for the past week, 30d for the past month, or 12m for the past year. It works with every sort_by, so sort_by=relevance&posted_ago=24h returns the most relevant posts from the past day.
Only if you ask: add include_nsfw=true to include posts marked NSFW.
Yes. Add subreddit=Python (or r/Python) to search only that subreddit.
Our API provides real-time data from Reddit, with results going back multiple years to a few seconds ago.
You only pay for successful requests. The Reddit Posts API costs $0.003 per request. There are no monthly fees or commitments. You get 50 free requests per endpoint every month.
No. You can sign up and use the free tier (50 requests/endpoint/month) without adding a payment method. You only need to add a card when you want to exceed the free tier.
Yes, there's a concurrency limit of 10 simultaneous requests per endpoint per user. If you need more, just get in touch.
Get your API key and start making requests in minutes. 50 requests/month free every month.
Get API Key