urlstringobrigatório
Canonical x.com or twitter.com status URL with a numeric tweet ID, including /i/web/status and media-share variants.
https://api.sandbase.ai/v1/api/twitter/tweetFetch a single Twitter/X tweet by URL with its full text and engagement counts (likes, retweets, replies, quotes, bookmarks, views).
Sua saída aparecerá aqui
Preencha as entradas e clique em Executar.
Returns one tweet from X (Twitter) as JSON: its text, author details, engagement counts, and attached media. It needs the tweet's url as input.
likes, retweets and views change by calling it on a schedule.curl -X POST "https://api.sandbase.ai/v1/api/twitter/tweet" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://x.com/SpaceX/status/1732824684683784516"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Canonical x.com or twitter.com status URL with a numeric tweet ID, including /i/web/status and media-share variants. |
requireFields | array | No | 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 |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"authorHandle": "SpaceX",
"authorId": "34743251",
"authorImage": "https://pbs.twimg.com/profile_images/1697749409851985920/HbrI04tM_normal.jpg",
"authorName": "SpaceX",
"authorVerified": true,
"bookmarks": 1877,
"conversationId": "1732824684683784516",
"createdUtc": 1701972573,
"id": "1732824684683784516",
"inReplyToId": null,
"lang": "en",
"likes": 33783
},
"found": true
}
| Field | Meaning |
|---|---|
data.text | Full text of the tweet. Links appear as shortened t.co URLs. |
data.authorHandle / data.authorName | Handle and display name of the account that posted the tweet. |
data.authorId | Numeric ID of the author's account, as a string. |
data.authorVerified | true if the author account is marked as verified. |
data.likes / data.retweets / data.replies / data.quotes / data.bookmarks | Engagement counts for the tweet. |
data.views | View count for the tweet. |
data.createdUtc | Time the tweet was posted, as a Unix timestamp in seconds. |
data.conversationId / data.inReplyToId | conversationId is the ID of the conversation the tweet belongs to. inReplyToId is null when the tweet is not a reply. |
data.media[].type / data.media[].url | Type of each attached media item, such as video, and its image URL. For a video, the URL points to a thumbnail image. |
data.media[].width / data.media[].height | Pixel size of the media item, as returned. |
url, for example https://x.com/SpaceX/status/1732824684683784516. The ID in the link matches data.id.requireFields with videoUrl, width or height if your code needs those fields. This can change which source serves the call and its price.found is false.Billed at the actual cost of each call, about $0.00022 for the request above. Failed calls are not charged.
Comece a construir
Endpoint da API da plataforma com autenticação unificada e rastreamento de uso.
curl -X POST "https://api.sandbase.ai/v1/api/twitter/tweet" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://x.com/SpaceX/status/1732824684683784516"
}'Defina sua chave da API SandBase no ambiente do seu servidor. As requisições usam autenticação Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Mantenha sua chave no servidor. Não a exponha em código do navegador.
urlstringobrigatórioCanonical x.com or twitter.com status URL with a numeric tweet ID, including /i/web/status and media-share variants.
requireFieldsarrayOptional; 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.
Resposta de exemplo salva para esta API; nenhuma requisição ao vivo é feita ao visualizá-la.
Nenhuma resposta salva foi publicada. Execute a API no Playground para inspecionar a resposta.
Explorar mais
| API | Preço | Resposta |
|---|---|---|
X (Twitter) Twitter TweetEsta API X (Twitter) | A partir de $0.00022 por chamada | JSON |
X (Twitter) | A partir de $0.00054 por chamada | JSON |
Twitter | A partir de $0.0006 por chamada | JSON assíncrono |
X (Twitter) | A partir de $0.0001 por chamada | JSON |
X (Twitter) | A partir de $0.0036 por chamada | JSON |
X (Twitter) | A partir de $0.00045 por chamada | JSON |
Guias:X API alternative: pay per call, not per postBest Twitter API in 2026: X API Pricing Compared
Perguntas
Envie uma solicitação POST para https://api.sandbase.ai/v1/api/twitter/tweet com sua chave de API da SandBase no cabeçalho Authorization (Bearer) e os parâmetros no corpo JSON. Você também pode testar no Playground desta página sem escrever código.
A partir de $0.00022 por chamada, cobrado do seu saldo SandBase. Você paga apenas pelas chamadas que fizer; não há assinatura.
Obrigatórios: url (string). Opcionais: requireFields (array). A tabela de Parâmetros e o Playground nesta página listam todos os campos.
Uma resposta JSON retornada na mesma solicitação HTTP (síncrona). O README desta página inclui um exemplo de resposta.
Não. X (Twitter) Twitter Tweet funciona via SandBase, então uma única chave de API da SandBase cobre este endpoint e todas as outras APIs e modelos do catálogo. Você não precisa solicitar acesso à API do X (Twitter) separadamente.