Posts matching a keyword — globally or within a subreddit
Search Reddit posts by keyword. Optionally narrow to a specific subreddit. Results include title, score, comment count, author, and permalink.
/search Search https://api.fetchlayer.dev/reddit/search Headers
Authorization string required Bearer token — your FetchLayer API key.
Parameters
query string required Search keyword or phrase.
subreddit string | null optional Limit search to a specific subreddit.
sort string optional Sort order: relevance, new, comments, or top. (default: relevance)
limit number optional Maximum number of results to return. (default: 25)
time string | null optional Time filter: hour, day, week, month, year, or all.
pages number optional Maximum number of result pages to scrape. (default: 1)
Response Fields
search
Posts matching a keyword — globally or within a subreddit
blocked boolean Whether Reddit returned a block or verification page.
blockReason string | null Machine-readable block reason when blocked is true; otherwise omitted.
blockedBodyText string | null Diagnostic block-page text when blocked is true; otherwise omitted.
pageTitle string Title of the scraped Reddit page.
requestedUrl string Reddit URL requested by the scraper.
fetchUrl string Normalized Reddit URL fetched by the scraper.
finalUrl string Final URL after redirects.
responseStatus number | null HTTP status returned by Reddit, or null when unavailable.
listingType string Always search for a successful response.
query string Search query.
sort string Applied sort order.
time string | null Applied time filter.
subredditFilter string | null Applied subreddit filter.
resultCountText string | null Result count text displayed by Reddit.
items[].id string | null Reddit post ID without the t3_ prefix.
items[].fullname string | null Reddit post fullname, including the t3_ prefix.
items[].subreddit string | null Subreddit name without the r/ prefix.
items[].subredditPrefixed string | null Subreddit name with the r/ prefix.
items[].author string | null Author username.
items[].title string | null Post title.
items[].permalink string | null Absolute URL of the Reddit comments page.
items[].shortlink string | null Short redd.it URL for the post.
items[].url string | null Absolute post content URL.
items[].domain string | null Hostname or Reddit domain associated with the post.
items[].createdAt string | null ISO 8601 creation timestamp.
items[].flair string | null Post flair text, or null when absent.
items[].score number | null Post score.
items[].scoreText string | null Score text as displayed by Reddit.
items[].commentCount number | null Comment count.
items[].commentCountText string | null Comment count text as displayed by Reddit.
items[].previewText string | null Text preview for self posts, or null when unavailable.
items[].thumbnailUrl string | null Post thumbnail URL, or null when unavailable.
items[].nsfw boolean Whether the post is marked NSFW.
items[].spoiler boolean Whether the post is marked as a spoiler.
items[].locked boolean Whether the post is locked.
items[].stickied boolean Whether the post is stickied.
listingTitle string | null Display title of the listing, or null when unavailable.
itemCount number Number of entries returned in items.
nextPageUrl string | null Next-page URL when available, otherwise null.
prevPageUrl string | null Previous-page URL when available, otherwise null.
pagesRequested number Number of pages requested.
pagesScraped number Number of pages successfully scraped.
scrapedAt string ISO 8601 timestamp for the scrape.
transport string Reddit page transport used for extraction.
Request
curl -X POST "https://api.fetchlayer.dev/reddit/search" \
-H "Authorization: Bearer ss-your-key" \
-H "Content-Type: application/json" \
-d '{"query":"developer tools","subreddit":"webdev","sort":"top","time":"week","limit":10}'Response
{
"blocked": false,
"listingType": "search",
"query": "developer tools",
"sort": "top",
"time": "week",
"subredditFilter": "webdev",
"items": [
{
"id": "abc123",
"title": "What tools do you swear by?",
"subreddit": "webdev",
"author": "devuser",
"score": 3241,
"commentCount": 418,
"url": "https://reddit.com/r/webdev/comments/...",
"createdAt": "2026-08-13T03:00:00.000Z",
"nsfw": false,
"spoiler": false,
"locked": false,
"stickied": false
}
],
"itemCount": 1,
"pagesRequested": 1,
"pagesScraped": 1,
"transport": "old-reddit-html"
}