---
title: "Search Reddit posts by keyword query"
method: POST
path: "/api/v1/reddit/search"
tags: ["Reddit"]
---

# Search Reddit posts by keyword query

`POST /api/v1/reddit/search`

## Request

- Base URL: `https://glim.sh`
- URL: `https://glim.sh/api/v1/reddit/search`
- Auth: one of:
  - none
  - API key in header `x-api-key`
  - HTTP bearer
  - API key in query parameter `apiKey`

Search posts across Reddit with sort and time filters.

## Request body

- object
  - `query` string, required: Search query
  - `sort` 'relevance' | 'hot' | 'top' | 'new' | 'comments': Sort order
  - `time` 'hour' | 'day' | 'week' | 'month' | 'year' | 'all': Time range
  - `limit` integer: Max posts (each returned with full content + top comments)
  - `cursor` string: Pagination cursor from a prior response's next_cursor
  - `start_date` string: Only posts on or after this date (YYYY-MM-DD)
  - `end_date` string: Only posts before this date (YYYY-MM-DD)

## Response `200`

Search results

- object

## Other responses

- `400`: Bad Request
- `402`: Payment Required
- `502`: Upstream Error

---

[API](https://skmtc.dev/glim/apis/glim-sh.md) · [All operations](https://skmtc.dev/glim/apis/glim-sh/llms.txt) · [OpenAPI document](https://skmtc.dev/glim/apis/glim-sh/revisions/0094e5226d73?raw)
