---
title: "Search inside a subreddit"
description: "Reddit threads in one subreddit, optionally matching a phrase, with their full comment trees on request."
url: https://docs.sonderlabs.co.uk/search/subreddit
---

# Search inside a subreddit

Reddit threads in one subreddit, optionally matching a phrase, with their full comment trees on request.

`GET /v1/search/subreddit` (coming soon)

> **Coming soon:** this endpoint is not served yet; the shape below is what it will look like. [Ask for it](https://docs.sonderlabs.co.uk/access) if you need it.

Reads a subreddit's public threads. With `q`, only threads matching it; without, the newest. Reddit publishes votes, not views, so `views` is `null`.

## Platform support

- TikTok: Not available. Subreddits are Reddit's own.
- Instagram: Not available. Subreddits are Reddit's own.
- YouTube: Not available. Subreddits are Reddit's own.
- Facebook: Not available. Subreddits are Reddit's own.
- X: Not available. Subreddits are Reddit's own.
- Threads: Not available. Subreddits are Reddit's own.
- Reddit: Live
- Snapchat: Not available. Subreddits are Reddit's own.

## Parameters

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `subreddit` | query | string | yes | The subreddit, without `r/`. |
| `q` | query | string | no | A word or phrase to match. |
| `since` | query | date | no | Earliest post date (ISO 8601). Defaults to 30 days ago. |
| `until` | query | date | no | Latest post date. Defaults to now. |
| `limit` | query | integer | no | Results per page, 1 to 100. Default 25. |
| `cursor` | query | string | no | The `next` value from the previous page. |

## Example

cURL:

```bash
curl -G https://yourteam.sonderlabs.co.uk/v1/search/subreddit \
  -H "Authorization: Bearer $SONDER_API_KEY" \
  -d subreddit=MTB \
  -d q=rampage \
  -d since=2026-10-01
```

JavaScript:

```js
const params = new URLSearchParams({
  subreddit: "MTB",
  q: "rampage",
  since: "2026-10-01",
});
const res = await fetch(`https://yourteam.sonderlabs.co.uk/v1/search/subreddit?${params}`, {
  headers: {
    Authorization: `Bearer ${process.env.SONDER_API_KEY}`,
  },
});
const data = await res.json();
```

Python:

```python
import os, requests

res = requests.get(
    "https://yourteam.sonderlabs.co.uk/v1/search/subreddit",
    headers={"Authorization": f"Bearer {os.environ['SONDER_API_KEY']}"},
    params={
        "subreddit": "MTB",
        "q": "rampage",
        "since": "2026-10-01"
    },
)
data = res.json()
```

Response:

```json
{
  "subreddit": "MTB",
  "posts": [
    {
      "id": "051a815a103bb1467f115fceffc6f8ab",
      "platform": "reddit",
      "externalId": "1x14cnw",
      "url": "https://www.reddit.com/r/MTB/comments/1x14cnw/red_bull_rampage_womens_competition/",
      "creator": {
        "handle": "lordredsnake",
        "name": "lordredsnake",
        "followers": null
      },
      "caption": "Red Bull Rampage Women's Competition",
      "hashtags": [],
      "postedAt": "2026-10-08T22:09:43Z",
      "durationSec": 0,
      "views": null,
      "viewsEstimated": true,
      "likes": 112,
      "comments": 31,
      "shares": 0,
      "transcriptExcerpt": null,
      "onscreenText": null,
      "asOf": "2026-11-02T23:04:08Z"
    }
  ],
  "next": null
}
```
