# Reddit Search Subreddits API Documentation

<p><strong>Reddit Search Subreddits API</strong> finds subreddits by keyword. Each subreddit has name, title, public description, subscribers, creation date, type, language and icon.</p><p>Every list has <code>pagination</code> with <code>limit</code>, <code>after</code>, <code>next_after</code> and <code>has_more</code>. Pass <code>next_after</code> as <code>after</code> to read the next page. A page is never another page's data under a new label. Reddit ends every list after about 1000 items.</p>

- **Documentation:** [https://scrappa.co/docs/reddit-api/reddit_search_subreddits](https://scrappa.co/docs/reddit-api/reddit_search_subreddits)
- **API group:** Reddit API
- **Endpoint:** `GET https://scrappa.co/api/reddit/search/subreddits`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | Yes | Search text, up to 256 characters. Example: php. |
| `after` | string | No | Cursor from pagination.next_after of the previous page. Example: t3_1xhv532. |
| `limit` | integer | No | Items per page, 1 to 100 (default 25). Example: 25. |

## Example response

```json
{
    "data": {
        "query": "php",
        "pagination": {
            "after": null,
            "limit": 2,
            "has_more": true,
            "next_after": "t5_3a0bg"
        },
        "subreddits": [
            {
                "id": "2qh38",
                "url": "https://www.reddit.com/r/PHP/",
                "name": "PHP",
                "type": "public",
                "title": "PHP: The latest news in the PHP world",
                "over_18": false,
                "fullname": "t5_2qh38",
                "icon_url": "https://styles.redditmedia.com/t5_2qh38/styles/communityIcon_wyhpynob75c71.png?width=256&s=d815bcfa11c0a8e5db0a72d033452d685ea6edf0",
                "language": "en",
                "key_color": "#7e53c1",
                "banner_url": null,
                "created_at": "2008-01-25T06:37:50+00:00",
                "quarantine": false,
                "created_utc": 1201243070,
                "description": "Please follow [the rules](https://www.reddit.com/r/PHP/about/rules/)\n\nReleases: [Current Releases](http://php.net/downloads.php), [Window...",
                "subscribers": 206375,
                "allows_polls": true,
                "wiki_enabled": true,
                "allows_images": false,
                "allows_videos": false,
                "primary_color": "#8893bd",
                "submission_type": "any",
                "allows_galleries": false,
                "spoilers_enabled": false,
                "public_description": "Share and discover the latest news about the PHP ecosystem and its community.\n\nPlease respect r/php's rules."
            }
        ]
    },
    "meta": {
        "billable": true,
        "endpoint_family": "search_subreddits"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A required parameter or a value is invalid. This response is not billable. |
| 503 | Upstream Unavailable | Reddit could not be reached or returned data that does not match the request. This response is not billable and is retryable. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
