Substack

List Substack publication posts

List the posts in a Substack publication archive.

GET/v1/substack/publications/{publication}/posts
1credit
x-api-keystringheader

API key (`sfk_...`)

Parameters
7
publicationstringrequiredpath

A publication: its numeric id (`89120`), its Substack subdomain (`astralcodexten`), its host (`www.astralcodexten.com`) or its URL. A numeric id is refused with a 400 on the routes that need a subdomain, host or URL.

min 1 chars · max 400 chars

sortstringoptionalquery

Order. `oldest` is not supported.

one of: new, top, pinned

querystringoptionalquery

Only posts whose text matches this string.

min 1 chars · max 200 chars

sectionintegeroptionalquery

Only posts in this section id (from the publication's sections).

≥ 0

pageintegeroptionalquery

Page number, 0 to 100,000; leave it at 0 and follow `page.nextCursor`. A page above 0 is refused with a 400 because the archive pages by cursor.

≥ 0 · ≤ 100000

cursorstringoptionalquery

Opaque cursor from the previous page's `page.nextCursor`. Omit it for the first page.

max 4096 chars

limitintegeroptionalquery

Rows to return, 1 to 23.

≥ 1 · ≤ 23

Response fields
104

Endpoint-specific response payload.

datalookupStatus
string

Whether the publication was found.

one of: found, not_found, restricted

datarestrictedReason
stringnullable

Why the publication is restricted, when it is.

one of: invite_only, flagged, paid, null

datapublicationId
integernullable

Numeric publication id.

The archive rows on this page.

dataposts[]id
integer

Numeric post id.

dataposts[]publicationId
integernullable

Numeric publication id.

dataposts[]slug
stringnullable

The post's URL slug.

dataposts[]title
stringnullable

The post's title.

dataposts[]subtitle
stringnullable

The post's subtitle.

dataposts[]description
stringnullable

The post's short description.

dataposts[]kind
stringnullable

`newsletter`, `podcast`, `video` or `restack`.

dataposts[]audience
stringnullable

`everyone`, `only_paid`, `only_subscribers` or another value Substack uses.

dataposts[]isPaywalled
booleannullable

Whether the post is paid.

dataposts[]url
stringnullable

Canonical post URL.

dataposts[]publishedAt
stringnullable

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

dataposts[]updatedAt
stringnullable

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

dataposts[]language
stringnullable

The post's language code.

dataposts[]bodyHtml
stringnullable

Full body HTML for a free post; the preview only when `bodyIsPreview` is true.

dataposts[]bodyIsPreview
boolean

True when the audience is not `everyone`.

dataposts[]previewText
stringnullable

The public preview text.

dataposts[]wordCount
integernullable

The post's word count.

dataposts[]commentCount
integernullable

The number of comments on the post.

dataposts[]replyCount
integernullable

Replies to comments on the post.

dataposts[]reactionCount
integernullable

The number of reactions to the post.

dataposts[]reactions
object

Emoji to reaction count.

dataposts[]restackCount
integernullable

The number of restacks.

dataposts[]commentPermission
stringnullable

Who may comment on the post.

dataposts[]coverImageUrl
stringnullable

The post's cover image URL.

dataposts[]coverImageIsSquare
booleannullable

Whether the cover image is square.

dataposts[]coverImageIsExplicit
booleannullable

Whether the cover image is explicit.

dataposts[]isGeoblocked
booleannullable

Whether the post is geoblocked.

Countries where the post is blocked.

dataposts[]blockedCountries[]
stringoptional
dataposts[]liveStreamId
stringnullable

The live stream id, when the post is a live stream.

dataposts[]isPublished
booleannullable

Whether the post is published.

dataposts[]isPinned
booleannullable

Whether the post is pinned.

dataposts[]seoTitle
stringnullable

The title shown to search engines.

dataposts[]seoDescription
stringnullable

The description shown to search engines.

dataposts[]socialTitle
stringnullable

The title used for social previews.

dataposts[]previousSlug
stringnullable

The previous post's slug.

dataposts[]nextSlug
stringnullable

The next post's slug.

The section the post belongs to.

dataposts[]sectionid
integernullable

Numeric section id.

dataposts[]sectionname
stringnullable

The section's name.

dataposts[]sectionslug
stringnullable

The section's URL slug.

The post's tags.

dataposts[]tags[]id
integernullable

Numeric tag id.

dataposts[]tags[]name
stringnullable

The tag's name.

dataposts[]tags[]slug
stringnullable

The tag's URL slug.

dataposts[]tags[]hidden
booleannullable

Whether the tag is hidden.

The post's authors.

dataposts[]authors[]id
integernullable

Numeric user id.

dataposts[]authors[]name
stringnullable

The name shown for the author.

dataposts[]authors[]handle
stringnullable

The author's handle.

dataposts[]authors[]slug
stringnullable

The author's profile slug.

dataposts[]authors[]bio
stringnullable

The author's short biography.

dataposts[]authors[]photoUrl
stringnullable

The author's profile photo URL.

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

dataposts[]authors[]badgetype
stringnullable

The kind of badge, such as `bestseller`.

dataposts[]authors[]badgetier
integernullable

The badge tier, when it has one.

dataposts[]authors[]badgehandle
stringnullable

The handle the badge belongs to.

dataposts[]authors[]badgeservice
stringnullable

The service the badge comes from.

dataposts[]authors[]badgeurl
stringnullable

A link for the badge, when it has one.

dataposts[]authors[]badges
objectnullable

The author's reader status fields, when available.

dataposts[]authors[]bestsellerTier
integernullable

The author's bestseller tier.

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

dataposts[]authors[]primaryPublicationid
integernullable

Numeric publication id.

dataposts[]authors[]primaryPublicationname
stringnullable

The publication's name.

dataposts[]authors[]primaryPublicationsubdomain
stringnullable

The publication's Substack subdomain.

dataposts[]authors[]primaryPublicationcustomDomain
stringnullable

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

dataposts[]authors[]primaryPublicationlogoUrl
stringnullable

The publication's logo URL.

Podcast metadata, when the post is an episode.

dataposts[]podcastepisodeNumber
integernullable

The episode number.

dataposts[]podcastseasonNumber
integernullable

The season number.

dataposts[]podcastepisodeType
stringnullable

The episode type.

Audio, when the post has any.

dataposts[]audiourl
stringnullable

Audio file URL.

dataposts[]audiodurationSeconds
numbernullable

Audio length in seconds.

dataposts[]audiofileSizeBytes
integernullable

Audio file size in bytes.

dataposts[]audiomediaType
stringnullable

The upload's media label, such as `audio`.

dataposts[]audioepisodeImageUrl
stringnullable

Artwork for the episode.

Generated or uploaded audio items.

dataposts[]audioitems[]postId
integernullable

Numeric post id.

dataposts[]audioitems[]voiceId
stringnullable

The voice used for generated audio.

dataposts[]audioitems[]audioUrl
stringnullable

The audio file URL.

dataposts[]audioitems[]type
stringnullable

`tts` or Substack's own audio type.

dataposts[]audioitems[]status
stringnullable

The audio item's status.

Video, when the post has any.

dataposts[]videodurationSeconds
numbernullable

Video length in seconds.

dataposts[]videowidth
integernullable

Video width in pixels.

dataposts[]videoheight
integernullable

Video height in pixels.

dataposts[]videoplaybackId
stringnullable

The playback id of the hosted video stream.

dataposts[]videoisMux
booleannullable

Whether the video uses Substack's hosted player.

Cursor pagination state for a publication archive page.

datapageoffset
integer

The offset sent with this request, 0 on a cursor page.

≥ 0

datapagelimit
integer

The page size requested.

≥ 0

datapagehasMore
boolean

True when `nextCursor` holds another page.

datapagenextOffset
integernullable

Always null. Deeper offsets are no longer served; follow `nextCursor`.

≥ 0

datapagenextCursor
stringnullable

Opaque cursor for the next page; null on the last page.

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/publications/astralcodexten/posts" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Substack posts.