---
title: "Typeahead"
method: GET
path: "/api/reddit/typeahead"
tags: ["Listings & Search"]
---

# Typeahead

`GET /api/reddit/typeahead`

## Request

- Base URL: `https://api.redditapis.com`
- URL: `https://api.redditapis.com/api/reddit/typeahead`
- Auth: HTTP bearer

Search-as-you-type suggestions for a short prefix. Without `sub`, returns up to `limit` SUBREDDIT suggestions (`subreddits`: name, display_name_prefixed, title, icon_url, subscribers, over_18, url, match). With `sub`, returns up to `limit` POSTS in that subreddit whose titles match (`posts`: id, fullname, title, permalink, url, subreddit, score, num_comments, over_18, created_utc, created, match). Rows are ranked prefix, then contains, then related, and each row's `match` says which. No cursor: a typeahead returns one short list. Cost: $0.0015 per call.

## Query parameters

- `q` string, required
- `sub` string
- `limit` integer
- `nsfw` boolean

## Response `200`

Successful response.

- object

## Other responses

- `400`: Bad request — missing or invalid parameters.
- `401`: Missing Bearer token.
- `402`: Your account balance does not cover this call, so nothing was charged and the request was not served. The response body is {"error":"Insufficient credits","top_up_url":"https://www.redditapis.com/dashboard/buy-credits","message":"..."}; error keeps that exact wording. This is a billing state, not a bad request: the same call succeeds once the balance is topped up, and retrying without topping up returns 402 again, which is why it carries Retry-After: 3600. Top up at the top_up_url, then call again at once; the header does not apply after a top-up. Read the remaining balance any time from GET /account/me, which is free and never returns this error. Distinct from the 402 on the monitoring endpoints, which is about plan entitlements rather than credits.
- `403`: Invalid Bearer token.
- `429`: Rate limit exceeded.
- `500`: Unexpected server error.

---

[API](https://skmtc.dev/redditapis/apis/redditapis-api.md) · [All operations](https://skmtc.dev/redditapis/apis/redditapis-api/llms.txt) · [OpenAPI document](https://skmtc.dev/redditapis/apis/redditapis-api/revisions/9696482dfe9b?raw)
