All endpoints
Substack Publication Posts

Substack Publication Posts API

Get a publication's posts, newest first, top or most discussed, or search them by keyword. Returns post title, author, publication date, engagement, paywall status, word count and tags.

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

Parameters

publication *
Publication subdomain (lenny), host (lenny.substack.com, www.lennysnewsletter.com) or any URL on it (max 500 characters)
query
Keyword to search the publication's posts for (max 500 characters)
sort_by
Sort order: most_recent, top, discussions (default: most_recent)
podcasts_only
Set to true to return only podcast episodes
page
Page number (default: 1). 20 posts per page
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 the publication's posts
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.
publication
The publication (publication_id, name, subdomain, url, logo_url)
publication_url
Publication home URL
sort_by
The sort order used
podcasts_only
Whether only podcast episodes were requested
query
The keyword filter used, null when none
page
Current page number
has_next_page
Whether another page exists
count
Number of posts returned

Example Request

curl "https://apidirect.io/v1/substack/publication/posts?publication=lenny&sort_by=most_recent&page=1"   -H "X-API-Key: YOUR_API_KEY"

Example Response

{
  "count": 20,
  "has_next_page": true,
  "page": 1,
  "podcasts_only": false,
  "posts": [
    {
      "audience": "only_paid",
      "audio_url": "",
      "author": "lenny",
      "author_id": "1849774",
      "author_name": "Lenny Rachitsky",
      "author_url": "https://substack.com/@lenny",
      "authors": [
        {
          "name": "Lenny Rachitsky",
          "url": "https://substack.com/@lenny",
          "user_id": "1849774",
          "username": "lenny"
        }
      ],
      "comments": 25,
      "cover_image_url": "https://substackcdn.com/image/fetch/$s_!ByeN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F…",
      "date": "2025-10-14 13:03:49",
      "domain": "substack.com",
      "is_paid": true,
      "lang": "en",
      "likes": 839,
      "podcast_duration": 0,
      "podcast_image_url": "",
      "podcast_url": "",
      "post_id": "175662739",
      "publication": "Lenny's Newsletter",
      "publication_id": "10845",
      "publication_url": "https://www.lennysnewsletter.com",
      "reactions": {
        "❤": 839
      },
      "replies": 0,
      "restacks": 65,
      "slug": "everyone-should-be-using-claude-code",
      "snippet": "How to get started, and 50 ways non-technical people are using Claude Code in their work and life",
      "source": "Substack",
      "subtitle": "How to get started, and 50 ways non-technical people are using Claude Code in their work and life",
      "tags": [
        "AI"
      ],
      "title": "Everyone should be using Claude Code more",
      "type": "newsletter",
      "url": "https://www.lennysnewsletter.com/p/everyone-should-be-using-claude-code",
      "video_duration": 0,
      "wordcount": 2958
    }
  ],
  "publication": {
    "logo_url": "https://substackcdn.com/image/fetch/$s_!8MSN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F…",
    "name": "Lenny's Newsletter",
    "publication_id": "10845",
    "subdomain": "lenny",
    "url": "https://www.lennysnewsletter.com"
  },
  "publication_url": "https://www.lennysnewsletter.com",
  "query": null,
  "sort_by": "top"
}

Frequently asked questions

How far back can I page?

All the way: the archive has no fixed last page. A page past the end returns an empty list.

What does discussions return?

Substack's Discussions tab: the posts with comment activity, newest first. Substack filters each page of 20, so pages can hold fewer posts.

Can I search within a publication?

Yes. Pass query to get the publication's posts matching it, most relevant first, 20 per page and up to 101 pages.

How do I get podcast episodes?

Pass podcasts_only=true. Each episode carries podcast_url and podcast_duration; publications without a podcast return an empty list.

Do paid posts appear?

Yes, with is_paid true. Their full body needs Post Details, which returns the free preview for paid posts.

How does pricing work?

You only pay for successful requests. The Substack Publication 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 Substack Publication Posts API

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

Get API Key