Skip to main content
POST
/
api
/
substack
/
posts
/
comments
/substack/posts/comments
curl --request POST \
  --url https://api.anysite.io/api/substack/posts/comments \
  --header 'Content-Type: application/json' \
  --header 'access-token: <api-key>' \
  --data '
{
  "publication": "<string>",
  "post_id": 123,
  "count": 2,
  "timeout": 300
}
'
[
  {
    "id": 123,
    "@type": "@substack_comment",
    "text": "<string>",
    "author": {
      "@type": "@substack_comment_author",
      "id": 123,
      "name": "<string>",
      "handle": "<string>",
      "image": "<string>"
    },
    "created_at": "<string>",
    "edited_at": "<string>",
    "depth": 0,
    "parent_id": 123,
    "reaction_count": 123,
    "reactions": {},
    "restack_count": 123,
    "is_pinned": false,
    "is_deleted": false,
    "reply_count": 0,
    "replies": []
  }
]

Authorizations

access-token
string
header
required

API token from the dashboard

Headers

access-token
string
required

Body

application/json
publication
string
required

Substack publication subdomain or custom domain

Minimum string length: 1
Examples:

"thefp.com"

"newsletter.pragmaticengineer.com"

"platformer"

post_id
integer
required

Numeric post id (the id field of a Substack post)

Example:

201460006

count
integer
required

Max number of top-level comments to return

Required range: x >= 1
timeout
integer
default:300

Max scrapping execution timeout (in seconds)

Required range: 20 <= x <= 1500

Response

Successful Response

id
integer
required
@type
string
default:@substack_comment
text
string | null
author
SubstackCommentAuthor · object
created_at
string | null
edited_at
string | null
depth
integer
default:0
parent_id
integer | null
reaction_count
integer | null
reactions
Reactions · object
restack_count
integer | null
is_pinned
boolean
default:false
is_deleted
boolean
default:false
reply_count
integer
default:0
replies
Replies · array