---
title: "Search the reddit-trending dataset"
method: GET
path: "/datasets/reddit-trending/search"
tags: ["Datasets"]
---

# Search the reddit-trending dataset

`GET /datasets/reddit-trending/search`

## Request

- Base URL: `https://api.crawlora.net/api/v1`
- URL: `https://api.crawlora.net/api/v1/datasets/reddit-trending/search`
- Auth: API key in header `x-api-key`

Searches daily snapshots of each tracked subreddit's hot-feed post order (one document per subreddit × snapshot × rank) so history accumulates. With no `date` the latest snapshot is returned (today's trending); pair `subreddit` with `sort=date_desc` for a subreddit's trending history over time. There is no score or comment-count field, so `rank` reflects Reddit's own hot-feed order rather than a locally computed score. Billing: this search costs 1 credit per record returned, with a minimum of 2 (an empty result costs 2, a full page of 100 costs 100).

## Query parameters

- `q` string
- `subreddit` string
- `date` string
- `sort` 'rank' | 'date_desc'
- `page` integer
- `page_size` integer

## Headers

- `x-api-key` string, required

## Response `200`

OK

- DatasetsRedditTrendingSearchResponseDoc
  - `code` integer
  - `data` DatasetsRedditTrendingSearchResponse
    - `dataset` string
    - `items` EsRedditTrendingEntry[]
      - `author` string
      - `crawled_at` string
      - `created_utc` integer
      - `domain` string
      - `permalink` string
      - `post_id` string
      - `post_uid` string
      - `rank` integer
      - `snapshot_date` string
      - `subreddit` string
      - `title` string
      - `url` string
    - `page` integer
    - `page_size` integer
    - `snapshot_date` string
    - `sort` string
    - `total` integer
  - `msg` string

## Other responses

- `400`: Bad Request
- `429`: Too Many Requests
- `500`: Internal Server Error

---

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