# API Direct – Reddit Post Search

> API Direct – Reddit Post Search is a paid API for AI agents from x402.apidirect.io, paid per call via x402, $0.004/call, status unknown (last checked 2026-10-30).

Search Reddit posts by keyword across all subreddits or within a specific subreddit, with optional sentiment analysis.

## Facts

- Endpoint: GET https://x402.apidirect.io/v1/reddit/posts?utm_source=zero.xyz
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-direct-reddit-post-search-408e371a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Tmjy1TL_AdxS-7ubbMLn8

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability api-direct-reddit-post-search-408e371a
```

Example prompt: Search Reddit for posts mentioning 'ChatGPT jailbreak' from the past 7 days, sorted by most recent, and include AI sentiment analysis on each post.

## When to prefer this

Use this endpoint when you need to search Reddit specifically — across all subreddits or within one — with flexible sorting, time filtering, and optional AI sentiment analysis. Prefer this over generic web search when you want structured Reddit post data with upvote/comment counts and subreddit attribution. Choose the sentiment flag when you need emotional tone analysis on community discussions rather than just raw text.

## Known failure modes

- Invalid subreddit name (non-alphanumeric characters or wrong length) returns HTTP 400
- Invalid posted_ago value returns HTTP 400
- Query exceeding 500 characters returns 400
- Empty or no results for niche queries returns empty list
- Reddit rate limiting or availability issues may cause intermittent failures
- Page number out of range (>12) returns 400

## How this service works

Search for Reddit posts by keyword across all subreddits.

## Output

Returns a paginated list of up to 20 Reddit posts per page matching the query, including post title, body, author, subreddit, upvotes, comment count, URL, and timestamp. If sentiment analysis is enabled, each post also includes an emotions breakdown (joy, trust, fear, surprise, sadness, disgust, anger, anticipation scored 0–100), dominant emotion, emotional intensity (0–10), and polarity (positive/negative/neutral).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "query"
     ],
     "properties": {
      "page": {
       "type": "integer",
       "default": 1,
       "maximum": 12,
       "minimum": 1,
       "description": "Page number for pagination (1-12). Each page returns up to 20 posts."
      },
      "query": {
       "type": "string",
       "maxLength": 500,
       "description": "Search query (max 500 characters). Reddit search operators are supported, including AND, OR, NOT, exclusion with -, grouping with ( ), and fields such as subreddit: and author:."
      },
      "sort_by": {
       "enum": [
        "most_recent",
        "relevance",
        "hot",
        "top",
        "most_commented"
       ],
       "type": "string",
       "default": "most_recent",
       "description": "Sort order for results"
      },
      "subreddit": {
       "type": "string",
       "maxLength": 25,
       "description": "Only return posts from this subreddit, with or without r/ (e.g. Python). Any name that isn't 2-21 letters, digits or underscores returns 400."
      },
      "posted_ago": {
       "enum": [
        "1h",
        "24h",
        "7d",
        "30d",
        "12m",
        "all"
       ],
       "type": "string",
       "description": "Only return posts from this period: 1h (past hour), 24h (past day), 7d (past week), 30d (past month), 12m (past year) or all (all time, the default). Works with every sort_by, e.g. sort_by=relevance with posted_ago=24h returns the most relevant posts of the past day. Any other value returns 400."
      },
      "include_nsfw": {
       "type": "boolean",
       "default": false,
       "description": "Set to true to include posts marked NSFW. They are left out by default."
      },
      "get_sentiment": {
       "type": "boolean",
       "default": false,
       "description": "Set to true to add AI emotion analysis to each post. Adds a `sentiment` object containing `emotions` (joy, trust, fear, surprise, sadness, disgust, anger and anticipation, each scored 0-100), `dominant_emotion`, `emotional_intensit
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-direct-reddit-post-search-408e371a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.apidirect.io](https://www.zero.xyz/host/x402.apidirect.io/llms.txt)
