All endpoints
Search Substack Posts

Search Substack Posts API

Search Substack posts by keyword across every publication. Returns post title, subtitle, author, publication, publication date, engagement (likes, comments, restacks), paywall status, word count, cover image and tags, plus the publications related to the query. Supports a time window from the past day to the past year.

Price: $0.003 per request
Free tier: 50 requests/month
Endpoint
GET /v1/substack/posts

Parameters

query *
Search keyword (max 500 characters)
page
Page number, 1-101 (default: 1). 16-20 posts per page
posted_ago
Only posts from this period: 24h, 7d, 30d, 12m (default: all time)
language
Two-letter language code, e.g. es, to rank posts in that language first
get_sentiment
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.

Response fields

posts
Array of matching posts, most relevant first
title
Post title
subtitle
Post subtitle, empty when none
url
Direct link to the post
date
Publication date and time (UTC, YYYY-MM-DD HH:MM:SS)
author
Author's Substack handle (empty when the byline is the publication itself)
author_name
Author's display name
author_id
Author's Substack user ID, null when the byline is the publication itself
author_url
Link to the author's profile
source
"Substack"
domain
"substack.com"
snippet
Post description or preview text
likes
Number of likes (reactions)
comments
Number of comments
restacks
Number of restacks (shares to Notes)
reactions
Reaction counts by emoji, e.g. {"❤": 284}
is_paid
Whether the post is for paying subscribers only
audience
everyone, only_paid or only_founding
type
newsletter, podcast, video or thread
wordcount
Word count of the full post
lang
Post language code (e.g. en)
cover_image_url
Cover image URL, empty when none
podcast_url
Audio file URL for podcast posts, empty otherwise
podcast_duration
Podcast length in seconds, 0 otherwise
tags
Post tags
authors
All credited authors (username, name, user_id, url); author is the first
replies
Number of replies to comments
audio_url
Substack's narrated audio of the post (MP3), empty when none
podcast_image_url
Episode artwork for podcast posts, empty otherwise
video_duration
Video length in seconds for video posts, 0 otherwise
publication
Publication name
publication_id
Publication ID (pass it as publication_id to the publication endpoints)
publication_url
Publication home URL
slug
Post URL slug
post_id
Post ID (pass it as post_id to the post endpoints)
sentiment
Emotion analysis results. Only present when get_sentiment=true. Returns null if analysis fails.
emotions
Plutchik emotion scores (0-100) for: joy, trust, fear, surprise, sadness, disgust, anger, anticipation.
dominant_emotion
The emotion with the highest score.
emotional_intensity
Overall emotional intensity on a scale of 0-10.
polarity
Overall sentiment polarity: positive, negative, or neutral.
publications
Publications related to the query, each with the publication fields documented on Publication Details (https://apidirect.io/docs/substack-publication)
query
The search keyword
page
Current page number
has_next_page
Whether another page exists
count
Number of posts returned

Example Request

curl "https://apidirect.io/v1/substack/posts?query=claude%20code&page=1"   -H "X-API-Key: YOUR_API_KEY"

Example Response

{
  "count": 18,
  "has_next_page": true,
  "page": 1,
  "posts": [
    {
      "audience": "everyone",
      "audio_url": "",
      "author": "lonharris",
      "author_id": "380063648",
      "author_name": "Lon Harris",
      "author_url": "https://substack.com/@lonharris",
      "authors": [
        {
          "name": "Lon Harris",
          "url": "https://substack.com/@lonharris",
          "user_id": "380063648",
          "username": "lonharris"
        }
      ],
      "comments": 0,
      "cover_image_url": "https://substackcdn.com/image/youtube/w_728,c_limit/yUuFvL1lK4k",
      "date": "2026-10-06 18:23:35",
      "domain": "substack.com",
      "is_paid": false,
      "lang": "en",
      "likes": 7,
      "podcast_duration": 0,
      "podcast_image_url": "",
      "podcast_url": "",
      "post_id": "219138700",
      "publication": "This Week in AI",
      "publication_id": "6195110",
      "publication_url": "https://www.thisweekinai.ai",
      "reactions": {
        "❤": 7
      },
      "replies": 0,
      "restacks": 1,
      "slug": "build-custom-claude-code-features",
      "snippet": "No more filing feature requests with Anthropic. Just tell Claude what you want.",
      "source": "Substack",
      "subtitle": "No more filing feature requests with Anthropic. Just tell Claude what you want.",
      "tags": [
        "Demo"
      ],
      "title": "Build custom Claude Code features in Claude Code",
      "type": "newsletter",
      "url": "https://www.thisweekinai.ai/p/build-custom-claude-code-features",
      "video_duration": 0,
      "wordcount": 686
    }
  ],
  "publications": [
    {
      "author": "thisweekininc",
      "author_id": "544240277",
      "author_name": "This Week In",
      "author_pic_url": "",
      "author_url": "https://substack.com/@thisweekininc",
      "bestseller_tier": 0,
      "cover_image_url": "https://substack-post-media.s3.amazonaws.com/public/images/daa90518-9a2f-4ae3-9068-88b7c4d53b14_1280x1280.png",
      "created_at": "2025-09-04 15:56:00",
      "custom_domain": "www.thisweekinai.ai",
      "description": "Essential briefing on AI news and trends for researchers, founders, and the enterprises betting on them. New episodes every Thursday, fresh posts daily.",
      "domain": "substack.com",
      "first_post_date": "2025-10-28 01:00:12",
      "founding_plan_name": "",
      "has_chat": true,
      "has_podcast": true,
      "has_recommendations": true,
      "is_bestseller": false,
      "language": "en",
      "logo_url": "https://substackcdn.com/image/fetch/$s_!JY4r!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F…",
      "logo_url_wide": "",
      "name": "This Week in AI",
      "paid_enabled": true,
      "paid_subscriber_band": "",
      "paid_subscriber_floor": 0,
      "plans": [
        {
          "amount": 10.0,
          "currency": "USD",
          "interval": "month"
        }
      ],
      "podcast": null,
      "publication_id": "6195110",
      "ranking_detail": "Launched a year ago",
      "sections": [],
      "source": "Substack",
      "subdomain": "twiai",
      "subscriber_count": 9000,
      "subscriber_count_label": "9.6K+",
      "twitter_handle": "",
      "type": "newsletter",
      "url": "https://www.thisweekinai.ai"
    }
  ],
  "query": "claude code"
}

Frequently asked questions

How deep can I page?

Substack serves 101 pages (about 2,000 posts) per query.

Why is the page size not fixed?

Substack returns 16-20 posts per page depending on the query.

What does language do?

It ranks posts written in that language first. Without it results are ranked by relevance alone.

How does pricing work?

You only pay for successful requests. The Search Substack Posts API costs $0.003 per request. There are no monthly fees or commitments. You get 50 free requests per endpoint every month.

Do I need a credit card to start?

No. You can sign up and use the free tier (50 requests/endpoint/month) without adding a payment method. You only need to add a card when you want to exceed the free tier.

Are there rate limits?

Yes, there's a concurrency limit of 10 simultaneous requests per endpoint per user. If you need more, just get in touch.

Start using the Search Substack Posts API

Get your API key and start making requests in minutes. 50 requests/month free every month.

Get API Key