Substack

List Substack publication post index

List every post URL in a Substack publication sitemap.

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

API key (`sfk_...`)

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

Response fields
21

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.

datahasSitemap
boolean

False when the publication does not publish a sitemap.

Only `/p/{slug}` post URLs.

dataposts[]url
string

The URL from the sitemap.

dataposts[]kind
string

`post` for a `/p/{slug}` URL; `page` for any other page.

one of: post, page

dataposts[]slug
stringnullable

The post slug, for a post URL.

dataposts[]lastModified
stringnullable

The last change the sitemap reports.

dataposts[]changeFrequency
stringnullable

The change frequency the sitemap reports.

Sitemap URLs that are not posts, such as `/archive` and `/about`.

datapages[]url
string

The URL from the sitemap.

datapages[]kind
string

`post` for a `/p/{slug}` URL; `page` for any other page.

one of: post, page

datapages[]slug
stringnullable

The post slug, for a post URL.

datapages[]lastModified
stringnullable

The last change the sitemap reports.

datapages[]changeFrequency
stringnullable

The change frequency the sitemap reports.

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

Responses

Substack post index.