API para X / Twitter: Artigo
Obtenha um artigo longo público do X pela URL do post que o contém, com autor, engajamento, imagem de capa e blocos de conteúdo estruturados.
Preços
Um preço, em dólares
Teste
Faça sua primeira requisição
{
"data": {
"author": {
"avatarUrl": "https://example.com/image.jpg",
"bio": "A short example description of this item.",
"blueVerified": true,
"coverUrl": "https://example.com/page",
"createdUtc": 12.5,
"followers": 12500,
"following": 12500,
"handle": "alex_rivera",
"id": "a1b2c3d4",
"location": "example",
"name": "Example title",
"url": "https://example.com/page",
"verified": true
},
"contentBlocks": [
{
"entities": [
{
"key": 42,
"length": 180,
"offset": 42
}
],
"height": 42,
"image": "https://example.com/image.jpg",
"inlineStyles": [
{
"length": 180,
"offset": 42,
"style": "example"
}
],
"text": "A short example description of this item.",
"type": "general",
"width": 1024
}
],
"coverImage": "https://example.com/image.jpg",
"createdUtc": 12.5,
"id": "a1b2c3d4",
"likes": 12500,
"mediaCount": 12500,
"posts": 248,
"previewText": "A short example description of this item.",
"quotes": 42,
"replies": 42,
"title": "Example title",
"views": 12500
},
"found": true,
"reason": "not_found"
}interface TwitterArticleResponse {
data: {
author: {
avatarUrl?: string;
bio?: string;
blueVerified?: boolean;
coverUrl?: string;
createdUtc?: number;
followers?: number;
following?: number;
handle: string;
id: string;
location?: string;
name?: string;
url: string;
verified?: boolean;
};
contentBlocks: {
entities?: {
key: number;
length: number;
offset: number;
}[];
height?: number;
image?: string;
inlineStyles?: {
length: number;
offset: number;
style: string;
}[];
text?: string;
type: string;
width?: number;
}[];
coverImage?: string;
createdUtc: number;
id: string;
likes?: number;
mediaCount?: number;
posts?: number;
previewText?: string;
quotes?: number;
replies?: number;
title: string;
views?: 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/twitter.article \
-H "Authorization: Bearer $ANYAPI_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://x.com/Decentralisedco/status/1905545699552375179"}'| Campo | Tipo | Valor de exemplo |
|---|---|---|
| Corpo da requisição | ||
| url | string | "https://x.com/Decentralisedco/status/1905545699552375179"URL canônica em x.com ou twitter.com do post público que contém o artigo do X. |
| Resposta | ||
| data | object | Normalized public article, or null when the wrapper post is not an article. |
| data.author | object | Article author profile at retrieval time. Populated whenever the provider has data for the entity. |
| data.author.avatarUrl | string | Profile avatar image URL. |
| data.author.bio | string | Profile biography. |
| data.author.blueVerified | boolean | Whether the account has X blue verification. |
| data.author.coverUrl | string | Profile cover image URL when available. |
| data.author.createdUtc | number | UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds. |
| data.author.followers | integer | Follower count at retrieval time. |
| data.author.following | integer | Following count at retrieval time. |
| data.author.handle | string | Current X handle without @. Populated whenever the provider has data for the entity. |
| data.author.id | string | Stable numeric X user ID. Populated whenever the provider has data for the entity. |
| data.author.location | string | Self-reported profile location. |
| data.author.name | string | Profile display name. |
| data.author.url | string | Canonical public X profile URL. Populated whenever the provider has data for the entity. |
| data.author.verified | boolean | Whether the account has legacy verification. |
| data.contentBlocks | object[] | Ordered, explicitly normalized article blocks. Unknown future block types remain representable through type and optional fields. Populated whenever the provider has data for the entity. |
| data.contentBlocks[].entities | object[] | Entity references within the block text. |
| data.contentBlocks[].entities[].key | integer | Upstream entity table key. |
| data.contentBlocks[].entities[].length | integer | Entity character length. |
| data.contentBlocks[].entities[].offset | integer | Zero-based character offset. |
| data.contentBlocks[].height | integer | Image height in pixels when supplied. |
| data.contentBlocks[].image | string | Canonical image URL for an image block. |
| data.contentBlocks[].inlineStyles | object[] | Formatting ranges within the block text. |
| data.contentBlocks[].inlineStyles[].length | integer | Formatted character length. |
| data.contentBlocks[].inlineStyles[].offset | integer | Zero-based character offset. |
| data.contentBlocks[].inlineStyles[].style | string | Inline style name reported by X. |
| data.contentBlocks[].text | string | Text content for a text-bearing block. |
| data.contentBlocks[].type | string | Block type reported by X, such as unstyled, header-two, image, divider, blockquote, or list item. Populated whenever the provider has data for the entity. |
| data.contentBlocks[].width | integer | Image width in pixels when supplied. |
| data.coverImage | string | Canonical article cover image URL when available. |
| data.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.id | string | Stable X Article entity ID. Populated whenever the provider has data for the entity. |
| data.likes | integer | Wrapper post like count at retrieval time. |
| data.mediaCount | integer | Number of media items the author has published. |
| data.posts | integer | Number of posts the author has published. |
| data.previewText | string | Preview text supplied by X. |
| data.quotes | integer | Wrapper post quote count at retrieval time. |
| data.replies | integer | Wrapper post reply count at retrieval time. |
| data.title | string | Article title. Populated whenever the provider has data for the entity. |
| data.views | integer | Wrapper post view count at retrieval time. |
| found | boolean | True when the wrapper post contains a public X Article. |
| 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 | USD | US$ 0,00075 |
| Preço /mil req. | USD | US$ 0,75 |
Dúvidas frequentes
Sobre o endpoint Artigo da API para X / Twitter
O endpoint Artigo da AnyAPI para X / Twitter retorna dados de X / Twitter em JSON normalizado com uma chamada POST para /v1/run/twitter.article. Obtenha um artigo longo público do X pela URL do post que o contém, com autor, engajamento, imagem de capa e blocos de conteúdo estruturados. A AnyAPI retorna um schema normalizado, seja qual for a fonte que atende. Custa a partir de US$ 0,75 por mil requisições, em dólares, sem assinatura e sem mínimo mensal. Nos últimos 30 dias, 99,5% das chamadas ao endpoint Artigo da API para X / Twitter feitas pela AnyAPI tiveram sucesso, com tempo de resposta mediano de 1,9 segundos, em 417 chamadas medidas.