# Reddit Trending Posts

> Reddit Trending Posts 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).

Fetches the top trending posts from Reddit's r/popular or r/all feeds, with optional country filtering, sort order, and AI sentiment analysis.

## Facts

- Endpoint: GET https://x402.apidirect.io/v1/reddit/trending?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/reddit-trending-posts-4bfb1fce
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9iYAr5NvaWzN-EHuhnHsc

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 reddit-trending-posts-4bfb1fce
```

Example prompt: What's trending on Reddit right now? Grab 2 pages of the hottest posts from r/popular in the US, sorted by hot, and include sentiment analysis for each post.

## When to prefer this

Use this endpoint when you need real-time trending content from Reddit across one or multiple countries, with flexible sort options (hot, rising, controversial, top) and optional emotional sentiment scoring per post. Prefer this over manual Reddit scraping or the Reddit API when you need a clean, pay-per-call interface with built-in AI sentiment enrichment. Choose r/popular for mainstream trending content or r/all for the broadest cross-community coverage.

## Known failure modes

- Invalid country code returns an error — only supported ISO codes are accepted
- posted_ago parameter rejected if sort_by is not 'top' or 'controversial'
- country parameter only valid when feed=popular, ignored or errored with feed=all
- pages exceeding maximum of 20 returns a validation error
- Payment failure (402) if USDC balance is insufficient or x402 payment not properly configured
- Rate limiting or Reddit API downtime may cause transient failures

## How this service works

Get the posts trending across Reddit right now, from r/popular (worldwide or one country's) or r/all.

## Output

Returns an array of trending Reddit posts from r/popular or r/all, each including post title, subreddit, upvote count, URL, author, and metadata. When get_sentiment=true, each post also includes a sentiment object with joy, trust, fear, surprise, sadness, disgust, anger, and anticipation scores (0-100), a dominant_emotion, emotional_intensity (0-10), and polarity (positive/negative/neutral). Each page returns up to 25 posts.

## 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": [],
     "properties": {
      "feed": {
       "enum": [
        "popular",
        "all"
       ],
       "type": "string",
       "description": "popular (r/popular: the most active posts in public, non-NSFW communities) or all (r/all: every community) (default: popular)"
      },
      "pages": {
       "type": "integer",
       "default": 1,
       "maximum": 20,
       "minimum": 1,
       "description": "Number of pages to fetch, 1-20 (default: 1). Each page returns up to 25 posts."
      },
      "country": {
       "enum": [
        "AR",
        "AU",
        "BG",
        "CA",
        "CL",
        "CO",
        "CZ",
        "DE",
        "ES",
        "FI",
        "FR",
        "GB",
        "GR",
        "HR",
        "HU",
        "IE",
        "IN",
        "IS",
        "IT",
        "JP",
        "MX",
        "MY",
        "NZ",
        "PH",
        "PL",
        "PR",
        "PT",
        "RO",
        "RS",
        "SE",
        "SG",
        "TH",
        "TR",
        "TW",
        "US"
       ],
       "type": "string",
       "description": "One country's r/popular, as on reddit.com: AR, AU, BG, CA, CL, CO, CZ, DE, ES, FI, FR, GB, GR, HR, HU, IE, IN, IS, IT, JP, MX, MY, NZ, PH, PL, PR, PT, RO, RS, SE, SG, TH, TR, TW or US (default: worldwide). Only with feed=popular."
      },
      "sort_by": {
       "enum": [
        "hot",
        "most_recent",
        "top",
        "rising",
        "controversial"
       ],
       "type": "string",
       "default": "hot",
       "description": "Sort order: hot, most_recent, top, rising, or controversial (default: hot)"
      },
      "posted_ago": {
       "enum": [
        "1h",
        "24h",
        "7d",
        "30d",
        "12m",
        "all"
       ],
       "type": "string",
       "description": "Time window for sort_by=top or sort_by=controversial: 1h, 24h, 7d, 30d, 12m, or all (default: 24h). Rejected with any other sort_by."
      },
      "get_sentiment": {
       "type": "boolean",
       "default": false,
       
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/reddit-trending-posts-4bfb1fce/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)
