API para Substack: Posts
Colete posts de qualquer publicação do Substack pela URL dela, ou passe a URL de um único post (…/p/slug) para obter só aquele artigo. Retorna título, subtítulo, data de publicação, status de paywall, contagem de palavras, engajamento (reações, comentários, restacks), perfil do autor, detalhes da publicação, o corpo completo do artigo em texto, HTML e Markdown, e threads de comentários opcionais.
Teste
Faça sua primeira requisição
{
"data": {
"items": [
{
"authorBio": "Alex Rivera",
"authorHandle": "alex_rivera",
"authorImage": "https://example.com/image.jpg",
"authorName": "Alex Rivera",
"authorUrl": "https://example.com/page",
"commentCount": 12500,
"comments": [
{
"authorHandle": "alex_rivera",
"authorImage": "https://example.com/image.jpg",
"authorName": "Alex Rivera",
"authorUrl": "https://example.com/page",
"commentId": "a1b2c3d4",
"createdUtc": 12.5,
"editedUtc": 12.5,
"isAuthor": true,
"isPinned": true,
"reactionCount": 12500,
"replies": [
null
],
"restackCount": 12500,
"text": "A short example description of this item."
}
],
"contentStatus": "A short example description of this item.",
"createdUtc": 12.5,
"description": "A short example description of this item.",
"hasVoiceover": true,
"html": "example",
"image": "https://example.com/image.jpg",
"isPaid": true,
"language": "en",
"markdown": "example",
"podcastUrl": "https://example.com/page",
"postId": "a1b2c3d4",
"postType": "general",
"publication": {
"customDomain": "example.com",
"description": "A short example description of this item.",
"id": "a1b2c3d4",
"image": "https://example.com/image.jpg",
"language": "en",
"name": "Example title",
"paymentsEnabled": true,
"subdomain": "example.com",
"subscriberCount": 12500,
"url": "https://example.com/page"
},
"reactionCount": 12500,
"replyCount": 12500,
"restackCount": 12500,
"slug": "alex_rivera",
"subtitle": "Example title",
"text": "A short example description of this item.",
"title": "Example title",
"updatedUtc": 12.5,
"url": "https://example.com/page",
"wordcount": 12500
}
]
},
"found": true,
"reason": "not_found"
}interface SubstackPostsResponse {
data: {
items: {
authorBio?: string;
authorHandle?: string;
authorImage?: string;
authorName?: string;
authorUrl?: string;
commentCount?: number;
comments?: {
authorHandle?: string;
authorImage?: string;
authorName?: string;
authorUrl?: string;
commentId: string;
createdUtc?: number;
editedUtc?: number;
isAuthor?: boolean;
isPinned?: boolean;
reactionCount?: number;
replies?: {
authorHandle?: string;
authorImage?: string;
authorName?: string;
authorUrl?: string;
commentId: string;
createdUtc?: number;
editedUtc?: number;
isAuthor?: boolean;
isPinned?: boolean;
reactionCount?: number;
restackCount?: number;
text?: string;
}[];
restackCount?: number;
text?: string;
}[];
contentStatus?: string;
createdUtc?: number;
description?: string;
hasVoiceover?: boolean;
html?: string;
image?: string;
isPaid?: boolean;
language?: string;
markdown?: string;
podcastUrl?: string;
postId?: string;
postType?: string;
publication?: {
customDomain?: string;
description?: string;
id?: string;
image?: string;
language?: string;
name?: string;
paymentsEnabled?: boolean;
subdomain?: string;
subscriberCount?: number;
url?: string;
};
reactionCount?: number;
replyCount?: number;
restackCount?: number;
slug?: string;
subtitle?: string;
text?: string;
title: string;
updatedUtc?: number;
url: string;
wordcount?: number;
}[];
} | null;
found: boolean;
reason?: "not_found";
}Referência completa de parâmetros e resposta - todos os campos, tipos e exemplos deste endpoint.
Referência
Requisição, resposta e preço
Última verificação em 2026-09-29 · disponibilidade e latência medidas em 30dcurl -X POST https://api.getanyapi.com/v1/run/substack.posts \
-H "Authorization: Bearer $ANYAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"limit":3,"url":"https://www.astralcodexten.com"}'| Campo | Tipo | Valor de exemplo |
|---|---|---|
| Corpo da requisição | ||
| url | string | "https://www.astralcodexten.com"A URL ou o domínio próprio de uma publicação do Substack, para obter seus posts recentes (ex.: https://www.astralcodexten.com), OU a URL de um único post, para obter só aquele artigo com o conteúdo completo (ex.: https://www.astralcodexten.com/p/your-book-review). |
| contentType | enum | Restringe a um único tipo de post, ou 'all' (ex.: newsletter). |
| endDate | string | Retorna apenas posts publicados nesta data ou antes dela, no formato YYYY-MM-DD (ex.: 2024-12-31). Aplicado dentro dos 'limit' posts mais recentes analisados. |
| includeComments | boolean | Inclui as threads de comentários públicos e suas respostas diretas em cada post (ex.: true). |
| includeContent | boolean | Inclui o corpo completo do artigo em texto, HTML e Markdown. Defina como false para obter só metadados, o que é mais rápido (ex.: false). |
| limit | integer | 3Número máximo de posts recentes a retornar quando for informada a URL de uma publicação (1-100, padrão 25); ignorado para a URL de um único post, que sempre retorna aquele post. A cobrança é por post retornado, então um limite menor custa menos. |
| maxComments | integer | Máximo de comentários coletados por post quando 'includeComments' for true (0-500, padrão 20). Não custa nada a mais (ex.: 50). |
| minComments | integer | Retorna apenas posts com pelo menos este número de comentários (ex.: 10). |
| minReactions | integer | Retorna apenas posts com pelo menos este número de reações (ex.: 100). |
| minWordCount | integer | Retorna apenas posts com pelo menos este número de palavras, o que filtra notas curtas e anúncios (ex.: 1000). |
| onlyFree | boolean | Retorna apenas posts gratuitos (sem paywall) (ex.: true). |
| startDate | string | Retorna apenas posts publicados nesta data ou depois dela, no formato YYYY-MM-DD (ex.: 2024-01-01). Aplicado dentro dos 'limit' posts mais recentes analisados, então aumente 'limit' para alcançar períodos mais antigos. |
| Resposta | ||
| data | object | Result payload, or null when nothing was found. |
| data.items | object[] | Post records: title, subtitle, URL, publish date, paywall status, word count, engagement (reactions, comments, restacks), author profile, publication details, the article body as text, HTML and Markdown, and comment threads when requested. Populated whenever the provider has data for the entity. |
| data.items[].authorBio | string | Author bio as shown on their Substack profile. |
| data.items[].authorHandle | string | Substack handle of the post author. Populated whenever the provider has data for the entity. |
| data.items[].authorImage | string | Profile photo URL of the post author. |
| data.items[].authorName | string | Display name of the post author. Populated whenever the provider has data for the entity. |
| data.items[].authorUrl | string | Substack profile URL of the post author. |
| data.items[].commentCount | integer | Number of top-level comments on the post. |
| data.items[].comments | object[] | Top-level comment threads on the post, each with its direct replies. Empty unless 'includeComments' is true. Replies nested more than one level deep are not returned. |
| data.items[].comments[].authorHandle | string | Substack handle of the comment author. |
| data.items[].comments[].authorImage | string | Profile photo URL of the comment author. |
| data.items[].comments[].authorName | string | Display name of the comment author. |
| data.items[].comments[].authorUrl | string | Substack profile URL of the comment author. |
| data.items[].comments[].commentId | string | Substack comment identifier. |
| data.items[].comments[].createdUtc | number | UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. |
| data.items[].comments[].editedUtc | number | UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. |
| data.items[].comments[].isAuthor | boolean | Whether the comment was written by the post author. |
| data.items[].comments[].isPinned | boolean | Whether the comment is pinned by the publication. |
| data.items[].comments[].reactionCount | integer | Number of reactions on the comment. |
| data.items[].comments[].replies | object[] | Direct replies to this comment. |
| data.items[].comments[].replies[].authorHandle | string | Substack handle of the reply author. |
| data.items[].comments[].replies[].authorImage | string | Profile photo URL of the reply author. |
| data.items[].comments[].replies[].authorName | string | Display name of the reply author. |
| data.items[].comments[].replies[].authorUrl | string | Substack profile URL of the reply author. |
| data.items[].comments[].replies[].commentId | string | Substack comment identifier. |
| data.items[].comments[].replies[].createdUtc | number | UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. |
| data.items[].comments[].replies[].editedUtc | number | UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. |
| data.items[].comments[].replies[].isAuthor | boolean | Whether the reply was written by the post author. |
| data.items[].comments[].replies[].isPinned | boolean | Whether the reply is pinned by the publication. |
| data.items[].comments[].replies[].reactionCount | integer | Number of reactions on the reply. |
| data.items[].comments[].replies[].restackCount | integer | Number of times the reply was restacked. |
| data.items[].comments[].replies[].text | string | Reply body text. |
| data.items[].comments[].restackCount | integer | Number of times the comment was restacked. |
| data.items[].comments[].text | string | Comment body text. |
| data.items[].contentStatus | string | How much of the article body this record carries: 'full' for the whole article, 'preview_only' for the public excerpt of a paywalled post, 'metadata_only' when no body was requested or available, or 'failed' when extraction failed. Read this before trusting 'text', 'html', or 'markdown'. Populated whenever the provider has data for the entity. |
| data.items[].createdUtc | number | UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. Populated whenever the provider has data for the entity. |
| data.items[].description | string | Short post description, usually the subtitle or an excerpt. |
| data.items[].hasVoiceover | boolean | Whether the post carries a narrated audio version. |
| data.items[].html | string | Article body as HTML. Present when 'includeContent' is true and 'contentStatus' is 'full' or 'preview_only'. |
| data.items[].image | string | Cover image URL. |
| data.items[].isPaid | boolean | Whether the post is behind a paywall. |
| data.items[].language | string | Two-letter language code of the post. |
| data.items[].markdown | string | Article body as Markdown. Present when 'includeContent' is true and 'contentStatus' is 'full' or 'preview_only'. |
| data.items[].podcastUrl | string | Audio URL for a podcast post or a narrated voiceover, when the post has one. |
| data.items[].postId | string | Substack post identifier. Populated whenever the provider has data for the entity. |
| data.items[].postType | string | Post type (newsletter, podcast, or thread). Populated whenever the provider has data for the entity. |
| data.items[].publication | object | The publication the post belongs to. |
| data.items[].publication.customDomain | string | Custom domain the publication is served on, when it has one. |
| data.items[].publication.description | string | Publication tagline or hero text. |
| data.items[].publication.id | string | Substack publication identifier. |
| data.items[].publication.image | string | Publication logo URL. |
| data.items[].publication.language | string | Two-letter language code of the publication. |
| data.items[].publication.name | string | Publication name. |
| data.items[].publication.paymentsEnabled | boolean | Whether the publication sells paid subscriptions. |
| data.items[].publication.subdomain | string | Publication subdomain on substack.com. |
| data.items[].publication.subscriberCount | integer | Subscriber count, when the publication publishes it. |
| data.items[].publication.url | string | Publication home URL. |
| data.items[].reactionCount | integer | Number of reactions (likes) on the post. |
| data.items[].replyCount | integer | Number of replies to comments on the post. |
| data.items[].restackCount | integer | Number of times the post was restacked. |
| data.items[].slug | string | Post slug, the last path segment of the post URL. Populated whenever the provider has data for the entity. |
| data.items[].subtitle | string | Post subtitle or deck. |
| data.items[].text | string | Article body as plain text. Present when 'includeContent' is true and 'contentStatus' is 'full' or 'preview_only'. |
| data.items[].title | string | Post title. Populated whenever the provider has data for the entity. |
| data.items[].updatedUtc | number | UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. |
| data.items[].url | string | Canonical post URL. Populated whenever the provider has data for the entity. |
| data.items[].wordcount | integer | Approximate word count of the article. |
| found | boolean | Whether any posts were found for the request. |
| reason | "not_found" | Present only when `found` is false, and says why there is no result. `not_found`: the source states the target does not exist, or returned nothing for it. A `found: false` answer is a successful call, not an error, and `costUsd` is what it actually cost. |
| Preço | ||
| Preço por requisição (teto) | USD | US$ 0,0444 |
| Preço /mil resultados | USD | US$ 0,439604 |
Dúvidas frequentes
Sobre o endpoint Posts da API para Substack
O endpoint Posts da AnyAPI para Substack retorna dados de Substack em JSON normalizado com uma chamada POST para /v1/run/substack.posts. Colete posts de qualquer publicação do Substack pela URL dela, ou passe a URL de um único post (…/p/slug) para obter só aquele artigo. Retorna título, subtítulo, data de publicação, status de paywall, contagem de palavras, engajamento (reações, comentários, restacks), perfil do autor, detalhes da publicação, o corpo completo do artigo em texto, HTML e Markdown, e threads de comentários opcionais. A AnyAPI retorna um schema normalizado, seja qual for a fonte que atende. Custa US$ 0,44 por mil resultados, e nunca mais de US$ 0,0444 por requisição, em dólares, sem assinatura e sem mínimo mensal. Nos últimos 30 dias, 100,0% das chamadas ao endpoint Posts da API para Substack feitas pela AnyAPI tiveram sucesso, com tempo de resposta mediano de 3,4 segundos, em 10 chamadas medidas.