# Reddit Search API (reddit.search)

- Canonical page: https://everyinfra.com/en/reddit-api/search
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "reddit", "action": "search", "params": {...}}
- Price: $0.000792 per call ($0.79 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, default 10, max 25 per call (larger values are capped)
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=reddit&action=search

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | Specifies the post search query for `search`. Does not search full comment text. Defaults to `relevance` sorting; the time window is fixed to the past month. Only posts that match the query are returned: a query word appears in the title or community name and the post contains the query's words, or the words appear close together in the body (queries of three or more words need at least three quarters of them). Posts that share only one word are dropped, so you may get fewer than `limit`; if none match, the call is refunded as an empty result. |
| sort | enum: controversial / newest / popular / relevance / rising / top | no | not declared | Orders Reddit post listings by `newest`, `popular`, `relevance`, `rising`, or `top`. The `post_detail` and `comments` actions do not accept `sort`. |
| limit | integer (1–25) | no | 10 | The most rows to return in this call, an integer from 1 to 25. The default applies when you leave it out, and a call can return fewer rows. Larger values are accepted and capped at the maximum. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | The record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms. |
| url | Link to the record on the platform. |
| title | Title. null when the platform has no titles (for example text-only posts). |
| text | Body text with HTML removed, returned in full and never cut short (on a few platforms the list results themselves carry only an excerpt; the platform's field notes say so). |
| author_username | Author's username (@handle), usually usable in URLs. |
| community | platform-native meaning |
| like_count | Likes. null means the platform or this capability does not disclose it; it is not 0. |
| comment_count | Comments. null means not disclosed, not 0. |
| posted_at | Publish time in ISO 8601, UTC (for example 2026-08-07T12:34:56+00:00). Non-standard strings from the platform are passed through as is, so parse defensively. null means the platform does not disclose it. |
| flair | platform-native meaning |
| domain | platform-native meaning |
| external_link | platform-native meaning |
| thumbnail_url | Thumbnail link, lower resolution than image_url. |
| image_urls | Array of image links in the platform's display order; absent when there are no images. |
| platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |

## Example

```bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "reddit",
  "action": "search",
  "params": {
    "keyword": "mechanical keyboard"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "reddit",
        "action": "search",
        "params": {
            "keyword": "mechanical keyboard",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-09-26T08:56:04Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2 of 10. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "reddit",
  "action": "search",
  "results": [
    {
      "id": "1wpwg1j",
      "url": "https://www.reddit.com/r/civic/comments/1wpwg1j/would_you_use_mechanical_keyboard_switches_as_12v/",
      "title": "Would you use mechanical keyboard switches as 12V car controls?",
      "text": "We&#39;re building MXIO: a small switch system that lets you use standard MX-style mechanical keyboard switches in a car. The switches are hot-swappable, and each unit can be set up as a momentary or toggle control. It’s designed for 12V systems, rated for 15A continuous / 20A pe…",
      "author_username": "•••",
      "community": "civic",
      "like_count": 0,
      "comment_count": 0,
      "posted_at": "2026-09-25T13:31:55+00:00",
      "platform": "reddit"
    },
    {
      "id": "1wptnwp",
      "url": "https://www.reddit.com/r/IndianTeenagers/comments/1wptnwp/mechanical_keyboard_recommendations/",
      "title": "Mechanical keyboard recommendations",
      "text": "&#x200B; Hey everyone! I’m looking to buy my first mechanical keyboard and would appreciate some recommendations. What I’m looking for: - Budget: Under 7k - Layout: 75% - Use: Gaming + programming + general use I’m mainly looking for something with good build quality, comfortable…",
      "author_username": "•••",
      "community": "IndianTeenagers",
      "like_count": 0,
      "comment_count": 0,
      "posted_at": "2026-09-25T11:18:43+00:00",
      "platform": "reddit"
    }
  ],
  "count": 10,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=reddit
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
