# Reddit Post Search API

> Reddit posts matching a search query: title, subreddit, author, score, comment count and post link.

- Page: https://cleanedweb.com/catalog/reddit-post-search-api/
- Contract (JSON): https://cleanedweb.com/catalog/reddit-post-search-api/contract.json
- Source: reddit.com (https://www.reddit.com/)
- Category: Social & communities
- Updated: 2026-11-27

A run reads until the source ends or your `max_items`, `timeout_seconds` or budget stops it.

## Key fields

| Field | Type | Sample value |
| --- | --- | --- |
| `title` | string | `Best cheesecake I've ever made OR eaten. Better than cheesecake factory. Biscof…` |
| `date` | string | `2026-07-28T16:24:48Z` |
| `comment_count` | string | `28` |
| `comments` | integer | `28` |
| `author` | string | `kkjj77` |
| `url` | string | `https://www.reddit.com/r/Baking/comments/1v93cej/best_cheesecake_ive_ever_made_or_eaten_better/` |
| `score` | integer | `437` |
| `post_nsfw` | boolean | `false` |

Sample values come from one saved record, not a live run. Every field with its type, and the schemas, are in https://cleanedweb.com/catalog/reddit-post-search-api/contract.json

## Inputs

- `search` (string \| array of string, required): Required. Supply an array to union distinct results from each source search, in query order. Default: cheesecake.
- `type` (string): Optional. Filters by type. Options: All (all), Posts (posts), Communities (communities), Media (media), Comments (comments), Profiles (people).
- `cid` (boolean): Applies only within type=all: sent alone it selects type=all too; with another type the call is refused.
- `t` (string): Optional. Filters the results. Options: All time (all), Past year (year), Past month (month), Past week (week), Today (day), Past hour (hour).
- `sort` (string): Order of the collection, as the site's own sort control offers it; omitted keeps the site's default order. Options: new, hot.

`enrich_records` is on by default and adds the fields that only appear on each record's detail page. Send `false` to read list fields only. See https://cleanedweb.com/docs/run-api/

## Request

`POST https://api.cleanedweb.com/v1/catalog/public/apis/generated_e28c9d4fe6f0af75564476a4/endpoints/generated_e28c9d4fe6f0af75564476a4_search/run`

```bash
curl -X POST https://api.cleanedweb.com/v1/catalog/public/apis/generated_e28c9d4fe6f0af75564476a4/endpoints/generated_e28c9d4fe6f0af75564476a4_search/run \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: UNIQUE_REQUEST_ID" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "search": "cheesecake",
    "type": "all"
  },
  "version": 1,
  "max_items": 25
}'
```

Send an `Idempotency-Key` header with every run and save it before you send. Reuse it only to retry the same request. If the run does not end within `wait_seconds`, read the result with the same API key and key:

`GET https://api.cleanedweb.com/v1/catalog/public/apis/generated_e28c9d4fe6f0af75564476a4/endpoints/generated_e28c9d4fe6f0af75564476a4_search/result`

## Versions

Current: `1.0`. Pin a major with "version": N in the run body (an integer). Leave it out and the call runs on the latest major. A sunset major runs on the latest major and the response says rerouted. An unknown major answers 404 catalog_version_not_found and lists the available majors.

- v1: current, newest minor `1.0`

### Changelog

- `1.0` (major) 2026-11-26

The same changelog, as data, is in https://cleanedweb.com/catalog/reddit-post-search-api/contract.json

## Use it from an AI agent

MCP server: https://api.cleanedweb.com/mcp?profile=catalog (Streamable HTTP). Sign in with a CleanedWeb account when the client asks (OAuth), or send an API key with the `read` and `run` scopes as `Authorization: Bearer`. Call `get_api` with `api_id` `generated_e28c9d4fe6f0af75564476a4`, then `run_api` with the `run_with` arguments it returns. See https://cleanedweb.com/docs/mcp/

## Run it

Reading the catalog needs no credential. Running needs a CleanedWeb account and an API key with the `run` scope; the first 5,000 records are free, then $1 per 1,000 records. See https://cleanedweb.com/docs/run-catalog-api/

CleanedWeb is not affiliated with Reddit.
