# Reddit Subreddit Search API (https://www.socialcrawl.dev/platforms/reddit/subreddit-search) > Searches for posts within a specific subreddit. Returns matching posts with titles, scores, comment counts, permalinks and, where the row carries them, the post body at `ext.selftext`, the author's avatar, structured media, the upvote ratio, the flair and Reddit's own content language. One result page is assembled from more than one index: the first rows are the community's own relevance ranking, unchanged and in its original order, and further rows are appended from Reddit's search index scoped to the same community. A page holds up to 25 posts and the exact count varies between calls, so read the length of `items` rather than assuming a number — pages of about 7 are what you get when only the first index answers. Because the page spans two indexes, three leaves are reported for only part of it and are `null` on the rest: `post.flags.spoiler`, `post.engagement.shares` and `post.engagement.saves`. A `null` there means the index that returned that row does not report the field, never that the value is false or zero, so do not aggregate over them. Omitting `query` returns the community listing from the first index alone, because Reddit's scoped search needs terms to match. `include_body=true` is still accepted and rarely needed now that bodies arrive on the rows themselves: it costs 1 extra credit per post that actually comes back with a body, up to 25 per page, and refunds every credit it does not spend. Ranking is a voice-of-customer sweep rather than precision retrieval, so expect some off-topic matches on short queries, and use quoted phrases to tighten them. TL;DR: `GET /v1/reddit/subreddit/search` costs 1 credit for the search page. With include_body=true, 1 extra credit per post that comes back with a body, up to 25 per page, unused credits refunded. Link posts have no body and are not charged for. With `max_pages`, `max_items` or `max_credits`, each page walked is billed at this price (a cached page is free), and `max_credits` caps the total. and returns SocialCrawl's unified JSON schema. Single x-api-key auth, 100 free credits on signup. ## Parameters | Parameter | Required | Description | | --- | --- | --- | | `subreddit` | yes | Subreddit name (e.g. 'Fitness', not 'r/Fitness' or a full URL) | | `query` | no | Search query to find matching content | | `sort` | no | Sort order. For posts/media: relevance, hot, top, new, comments. For comments: relevance, top, new (relevance \| hot \| top \| new \| comments) | | `timeframe` | no | Only return posts from this window. Applied on sort=relevance, sort=top and sort=comments. It has no effect with sort=new, which is already ordered newest-first and returns recent posts regardless. (all \| year \| month \| week \| day \| hour) | | `cursor` | no | Cursor to get more results. Get 'cursor' from previous response. | | `include_body` | no | Set to true to include each post's body (selftext) on the search page. 1 extra credit per post that comes back with a body, unused credits refunded. Link posts have no body, so they are looked up and not charged for. | | `since` | no | Only rows published on or after this date: YYYY-MM-DD (midnight UTC) or an ISO 8601 timestamp. Rows older than it are left off each page. This list is not in date order, so the walk does not stop at the date: keep following `next_cursor`, and each page costs what a page costs even when every row on it is filtered out. A row with no date is kept. `published_after`, `start_date`, `from_date`, `publish_time` (`yesterday`, `this-week`, `this-month`, `last-3-months`, `last-6-months`) and `max_age_days` are accepted and applied as `since`. | | `until` | no | Only rows published on or before this date: YYYY-MM-DD (that whole UTC day is included) or an ISO 8601 timestamp. Newer rows are left off each page and the walk does not stop, so older pages follow. A row with no date is kept. `published_before`, `end_date` and `to_date` are accepted and applied as `until`. | | `max_pages` | no | 1 to 50 (default 1, or 50 when `max_items` or `max_credits` is sent). Walk up to this many pages in one call and return the rows from all of them. Each page walked is billed exactly as one call to this endpoint (a cached page is free) and counts against your rate limit; its charge and any refund are recorded under the page's own request id, listed in `data.walk.request_ids`. The walk stops early at the last page, or when the request's time budget runs low; `data.walk.stopped` says why (`end`, `max_pages`, `max_items`, `max_credits`, `time_budget`, `page_error`) and `pagination.next_cursor` continues from where it stopped. | | `max_items` | no | 1 to 5000. Get more in one call: keep walking pages until the response holds at least this many rows, then stop with `data.walk.stopped: "max_items"`. The last page is returned whole (it was billed), so `data.items` can hold up to one page more than this, and `pagination.next_cursor` resumes right after it without skipping a row. Walks up to 50 pages unless `max_pages` says fewer; each page is billed as one call (a cached page is free). Add `max_credits` to cap the spend. A long walk can stop on the time budget first (`"time_budget"`): send the returned cursor with the same params to continue. | | `max_credits` | no | 1 to 100000. The most this call may spend, across every page it walks. A page starts only while the credits already spent plus that page's price (or, when higher, the most any page of this walk has cost) still fit, so the call never goes past it; the walk then stops with `data.walk.stopped: "max_credits"` and the cursor to resume. Sent alone, it walks as far as the budget goes (up to 50 pages). A value below the price of one page is a free 400 whose `error.details.page_credits` names that price. Credits a row join (`include=`) adds are known only once a page has run, so page 1 is checked against its own price. | ## Code example ```bash curl -G "https://www.socialcrawl.dev/v1/reddit/subreddit/search" \ --data-urlencode "subreddit=technology" \ -H "x-api-key: sc_YOUR_API_KEY" ``` ## FAQ ### How do I search within a specific subreddit? Send a GET request to /v1/reddit/subreddit/search with the subreddit name (no r/ prefix) as the required subreddit parameter. Add your keyword in the optional query parameter to filter. Omit it to browse the subreddit as-is. Results are scoped to that subreddit only. ### How is this different from the Reddit Search API? The top-level /v1/reddit/search runs across all of Reddit. This endpoint scopes results to one subreddit, better signal for community-specific brand monitoring, competitor tracking in niche subreddits, or pulling discussion on a product in r/SaaS. ### What sort and timeframe options are supported? sort accepts relevance, hot, top, new, and comments. timeframe accepts hour, day, week, month, year, and all. Pair sort=top with timeframe=week to get the highest-scoring posts on a topic inside a subreddit this week. ### How do I paginate subreddit search results? The response includes a cursor token. Pass it as the cursor parameter on the next request to fetch the next page. Repeat until cursor is empty to walk through the full result set inside that subreddit. ### How much does the Subreddit Search API cost? Each search costs 1 credit on the standard tier, regardless of how many posts match. New accounts get 100 free credits with no credit card required, enough to run 100 scoped searches across your most important subreddits. See the full Reddit API: https://www.socialcrawl.dev/platforms/reddit ## Pricing - Standard endpoints: 1 credit per call - Advanced endpoints: 5 credits per call - Premium endpoints: 10 credits per call - 100 free credits on signup, no credit card required. Cached responses cost 0 credits. Credit packs never expire. - Full pricing: https://www.socialcrawl.dev/pricing ## Explore with AI Questions this API answers, phrased for an AI assistant: - How to search within a specific subreddit using an API - Scoped brand monitoring on Reddit with SocialCrawl