# Reddit Autocomplete API Documentation

<p><strong>Reddit Autocomplete API</strong> completes a subreddit name from a prefix. It returns up to 25 subreddits with the same fields as the subreddit search.</p>

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

## 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 | Name prefix, up to 100 characters. Example: prog. |
| `limit` | integer | No | Items, 1 to 25 (default 10). Example: 10. |
| `nsfw` | boolean | No | true to include adult subreddits (default false). Example: false. |

## Example response

```json
{
    "data": {
        "query": "prog",
        "subreddits": [
            {
                "id": "2tex6",
                "url": "https://www.reddit.com/r/ProgrammerHumor/",
                "name": "ProgrammerHumor",
                "type": "public",
                "title": "memesAndJokesAboutEverythingProgrammingAndCS",
                "over_18": false,
                "fullname": "t5_2tex6",
                "icon_url": "https://styles.redditmedia.com/t5_2tex6/styles/communityIcon_70ds7qqgfr8b1.png?width=256&s=66774572524b31ccfe245f6f450a625c1f445ece",
                "language": "en",
                "key_color": "#ff8717",
                "banner_url": "https://styles.redditmedia.com/t5_2tex6/styles/bannerBackgroundImage_z6ejudtdz7p41.png?width=4000&s=9e33bf27ecab480bc284b0d439ba9565668e2131",
                "created_at": "2012-01-22T13:11:51+00:00",
                "quarantine": false,
                "created_utc": 1327237911,
                "description": "> Not everybody understands the humor of programmers.\n\n###Filters\n\n* [All posts](http://www.reddit.com/r/ProgrammerHumor/#www)\n* [No meme...",
                "subscribers": 4773451,
                "allows_polls": false,
                "wiki_enabled": true,
                "allows_images": true,
                "allows_videos": false,
                "primary_color": "#ff4500",
                "submission_type": "link",
                "allows_galleries": true,
                "spoilers_enabled": true,
                "public_description": "For anything funny related to programming and software development."
            }
        ]
    },
    "meta": {
        "billable": true,
        "endpoint_family": "autocomplete"
    },
    "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)
