Reddit

Search Reddit Posts

Search for Reddit posts by keyword across all subreddits. Returns post ID, title, URL, author and profile link, subreddit, content snippet (the post body, or the title when the post has no body), upvotes, upvote ratio, comment and crosspost counts, flair, the link a link post shares, thumbnail, video links (an MP4 file and an HLS stream with sound) for Reddit-hosted videos, every image of a gallery or image post, and NSFW, spoiler, locked and pinned flags. Supports sort by hot, top, most recent, relevance or most commented, an optional time window (posted_ago) from the past hour to the past year, an optional subreddit to search within, and include_nsfw to include posts marked NSFW (left out by default). Each page returns up to 20 posts, and pages 1 to 12 cover up to 250 posts per query.

Price: $0.003 per request. Free tier: 50 requests/month.

get/v1/reddit/posts

Request

  • Base URL: https://apidirect.io
  • URL: https://apidirect.io/v1/reddit/posts
  • Auth: API key in header X-API-Key

Query parameters

querystring required

Search query (max 500 characters). Reddit search operators are supported, including AND, OR, NOT, exclusion with -, grouping with ( ), and fields such as subreddit: and author:.

pageinteger

Page number for pagination (1-12). Each page returns up to 20 posts.

sort_by'most_recent' | 'relevance' | 'hot' | 'top' | 'most_commented'

Sort order for results

posted_ago'1h' | '24h' | '7d' | '30d' | '12m' | 'all'

Only return posts from this period: 1h (past hour), 24h (past day), 7d (past week), 30d (past month), 12m (past year) or all (all time, the default). Works with every sort_by, e.g. sort_by=relevance with posted_ago=24h returns the most relevant posts of the past day. Any other value returns 400.

subredditstring

Only return posts from this subreddit, with or without r/ (e.g. Python). Any name that isn't 2-21 letters, digits or underscores returns 400.

include_nsfwboolean

Set to true to include posts marked NSFW. They are left out by default.

get_sentimentboolean

Set to true to add AI emotion analysis to each post. Adds a sentiment object containing emotions (joy, trust, fear, surprise, sadness, disgust, anger and anticipation, each scored 0-100), dominant_emotion, emotional_intensity (0-10), and polarity (positive, negative or neutral). Any post that cannot be scored returns sentiment: null.

Response

Successful response

pagenumber nullable
countnumber nullable

Changes

No recorded changes to this operation across all 1 revision of this API.