All endpoints
Substack Post Comments

Substack Post Comments API

Get the full comment thread of a Substack post, nested. Returns every comment with text, author, date, likes, replies and restacks, replies nested under their parent to any depth, sorted by relevance, newest first or oldest first.

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

Parameters

url
Post URL, e.g. https://www.lennysnewsletter.com/p/all-of-the-lenny-and-friends-summit (max 500 characters). Provide url, post_id, or publication and slug.
post_id
Numeric post ID, as returned in post_id. Provide url, post_id, or publication and slug.
publication
Publication subdomain, host or URL, used together with slug.
slug
Post URL slug, e.g. all-of-the-lenny-and-friends-summit, used together with publication.
sort_by
Sort order: relevance (best first), most_recent, oldest (default: relevance)
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

comments
Top-level comments in the requested order
comment_id
Comment ID
body
Comment text
date
Date and time posted (UTC)
author
Commenter's handle
author_name
Commenter's display name
author_id
Commenter's user ID
author_url
Link to the commenter's profile
likes
Number of likes
replies
Number of replies
restacks
Number of restacks
is_author
Whether the commenter wrote the post
is_pinned
Whether the comment is pinned
author_pic_url
Author's profile picture URL
reactions
Reaction counts by emoji
liked_by
Names of the first people who liked the comment
status
published, or Substack's removal status
url
Direct link to the comment
children
Replies, each with the same fields (nested to any depth)
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.
post_id
The post's ID
post_url
The post's URL
sort_by
The sort order used
total
The post's comment count
count
Number of comments returned, including nested replies
truncated
True when a very large thread was cut at the response size limit (whole top-level comments are dropped from the end)

Example Request

curl "https://apidirect.io/v1/substack/post/comments?url=https%3A%2F%2Fwww.lennysnewsletter.com%2Fp%2Fhow-duolingo-reignited-user-growth"   -H "X-API-Key: YOUR_API_KEY"

Example Response

{
  "comments": [
    {
      "author": "fullstackresearcher",
      "author_id": "8067246",
      "author_name": "Daniel Kyne",
      "author_pic_url": "https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/69f08c0f-8d66-4b63-8d88-97af005d6bab_2126x2126.png",
      "author_url": "https://substack.com/@fullstackresearcher",
      "body": "Nothing beats real life examples (especially including failures) in deep detail like this! 🙏",
      "children": [
        {
          "author": "jorgemazal1",
          "author_id": "25411757",
          "author_name": "Jorge Mazal",
          "author_url": "https://substack.com/@jorgemazal1",
          "body": "Thank you Daniel!",
          "children": [],
          "comment_id": "13190378",
          "date": "2023-02-28 21:45:14",
          "is_author": true,
          "is_pinned": false,
          "likes": 5,
          "replies": 0,
          "restacks": 0,
          "url": "https://www.lennysnewsletter.com/p/how-duolingo-reignited-user-growth/comment/13190378"
        }
      ],
      "comment_id": "13180393",
      "date": "2023-02-28 16:40:12",
      "is_author": false,
      "is_pinned": false,
      "liked_by": [
        "Lenny Rachitsky"
      ],
      "likes": 49,
      "reactions": {
        "❤": 49
      },
      "replies": 1,
      "restacks": 0,
      "status": "published",
      "url": "https://www.lennysnewsletter.com/p/how-duolingo-reignited-user-growth/comment/13180393"
    }
  ],
  "count": 79,
  "post_id": "104096876",
  "post_url": "https://www.lennysnewsletter.com/p/how-duolingo-reignited-user-growth",
  "sort_by": "relevance",
  "total": 78,
  "truncated": false
}

Frequently asked questions

Is the thread paginated?

No. One request returns the whole thread Substack serves, so there is no pages parameter.

Why is comments empty when total is not?

Comments on posts restricted to paying subscribers are hidden from non-subscribers. total still reports the count.

Does sentiment cover nested replies?

get_sentiment analyses the top-level comments. Nested replies under children are returned without sentiment.

Can a thread be too big?

Threads of a few thousand comments can exceed the 4MB response limit. In that case the response keeps as many whole top-level comments as fit and sets truncated to true.

How does pricing work?

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

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

Get API Key