# API Direct – Substack Publication Posts

> API Direct – Substack Publication 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).

Retrieve a Substack publication's posts sorted by newest, top, or most discussed, or search them by keyword — with optional AI sentiment analysis.

## Facts

- Endpoint: GET https://x402.apidirect.io/v1/substack/publication/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-substack-publication-posts-1efad2b5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_eJrer_Ini2x-udEfKRxPX

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-substack-publication-posts-1efad2b5
```

Example prompt: Show me the top 20 most-discussed posts from Lenny's Newsletter on Substack — search through them for anything about 'product-market fit' and include AI sentiment analysis on the results.

## When to prefer this

Use this endpoint when you need to browse, search, or monitor posts from a specific known Substack publication — particularly when you want keyword search, sorting by engagement or recency, or optional AI emotion scoring on results. Prefer this over the trending Substack endpoint when you have a target publication in mind rather than wanting cross-platform trending content.

## Known failure modes

- Invalid or unresolvable publication subdomain returns an error or empty result
- Keyword query exceeding 500 characters is rejected
- Requesting sort_by with a keyword query is ignored (relevance overrides sort)
- Page number beyond available archive returns empty results
- Publication with no posts or a private/paywalled archive may return empty or partial results
- Network timeouts or Substack rate limiting may cause request failures

## How this service works

Get a publication's posts, newest first, top or most discussed, or search them by keyword.

## Output

A paginated list of up to 20 posts from the specified Substack publication, including post titles, dates, and metadata. When searching by keyword, results are ranked by relevance. When sort_by is used, results are ordered by most_recent, top, or discussions. If get_sentiment is true, each post also includes Plutchik's Wheel emotion scores, the dominant emotion, intensity level, and polarity (positive/negative).

## 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": [
      "publication"
     ],
     "properties": {
      "page": {
       "type": "integer",
       "default": 1,
       "minimum": 1,
       "description": "Page number for pagination. Each page returns up to 20 posts."
      },
      "query": {
       "type": "string",
       "maxLength": 500,
       "description": "Keyword to search the publication's posts for (max 500 characters). Results are by relevance; sort_by is ignored."
      },
      "sort_by": {
       "enum": [
        "most_recent",
        "top",
        "discussions"
       ],
       "type": "string",
       "default": "most_recent",
       "description": "Sort order for the archive"
      },
      "publication": {
       "type": "string",
       "maxLength": 500,
       "description": "Publication subdomain (lenny), host (lenny.substack.com, www.lennysnewsletter.com) or any URL on it (max 500 characters)"
      },
      "get_sentiment": {
       "type": "boolean",
       "default": false,
       "description": "Set to true to add AI emotion analysis (Plutchik's Wheel) to each result. Adds +$0.001 per request to the cost. Returns emotion scores, dominant emotion, intensity, and polarity."
      },
      "podcasts_only": {
       "type": "boolean",
       "default": false,
       "description": "Set to true to return only podcast episodes (most_recent archive only)."
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-direct-substack-publication-posts-1efad2b5/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)
