Sand AISand AI MAGI-2MAGI-2 artık SandBase'de: yerel sesli 1080p videoŞimdi deneyin

X (Twitter) Twitter Tweet

API dokümanları
https://api.sandbase.ai/v1/api/twitter/tweet

Fetch a single Twitter/X tweet by URL with its full text and engagement counts (likes, retweets, replies, quotes, bookmarks, views).

Fiyat
Başlangıç fiyatı $0.00022USD / çağrı
Yöntem
POST
Yanıt
JSON
Parametreler
1 gerekli · 1 isteğe bağlı

Oynatma Alanı

Girdi
Canonical x.com or twitter.com status URL with a numeric tweet ID, including /i/web/status and media-share variants.
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.
ÇıktıHazır

Çıktınız burada görünecek

Girdileri tamamlayın, ardından Çalıştır'a tıklayın.

API README

X (Twitter) Twitter Tweet API

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.

Use cases

  • Show a tweet's text and like, retweet and view counts in a dashboard or report.
  • Track how a tweet's likes, retweets and views change by calling it on a schedule.
  • Check whether a tweet is a reply and which conversation it belongs to.
  • Pull the thumbnail and size of a tweet's video or image for a preview card.

Request

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.

Parameters

NameTypeRequiredDescription
urlstringYesCanonical x.com or twitter.com status URL with a numeric tweet ID, including /i/web/status and media-share variants.
requireFieldsarrayNoOptional; 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

Example response

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
}

Response fields

FieldMeaning
data.textFull text of the tweet. Links appear as shortened t.co URLs.
data.authorHandle / data.authorNameHandle and display name of the account that posted the tweet.
data.authorIdNumeric ID of the author's account, as a string.
data.authorVerifiedtrue if the author account is marked as verified.
data.likes / data.retweets / data.replies / data.quotes / data.bookmarksEngagement counts for the tweet.
data.viewsView count for the tweet.
data.createdUtcTime the tweet was posted, as a Unix timestamp in seconds.
data.conversationId / data.inReplyToIdconversationId 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[].urlType 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[].heightPixel size of the media item, as returned.

Notes

  • Pass the full tweet link in url, for example https://x.com/SpaceX/status/1732824684683784516. The ID in the link matches data.id.
  • Add requireFields with videoUrl, width or height if your code needs those fields. This can change which source serves the call and its price.
  • If the tweet is not found, the call still succeeds and found is false.
  • To fetch many tweets at once, use Tweets by IDs. To read the replies, use Twitter Post Comments.

Pricing

Billed at the actual cost of each call, about $0.00022 for the request above. Failed calls are not charged.

Daha fazlasını keşfedin

İlgili APIs

Tüm APIs
APIFiyatYanıt
X (Twitter)Kullanım başına $0.00022'den itibarenJSON
X (Twitter)Kullanım başına $0.00054'den itibarenJSON
TwitterKullanım başına $0.0006'den itibarenAsenkron JSON
X (Twitter)Kullanım başına $0.0001'den itibarenJSON
X (Twitter)Kullanım başına $0.0036'den itibarenJSON
X (Twitter)Kullanım başına $0.00045'den itibarenJSON

Kılavuzlar:X API alternative: pay per call, not per postBest Twitter API in 2026: X API Pricing Compared

Sorular

SSS

X (Twitter) Twitter Tweet API'sini nasıl kullanırım?

SandBase API anahtarınızı Authorization başlığında (Bearer) ve parametreleri JSON gövdesi olarak ile https://api.sandbase.ai/v1/api/twitter/tweet adresine bir POST isteği gönderin. Ayrıca bu sayfadaki Playground’da kod yazmadan da deneyebilirsiniz.

X (Twitter) Twitter Tweet API'sinin fiyatı nedir?

çağrı başına $0.00022'dan başlayan, SandBase bakiyenizden tahsil edilir. Yalnızca yaptığınız çağrılar için ücretlendirilirsiniz; abonelik yoktur.

X (Twitter) Twitter Tweet API'si hangi parametreleri kabul eder?

Gerekli: url (string). İsteğe bağlı: requireFields (array). Parametreler tablosu ve bu sayfadaki Playground, tüm alanları listeler.

X (Twitter) Twitter Tweet API'si ne döndürür?

Aynı HTTP isteğinde döndürülen bir JSON yanıtı (senkron). Bu sayfadaki README'de örnek bir yanıt yer alır.

Bir X (Twitter) geliştirici hesabına veya API anahtarına ihtiyacım var mı?

Hayır. X (Twitter) Twitter Tweet, SandBase üzerinden çalışır; bu nedenle tek bir SandBase API anahtarı bu uç noktayı ve katalogdaki diğer tüm API'leri ve modelleri kapsar. X (Twitter) API erişimi için ayrıca başvuru yapmanız gerekmez.