Search Reddit posts
Search Reddit posts or comments site-wide by keyword (to search one subreddit, use reddit.subreddit.search.list).
Headers
Get your API keyAPI key (`sfk_...`)
Search query text for public Reddit posts or comments.
min 1 chars · max 512 chars
What to search: `posts` (the default) or `comments`. Comment search answers in `comments`, sorts by `relevance`, `new` or `top`, and takes no `timeframe`.
one of: posts, comments
Optional sort order for search results. `comment-count` puts the most-commented posts first.
one of: relevance, new, top, comment-count
Optional time range filter for search results.
one of: all, day, week, month, year
Opaque pagination cursor returned by a previous response.
min 1 chars
Whether to request a smaller response shape when available.
Endpoint-specific response payload.
Search query string evaluated for this response.
Posts returned for this page; empty for `type=comments`.
Stable post identifier.
min 1 chars
Full post name when available.
Post title when available.
Author username when available.
Subreddit name without a leading r/ when available.
Prefixed subreddit label such as r/example when available.
Canonical public post URL when available.
Public permalink URL when available.
Post body text when available.
Post score when available.
Upvote count when available.
Upvote ratio between 0 and 1 when available.
≥ 0 · ≤ 1
Comment count when available.
≥ 0
ISO-8601 creation timestamp when available.
Whether the post is a video post.
Subreddit subscriber count when available.
≥ 0
Comments returned for this page. Present only for `type=comments`.
Stable comment identifier.
min 1 chars
Public comment URL when available.
Relative permalink path when available.
Identifier of the comment this replies to, or of the post for a top-level comment.
Comment author username when available.
Comment text.
Comment score when available.
ISO-8601 creation timestamp when available.
Subreddit name without a leading r/ when available.
The post the comment was left on, when available.
Post identifier.
Post title.
Public post URL.
Post score.
Comment count on the post.
≥ 0
ISO-8601 creation timestamp of the post.
Number of posts (or comments) returned in this response.
≥ 0
Pagination information for the current response.
Cursor to pass in the next request when another page exists.
Whether another page of results is available.
Metadata describing the request and billing outcome.
Unique request identifier for tracing this API call.
min 1 chars
Credits charged for this request.
≥ 0
Public API version that served the response.
one of: v1
Present, and `true`, only when the source couldn't be reached and this is the last good answer for the same request instead, up to 24 hours old. Absent on every live answer.
one of: true
When a stale answer (`stale: true`) was originally fetched (ISO 8601, UTC). Absent on every live answer.
Code example
curl "https://api.socialfetch.dev/v1/reddit/search?query=web%20scraping" \
-H "x-api-key: YOUR_API_KEY"Responses
Search results for the requested query.