API Direct
Endpoints
Substack Publication Posts

Substack Publication Posts

GET /v1/substack/publication/posts

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. Supports fetching multiple pages in a single API call.

Cost
$0.003 per page
Free tier
50 requests/month

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
pages
Number of pages to fetch, 1-100 (default: 1). Each page returns up to 20 posts; you are billed per page returned.
get_sentiment
Set to true to add AI emotion analysis (Plutchik's Wheel) to each result. Adds +$0.001 per page to the cost. Returns emotion scores, dominant emotion, intensity, and polarity.

Example Request

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

Example Response

{
  "count": 20,
  "pages": 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"
}

Your Usage

Free tier this month
Loading...
Recent Activity