API de X / Twitter

API de X / Twitter: Tweet

Detalle completo de un tweet por URL: texto, ID del autor y métricas de interacción (me gusta, retweets, respuestas, citas, guardados, visualizaciones).

US$0.22/1k solic., pagas por solicitud, sin suscripción.

Post
x.com/NASA/status/1800000000000000000

Post

N

NASA

@NASA

Liftoff! 🚀

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

3,90021.4K142K8,600
Lo que devolvió la API
{
"id": "1800000000000000000",
"text": "Liftoff! 🚀",
"authorId": "11348282",
"likes": 142000,
"retweets": 21400,
"replies": 3900,
"quotes": 1200,
"bookmarks": 8600,
... 10 campos más
}
Disponibilidad
100.00%
30d · 422,255 llamadas
Solicitudes
423,169
30d · semanal, últimas 12 sem.
Respuesta
1.3s
mediana · 30d

Precios y proveedores

Precios del endpoint Tweet de la API de X / Twitter: una API, 4 proveedores intercambiables

El proveedor más barato responde primero. Si falla, el siguiente toma el relevo en la misma llamada.

Pagas
US$2.20
US$0.22/1k solic., solo por lo que usas. Sin plan mensual.
Tus primeras 454 solicitudes son gratis con el saldo inicial de US$0.10.

Pruébalo

Obtén Tweet de X / Twitter en una sola solicitud

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 en
Respuesta de ejemplo
Las ejecuciones gratis devuelven solo los primeros 3 resultados. Agrega fondos a una clave para obtener la respuesta completa.

Este ejemplo muestra 12 de 26 campos. Ver todos los campos

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

Referencia completa de parámetros y respuesta: cada campo, tipo y ejemplo de este endpoint.

Referencia

Una solicitud, un formato de respuesta.

Cada campo que envías y cada campo que recibes, cada uno con un ejemplo real.

Verificado por última vez el 2026-11-14 · disponibilidad y latencia medidas en 30d

Cuerpo de la solicitud

JSON, enviado por POST a este endpoint.

  • urlstring

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

    URL de estado canónica de x.com o twitter.com con un ID numérico de tweet, incluidas las variantes /i/web/status y de contenido multimedia compartido.

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

Envías. Un cuerpo JSON pequeño. Los valores que se muestran son ejemplos para reemplazar por los tuyos.

Respuesta

JSON, un valor de ejemplo 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.

  • heightintegerse puede exigir

    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.

  • videoUrlstringse puede exigir

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

  • widthintegerse puede exigir

    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.

Recibes. Campos con nombre y tipo, con el mismo formato sin importar qué fuente responda.

Preguntas frecuentes

Acerca del endpoint Tweet de la API de X / Twitter

El endpoint Tweet de AnyAPI para X / Twitter devuelve datos de X / Twitter como JSON normalizado con una sola llamada POST a /v1/run/twitter.tweet. Detalle completo de un tweet por URL: texto, ID del autor y métricas de interacción (me gusta, retweets, respuestas, citas, guardados, visualizaciones). AnyAPI enruta cada solicitud entre 4 fuentes y recurre automáticamente a otra cuando una falla. Cuesta desde US$0.22 por cada 1,000 solicitudes, en dólares estadounidenses, sin suscripción y sin mínimo mensual. En los últimos 30 días, el 100.0% de las llamadas al endpoint Tweet de la API de X / Twitter a través de AnyAPI tuvo éxito, con un tiempo de respuesta mediano de 1.3 segundos en 422.255 llamadas medidas.

Cuesta desde US$0.22 por cada 1,000 solicitudes, en dólares estadounidenses, sin suscripción y sin mínimo mensual. Agregas fondos a una billetera en dólares y cada llamada descuenta de ella. Algunas solicitudes fallidas pagadas con la billetera generan cargos de procesamiento que trasladamos al costo, sin margen; la respuesta de error muestra el monto cobrado.

Detalle completo de un tweet por URL: texto, ID del autor y métricas de interacción (me gusta, retweets, respuestas, citas, guardados, visualizaciones). La respuesta es JSON normalizado con el mismo envoltorio que devuelve cada endpoint de AnyAPI, así que procesar un segundo endpoint es solo cambiar la URL.

En los últimos 30 días, el 100.0% de las llamadas al endpoint Tweet de la API de X / Twitter a través de AnyAPI tuvo éxito, con un tiempo de respuesta mediano de 1.3 segundos en 422.255 llamadas medidas. Estas son mediciones propias de AnyAPI sobre el tráfico que pasa por el gateway, recalculadas continuamente, no un objetivo de nivel de servicio publicado.

Sí. Una cuenta nueva de AnyAPI empieza con US$0.10 de saldo gratis, sin tarjeta, que alcanza para 454 llamadas a Tweet de X / Twitter a US$0.00022 cada una.

AnyAPI consulta la siguiente de sus 4 fuentes en la misma solicitud, empezando por la más barata, así que la caída de una fuente no hace fallar tu llamada.

Envía una solicitud POST a https://api.getanyapi.com/v1/run/twitter.tweet con tu clave de AnyAPI en un encabezado "Authorization: Bearer" y la entrada como cuerpo JSON. La misma clave y la misma billetera sirven para todos los endpoints de AnyAPI.

No. Agregas dólares a un solo saldo prepagado de AnyAPI y cada solicitud descuenta de él. No hay plan mensual ni mínimo, y el mismo saldo paga todos los endpoints de AnyAPI.

Sí. Instala @getanyapi/sdk desde npm para TypeScript o getanyapi desde pip para Python. Ambos llaman a todos los endpoints de AnyAPI con la misma clave, y también sirve cualquier cliente HTTP.

Sí. Un agente puede conectarse al servidor MCP de AnyAPI en https://api.getanyapi.com/mcp, o crear su propia clave de prueba gratis con un solo POST sin autenticar a https://api.getanyapi.com/agent/signup y llamar a este endpoint por HTTP.