Substack

Search Substack publication posts

Search the posts inside a Substack publication.

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

API key (`sfk_...`)

Parameters
3
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

querystringrequiredquery

Text to search for inside the publication.

min 1 chars · max 200 chars

pageintegeroptionalquery

Page number, 0 to 20; ten results a page.

≥ 0 · ≤ 20

Response fields
229

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.

dataquery
string

The query that was searched.

Matching posts with highlighted snippets.

The matching post.

dataresults[]postid
integer

Numeric post id.

dataresults[]postpublicationId
integernullable

Numeric publication id.

dataresults[]postslug
stringnullable

The post's URL slug.

dataresults[]posttitle
stringnullable

The post's title.

dataresults[]postsubtitle
stringnullable

The post's subtitle.

dataresults[]postdescription
stringnullable

The post's short description.

dataresults[]postkind
stringnullable

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

dataresults[]postaudience
stringnullable

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

dataresults[]postisPaywalled
booleannullable

Whether the post is paid.

dataresults[]posturl
stringnullable

Canonical post URL.

dataresults[]postpublishedAt
stringnullable

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

dataresults[]postupdatedAt
stringnullable

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

dataresults[]postlanguage
stringnullable

The post's language code.

dataresults[]postbodyHtml
stringnullable

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

dataresults[]postbodyIsPreview
boolean

True when the audience is not `everyone`.

dataresults[]postpreviewText
stringnullable

The public preview text.

dataresults[]postwordCount
integernullable

The post's word count.

dataresults[]postcommentCount
integernullable

The number of comments on the post.

dataresults[]postreplyCount
integernullable

Replies to comments on the post.

dataresults[]postreactionCount
integernullable

The number of reactions to the post.

dataresults[]postreactions
object

Emoji to reaction count.

dataresults[]postrestackCount
integernullable

The number of restacks.

dataresults[]postcommentPermission
stringnullable

Who may comment on the post.

dataresults[]postcoverImageUrl
stringnullable

The post's cover image URL.

dataresults[]postcoverImageIsSquare
booleannullable

Whether the cover image is square.

dataresults[]postcoverImageIsExplicit
booleannullable

Whether the cover image is explicit.

dataresults[]postisGeoblocked
booleannullable

Whether the post is geoblocked.

Countries where the post is blocked.

dataresults[]postblockedCountries[]
stringoptional
dataresults[]postliveStreamId
stringnullable

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

dataresults[]postisPublished
booleannullable

Whether the post is published.

dataresults[]postisPinned
booleannullable

Whether the post is pinned.

dataresults[]postseoTitle
stringnullable

The title shown to search engines.

dataresults[]postseoDescription
stringnullable

The description shown to search engines.

dataresults[]postsocialTitle
stringnullable

The title used for social previews.

dataresults[]postpreviousSlug
stringnullable

The previous post's slug.

dataresults[]postnextSlug
stringnullable

The next post's slug.

The section the post belongs to.

dataresults[]postsectionid
integernullable

Numeric section id.

dataresults[]postsectionname
stringnullable

The section's name.

dataresults[]postsectionslug
stringnullable

The section's URL slug.

The post's tags.

dataresults[]posttags[]id
integernullable

Numeric tag id.

dataresults[]posttags[]name
stringnullable

The tag's name.

dataresults[]posttags[]slug
stringnullable

The tag's URL slug.

dataresults[]posttags[]hidden
booleannullable

Whether the tag is hidden.

The post's authors.

dataresults[]postauthors[]id
integernullable

Numeric user id.

dataresults[]postauthors[]name
stringnullable

The name shown for the author.

dataresults[]postauthors[]handle
stringnullable

The author's handle.

dataresults[]postauthors[]slug
stringnullable

The author's profile slug.

dataresults[]postauthors[]bio
stringnullable

The author's short biography.

dataresults[]postauthors[]photoUrl
stringnullable

The author's profile photo URL.

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

dataresults[]postauthors[]badgetype
stringnullable

The kind of badge, such as `bestseller`.

dataresults[]postauthors[]badgetier
integernullable

The badge tier, when it has one.

dataresults[]postauthors[]badgehandle
stringnullable

The handle the badge belongs to.

dataresults[]postauthors[]badgeservice
stringnullable

The service the badge comes from.

dataresults[]postauthors[]badgeurl
stringnullable

A link for the badge, when it has one.

dataresults[]postauthors[]badges
objectnullable

The author's reader status fields, when available.

dataresults[]postauthors[]bestsellerTier
integernullable

The author's bestseller tier.

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

dataresults[]postauthors[]primaryPublicationid
integernullable

Numeric publication id.

dataresults[]postauthors[]primaryPublicationname
stringnullable

The publication's name.

dataresults[]postauthors[]primaryPublicationsubdomain
stringnullable

The publication's Substack subdomain.

dataresults[]postauthors[]primaryPublicationcustomDomain
stringnullable

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

dataresults[]postauthors[]primaryPublicationlogoUrl
stringnullable

The publication's logo URL.

Podcast metadata, when the post is an episode.

dataresults[]postpodcastepisodeNumber
integernullable

The episode number.

dataresults[]postpodcastseasonNumber
integernullable

The season number.

dataresults[]postpodcastepisodeType
stringnullable

The episode type.

Audio, when the post has any.

dataresults[]postaudiourl
stringnullable

Audio file URL.

dataresults[]postaudiodurationSeconds
numbernullable

Audio length in seconds.

dataresults[]postaudiofileSizeBytes
integernullable

Audio file size in bytes.

dataresults[]postaudiomediaType
stringnullable

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

dataresults[]postaudioepisodeImageUrl
stringnullable

Artwork for the episode.

Generated or uploaded audio items.

dataresults[]postaudioitems[]postId
integernullable

Numeric post id.

dataresults[]postaudioitems[]voiceId
stringnullable

The voice used for generated audio.

dataresults[]postaudioitems[]audioUrl
stringnullable

The audio file URL.

dataresults[]postaudioitems[]type
stringnullable

`tts` or Substack's own audio type.

dataresults[]postaudioitems[]status
stringnullable

The audio item's status.

Video, when the post has any.

dataresults[]postvideodurationSeconds
numbernullable

Video length in seconds.

dataresults[]postvideowidth
integernullable

Video width in pixels.

dataresults[]postvideoheight
integernullable

Video height in pixels.

dataresults[]postvideoplaybackId
stringnullable

The playback id of the hosted video stream.

dataresults[]postvideoisMux
booleannullable

Whether the video uses Substack's hosted player.

The highlighted snippets for the match.

The runs that make up the snippet.

dataresults[]highlights[]segments[]text
string

The run of text.

dataresults[]highlights[]segments[]isHighlighted
booleannullable

True when this run matched the query.

Publications involved in the results.

datapublications[]id
integer

Numeric publication id.

datapublications[]name
stringnullable

The publication's name.

datapublications[]subdomain
stringnullable

The publication's Substack subdomain.

datapublications[]customDomain
stringnullable

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

datapublications[]apexDomain
stringnullable

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

datapublications[]url
stringnullable

The publication's canonical base URL.

datapublications[]host
stringnullable

The host its pages are served from.

datapublications[]description
stringnullable

The publication's description.

datapublications[]language
stringnullable

The publication's language code.

datapublications[]kind
stringnullable

`newsletter`, `podcast` or Substack's own type.

datapublications[]createdAt
stringnullable

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

datapublications[]firstPostAt
stringnullable

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

datapublications[]hasPosts
booleannullable

Whether the publication has posts.

datapublications[]isExplicit
booleannullable

Whether the publication is marked explicit.

datapublications[]isInviteOnly
booleannullable

Whether the publication is invite-only.

datapublications[]isFlagged
booleannullable

Whether the publication is flagged.

datapublications[]noIndex
booleannullable

Whether search engines are asked not to index it.

datapublications[]isOnSubstack
booleannullable

Whether the publication is hosted by Substack.

datapublications[]commentsEnabled
booleannullable

Whether comments are enabled.

datapublications[]notesEnabled
booleannullable

Whether Notes are enabled.

datapublications[]defaultCommentSort
stringnullable

The default comment order.

datapublications[]annualDisabled
booleannullable

Whether annual plans are disabled.

datapublications[]monthlyDisabled
booleannullable

Whether monthly plans are disabled.

datapublications[]paymentsState
stringnullable

The publication's payments state.

datapublications[]freeTrialEnabled
booleannullable

Whether a free trial is offered.

datapublications[]pausedUntil
stringnullable

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

datapublications[]emailBannerUrl
stringnullable

The email banner image URL.

datapublications[]copyright
stringnullable

The copyright line the publication prints.

datapublications[]logoUrl
stringnullable

The publication's logo URL.

datapublications[]wideLogoUrl
stringnullable

The publication's wide logo URL.

datapublications[]coverImageUrl
stringnullable

The publication's cover image URL.

datapublications[]foundingPlanName
stringnullable

The name of the founding-member plan.

datapublications[]hasRecommendations
booleannullable

Whether the publication recommends others.

The benefit lists for each subscription tier.

Benefits for free subscribers.

datapublications[]benefitsfree[]
stringoptional

Benefits for paid subscribers.

datapublications[]benefitspaid[]
stringoptional

Benefits for founding members.

datapublications[]benefitsfounding[]
stringoptional

The publication's main author.

datapublications[]authorid
integernullable

Numeric user id.

datapublications[]authorname
stringnullable

The name shown for the author.

datapublications[]authorhandle
stringnullable

The author's handle.

datapublications[]authorslug
stringnullable

The author's profile slug.

datapublications[]authorbio
stringnullable

The author's short biography.

datapublications[]authorphotoUrl
stringnullable

The author's profile photo URL.

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

datapublications[]authorbadgetype
stringnullable

The kind of badge, such as `bestseller`.

datapublications[]authorbadgetier
integernullable

The badge tier, when it has one.

datapublications[]authorbadgehandle
stringnullable

The handle the badge belongs to.

datapublications[]authorbadgeservice
stringnullable

The service the badge comes from.

datapublications[]authorbadgeurl
stringnullable

A link for the badge, when it has one.

datapublications[]authorbadges
objectnullable

The author's reader status fields, when available.

datapublications[]authorbestsellerTier
integernullable

The author's bestseller tier.

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

datapublications[]authorprimaryPublicationid
integernullable

Numeric publication id.

datapublications[]authorprimaryPublicationname
stringnullable

The publication's name.

datapublications[]authorprimaryPublicationsubdomain
stringnullable

The publication's Substack subdomain.

datapublications[]authorprimaryPublicationcustomDomain
stringnullable

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

datapublications[]authorprimaryPublicationlogoUrl
stringnullable

The publication's logo URL.

Approximate audience figures the publication prints. These are bands, not counts.

datapublications[]audiencepaidLabel
stringnullable

The band Substack displays for paid subscribers.

datapublications[]audiencepaidOrderOfMagnitude
integernullable

The order of magnitude behind the paid band.

datapublications[]audiencetotalLabel
stringnullable

The band Substack displays for all subscribers.

datapublications[]audiencetotalOrderOfMagnitude
integernullable

The order of magnitude behind the total band.

datapublications[]audiencefreeLabel
stringnullable

The band Substack displays for free subscribers.

datapublications[]audiencefreeShort
stringnullable

The short free-subscriber band.

datapublications[]audiencechatMembersLabel
stringnullable

The band Substack displays for chat members.

People with a byline on the publication.

datapublications[]contributors[]id
integernullable

Numeric user id.

datapublications[]contributors[]name
stringnullable

The contributor's name.

datapublications[]contributors[]handle
stringnullable

The contributor's handle.

datapublications[]contributors[]role
stringnullable

The contributor's role on the publication.

datapublications[]contributors[]owner
booleannullable

Whether the contributor owns the publication.

datapublications[]contributors[]photoUrl
stringnullable

The contributor's photo URL.

datapublications[]contributors[]bio
stringnullable

The contributor's short biography.

The contributor's badge.

datapublications[]contributors[]badgetype
stringnullable

The kind of badge, such as `bestseller`.

datapublications[]contributors[]badgetier
integernullable

The badge tier, when it has one.

datapublications[]contributors[]badgehandle
stringnullable

The handle the badge belongs to.

datapublications[]contributors[]badgeservice
stringnullable

The service the badge comes from.

datapublications[]contributors[]badgeurl
stringnullable

A link for the badge, when it has one.

datapublications[]contributors[]bestsellerTier
integernullable

The contributor's bestseller tier.

The publication's sections.

datapublications[]sections[]id
integernullable

Numeric section id.

datapublications[]sections[]name
stringnullable

The section's name.

datapublications[]sections[]description
stringnullable

The section's description.

datapublications[]sections[]slug
stringnullable

The section's URL slug.

datapublications[]sections[]isPodcast
booleannullable

Whether the section is a podcast.

datapublications[]sections[]isLive
booleannullable

Whether the section is a live stream.

datapublications[]sections[]isDefaultOn
booleannullable

Whether the section is on by default.

datapublications[]sections[]logoUrl
stringnullable

The section's logo URL.

datapublications[]sections[]coverImageUrl
stringnullable

The section's cover image URL.

datapublications[]sections[]hideFromNavbar
booleannullable

Whether the section is hidden from navigation.

datapublications[]sections[]hidePostsFromPubListings
booleannullable

Whether the section's posts are hidden from publication lists.

Links the publication shows.

datapublications[]links[]id
integernullable

Numeric link id.

datapublications[]links[]url
string

The link.

datapublications[]links[]platform
stringnullable

`apple_podcasts`, `spotify`, `youtube` or another label Substack uses.

datapublications[]links[]sectionId
integernullable

The section the link belongs to, when it has one.

The subscription plans the publication offers.

datapublications[]plans[]id
stringnullable

The plan's id.

datapublications[]plans[]nickname
stringnullable

The plan's display name.

datapublications[]plans[]amount
integernullable

Price in the currency's minor unit.

datapublications[]plans[]currency
stringnullable

Currency code for the price.

datapublications[]plans[]interval
stringnullable

`month`, `year` or Substack's own value.

datapublications[]plans[]intervalCount
integernullable

How many intervals one charge covers.

datapublications[]plans[]active
booleannullable

Whether the plan is on sale.

datapublications[]plans[]founding
boolean

Whether this is a founding-member plan.

The publication's podcast, when it has one.

datapublications[]podcastexists
booleannullable

Whether the publication has a podcast.

datapublications[]podcasthasFreeEpisodes
booleannullable

Whether free episodes are available.

datapublications[]podcasthasPaidEpisodes
booleannullable

Whether paid episodes are available.

datapublications[]podcastartUrl
stringnullable

The podcast artwork URL.

datapublications[]podcastbyline
stringnullable

The podcast byline.

datapublications[]podcastdescription
stringnullable

The podcast description.

datapublications[]podcastfeedUrl
stringnullable

The podcast feed URL.

datapublications[]podcasttitle
stringnullable

The podcast title.

datapublications[]podcastpaidEpisodeArtUrl
stringnullable

Artwork for paid episodes.

Page-number pagination state for the current page.

datapagepage
integer

Current page (0-based).

≥ 0

datapagehasMore
boolean

True when another page exists.

datapagenextPage
integernullable

The next page number; null on the last page.

≥ 0

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/search?query=climate" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Substack search posts.