Substack

List Substack post comments

Get the whole nested comment tree of a Substack post.

GET/v1/substack/posts/{post}/comments
1credit
x-api-keystringheader

API key (`sfk_...`)

Parameters
2
poststringrequiredpath

A post: its numeric id (`223208969`) or its URL (`https://www.astralcodexten.com/p/...`). Post comments need the URL form.

min 1 chars · max 2000 chars

sortstringoptionalquery

Comment order. The whole tree is returned either way.

one of: best, oldest, newest

Response fields
68

Endpoint-specific response payload.

datalookupStatus
string

Whether the post was found.

one of: found, not_found, restricted

datarestrictedReason
stringnullable

Why the post is restricted, when it is.

one of: invite_only, flagged, paid, null

datapostId
integernullable

Numeric post id.

Top-level comments, with replies nested under each one.

datacomments[]id
integer

Numeric comment id.

datacomments[]postId
integernullable

Numeric post id.

datacomments[]publicationId
integernullable

Numeric publication id.

datacomments[]body
stringnullable

The comment's plain text.

datacomments[]bodyJson
objectnullable

The comment's rich text document, when there is one.

datacomments[]createdAt
stringnullable

ISO 8601 timestamp, or null when Substack does not publish one.

datacomments[]editedAt
stringnullable

ISO 8601 timestamp, or null when Substack does not publish one.

The comment's author.

datacomments[]authorid
integernullable

Numeric user id.

datacomments[]authorname
stringnullable

The name shown for the author.

datacomments[]authorhandle
stringnullable

The author's handle.

datacomments[]authorslug
stringnullable

The author's profile slug.

datacomments[]authorbio
stringnullable

The author's short biography.

datacomments[]authorphotoUrl
stringnullable

The author's profile photo URL.

The author's main badge, when there is one.

datacomments[]authorbadgetype
stringnullable

The kind of badge, such as `bestseller`.

datacomments[]authorbadgetier
integernullable

The badge tier, when it has one.

datacomments[]authorbadgehandle
stringnullable

The handle the badge belongs to.

datacomments[]authorbadgeservice
stringnullable

The service the badge comes from.

datacomments[]authorbadgeurl
stringnullable

A link for the badge, when it has one.

datacomments[]authorbadges
objectnullable

The author's reader status fields, when available.

datacomments[]authorbestsellerTier
integernullable

The author's bestseller tier.

The author's primary publication, when there is one.

datacomments[]authorprimaryPublicationid
integernullable

Numeric publication id.

datacomments[]authorprimaryPublicationname
stringnullable

The publication's name.

datacomments[]authorprimaryPublicationsubdomain
stringnullable

The publication's Substack subdomain.

datacomments[]authorprimaryPublicationcustomDomain
stringnullable

The publication's custom domain, when it has one.

datacomments[]authorprimaryPublicationlogoUrl
stringnullable

The publication's logo URL.

datacomments[]reactionCount
integernullable

The number of reactions.

datacomments[]reactions
object

Emoji to reaction count.

datacomments[]restackCount
integernullable

The number of restacks.

datacomments[]replyCount
integernullable

The number of direct replies.

datacomments[]ancestorPath
stringnullable

The comment's position in the tree.

datacomments[]isDeleted
booleannullable

Whether the comment was deleted.

datacomments[]isPinned
booleannullable

Whether the comment is pinned.

Names of people who reacted, when listed.

datacomments[]reactorNames[]
stringoptional

Images, links, posts or polls attached to the comment.

datacomments[]attachments[]id
stringnullable

The attachment's id.

datacomments[]attachments[]type
stringnullable

`image`, `link`, `post`, `poll` or `missing`.

datacomments[]attachments[]imageUrl
stringnullable

The image URL, for an image attachment.

datacomments[]attachments[]imageWidth
integernullable

The image width in pixels.

datacomments[]attachments[]imageHeight
integernullable

The image height in pixels.

datacomments[]attachments[]explicit
booleannullable

Whether the attachment is explicit.

Preview metadata for a link attachment.

datacomments[]attachments[]linkurl
stringnullable

The link's URL.

datacomments[]attachments[]linkhost
stringnullable

The link's host.

datacomments[]attachments[]linktitle
stringnullable

The link's title.

datacomments[]attachments[]linkdescription
stringnullable

The link's description.

datacomments[]attachments[]linkimage
stringnullable

The link's preview image URL.

datacomments[]attachments[]linkoriginalImage
stringnullable

The link's original image URL.

datacomments[]attachments[]postId
integernullable

The attached post's id.

datacomments[]attachments[]publicationId
integernullable

The attached publication's id.

datacomments[]attachments[]reason
stringnullable

Why a missing attachment was removed.

Nested replies, when the comment has any.

datacomments[]replies[]
objectoptional
datacommentsHidden
boolean

True when the post is paid and its comments are not public.

datareturnedCount
integer

The number of comment nodes returned.

≥ 0

datatruncated
boolean

True when more than 5000 comment nodes were present and the list was cut.

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

Code example

curl "https://api.socialfetch.dev/v1/substack/posts/https%3A%2F%2Fwww.astralcodexten.com%2Fp%2Fopen-thread-400/comments" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Substack comments.