API para X / Twitter

API para X / Twitter: Tweet

Detalhes completos de um único tweet pela URL: texto, ID do autor e contagens de engajamento (curtidas, retweets, respostas, citações, itens salvos, visualizações).

US$ 0,22/mil req., pague por requisição, sem assinatura.

Post
x.com/NASA/status/1800000000000000000

Post

N

NASA

@NASA

Liftoff! 🚀

1:45 PM · Jun 9, 2024 · 9.4M Views

3,90021.4K142K8,600
O que a API retornou
{
"id": "1800000000000000000",
"text": "Liftoff! 🚀",
"authorId": "11348282",
"likes": 142000,
"retweets": 21400,
"replies": 3900,
"quotes": 1200,
"bookmarks": 8600,
... 10 campos a mais
}
Disponibilidade
100,00%
30d · 422.255 chamadas
Requisições
423.169
30d · semanal, últimas 12 sem.
Resposta
1,3s
mediana · 30d

Preços e provedores

Preços do endpoint Tweet da API para X / Twitter: uma API, 4 provedores intercambiáveis

O provedor mais barato atende primeiro. Se ele falhar, o próximo assume na mesma chamada.

Você paga
US$ 2,20
US$ 0,22/mil req., só pelo que você usar. Sem plano mensal.
Suas primeiras 454 requisições são grátis com o saldo inicial de US$ 0,10.

Teste

Obtenha Tweet do X / Twitter em uma só requisição

requireFieldsarray
Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `videoUrl` or `width`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a tweet that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge.
Abrir em
Obter chave grátis
Resposta de exemplo
Execuções grátis retornam só os primeiros 3 resultados. Recarregue uma chave para receber a resposta completa.

Este exemplo mostra 12 de 26 campos. Ver todos os campos

{
  "found": true,
  "data": {
    "id": "1800000000000000000",
    "text": "Liftoff! 🚀",
    "authorId": "11348282",
    "likes": 142000,
    "retweets": 21400,
    "replies": 3900,
    "quotes": 1200,
    "bookmarks": 8600,
    "views": 9400000,
    "createdUtc": 1717940700
  }
}

Referência completa de parâmetros e resposta - todos os campos, tipos e exemplos deste endpoint.

Referência

Uma requisição, um formato de resposta.

Cada campo que você envia e cada campo que você recebe, cada um com um exemplo real.

Última verificação em 2026-11-14 · disponibilidade e latência medidas em 30d

Corpo da requisição

JSON, enviado via POST para este endpoint.

  • urlstring

    https://x.com/NASA/status/1800000000000000000

    URL de status canônica em x.com ou twitter.com com um ID numérico de tweet, incluindo as variantes /i/web/status e de compartilhamento de mídia.

  • requireFieldsarray

    Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `videoUrl` or `width`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a tweet that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge.

Você envia. Um corpo JSON pequeno. Os valores mostrados são exemplos para você trocar pelos seus.

Resposta

JSON, um valor de exemplo por campo.

datadata
  • authorHandlestring

    Handle of the account that posted.

  • authorIdstring

    11348282

    Populated whenever the provider has data for the entity.

  • authorImagestring

    Avatar image URL of the account that posted.

  • authorNamestring

    Display name of the account that posted.

  • authorVerifiedboolean

    Whether the posting account carries an X blue verification badge.

  • bookmarksinteger

    8600

  • conversationIdstring

    Id of the conversation the post belongs to, as a string.

  • createdUtcnumber

    1717940700

    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.

  • idstring

    1800000000000000000

    Populated whenever the provider has data for the entity.

  • inReplyToIdstring

    Id of the post this post directly replies to, as a string, or null when the post is not a reply.

  • langstring

    Two-letter language code X detected for the post.

  • likesinteger

    142000

  • quotesinteger

    1200

  • repliesinteger

    3900

  • retweetsinteger

    21400

  • textstring

    Liftoff! 🚀

    Populated whenever the provider has data for the entity.

  • viewsinteger

    9400000

    View count, or null when X does not report one for this tweet. Distinct from 0, which means the tweet has no views.

each mediadata.media[]

Photo, video, and GIF attachments on the post. Empty when the post has none.

  • heightintegerpode ser exigido

    Pixel height of the media item, when the lane reports it.

  • typestring

    One of photo, video, or gif.

  • urlstring

    Image URL. For a video or GIF this is the poster/thumbnail frame. X media URLs on pbs.twimg.com are publicly fetchable without authentication; append ?name=orig for the full-resolution original.

  • videoUrlstringpode ser exigido

    Playable video file URL. Present only for video and gif items.

  • widthintegerpode ser exigido

    Pixel width of the media item, when the lane reports it.

top level
  • foundboolean

    true

  • 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.

Você recebe. Campos nomeados e tipados, no mesmo formato, seja qual for a fonte que responder.

Dúvidas frequentes

Sobre o endpoint Tweet da API para X / Twitter

O endpoint Tweet da AnyAPI para X / Twitter retorna dados de X / Twitter em JSON normalizado com uma chamada POST para /v1/run/twitter.tweet. Detalhes completos de um único tweet pela URL: texto, ID do autor e contagens de engajamento (curtidas, retweets, respostas, citações, itens salvos, visualizações). A AnyAPI distribui cada requisição entre 4 fontes, com failover automático quando uma falha. Custa a partir de US$ 0,22 por mil requisições, em dólares, sem assinatura e sem mínimo mensal. Nos últimos 30 dias, 100,0% das chamadas ao endpoint Tweet da API para X / Twitter feitas pela AnyAPI tiveram sucesso, com tempo de resposta mediano de 1,3 segundos, em 422.255 chamadas medidas.

Custa a partir de US$ 0,22 por mil requisições, em dólares, sem assinatura e sem mínimo mensal. Você recarrega uma carteira em dólares e cada chamada desconta dela. Algumas requisições pagas pela carteira que falham geram cobranças de processamento, que repassamos pelo custo, sem margem; a resposta de erro mostra o valor cobrado.

Detalhes completos de um único tweet pela URL: texto, ID do autor e contagens de engajamento (curtidas, retweets, respostas, citações, itens salvos, visualizações). A resposta é JSON normalizado, com o mesmo envelope que todo endpoint da AnyAPI retorna, então processar um segundo endpoint é só trocar a URL, e nada mais.

Nos últimos 30 dias, 100,0% das chamadas ao endpoint Tweet da API para X / Twitter feitas pela AnyAPI tiveram sucesso, com tempo de resposta mediano de 1,3 segundos, em 422.255 chamadas medidas. Estas são medições da própria AnyAPI sobre o tráfego que passa pelo gateway, recalculadas continuamente, e não uma meta de nível de serviço publicada.

Sim. Uma conta nova da AnyAPI começa com US$ 0,10 de saldo grátis, sem cartão, o que cobre 454 chamadas de Tweet do X / Twitter a US$ 0,00022 cada.

A AnyAPI consulta a próxima das suas 4 fontes na mesma requisição, começando pela mais barata, então a queda de uma fonte não derruba sua chamada.

Envie uma requisição POST para https://api.getanyapi.com/v1/run/twitter.tweet com sua chave da AnyAPI em um cabeçalho "Authorization: Bearer" e a entrada como corpo JSON. A mesma chave e a mesma carteira funcionam em todos os endpoints da AnyAPI.

Não. Você adiciona dólares a um único saldo pré-pago da AnyAPI e cada requisição desconta dele. Não há plano mensal nem mínimo, e o mesmo saldo paga todos os endpoints da AnyAPI.

Sim. Instale @getanyapi/sdk pelo npm para TypeScript ou getanyapi pelo pip para Python. Os dois chamam todos os endpoints da AnyAPI com a mesma chave, e qualquer cliente HTTP também funciona.

Sim. Um agente pode se conectar ao servidor MCP da AnyAPI em https://api.getanyapi.com/mcp, ou criar a própria chave de teste grátis com um único POST sem autenticação para https://api.getanyapi.com/agent/signup e chamar este endpoint por HTTP.