Get Tweet Detail
curl --request GET \
--url https://twitter-x-api.p.rapidapi.com/api/v2/tweet/detail \
--header 'x-rapidapi-key: <api-key>'import requests
url = "https://twitter-x-api.p.rapidapi.com/api/v2/tweet/detail"
headers = {"x-rapidapi-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-rapidapi-key': '<api-key>'}};
fetch('https://twitter-x-api.p.rapidapi.com/api/v2/tweet/detail', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://twitter-x-api.p.rapidapi.com/api/v2/tweet/detail",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-rapidapi-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://twitter-x-api.p.rapidapi.com/api/v2/tweet/detail"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-rapidapi-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://twitter-x-api.p.rapidapi.com/api/v2/tweet/detail")
.header("x-rapidapi-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://twitter-x-api.p.rapidapi.com/api/v2/tweet/detail")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-rapidapi-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "2047748954071195814",
"conversation_id": "2047748954071195814",
"desc": "i just upgraded your home screen\nthe XChat app is now available on iOS\nhttps://t.co/YD93djN8Zx",
"lang": "en",
"view_count": 1959126,
"bookmark_count": 623,
"favorite_count": 6926,
"quote_count": 318,
"reply_count": 1584,
"retweet_count": 940,
"medias": [
{
"id": "2047746842713313280",
"url": "https://t.co/YD93djN8Zx",
"media_url": "https://pbs.twimg.com/media/HGsSzUwXcAEeKZx.jpg",
"type": "video",
"width": 1920,
"height": 1080
}
],
"hashtags": [],
"user_mentions": [],
"author": {
"id": "783214",
"encoded_id": "VXNlcjo3ODMyMTQ=",
"screen_name": "X",
"name": "X",
"desc": "what's happening?!",
"location": "everywhere",
"birthdate": {
"day": 21,
"month": 3,
"year": 2006
},
"website_url": "https://t.co/Xp0xJlcROt",
"avatar_url": "https://pbs.twimg.com/profile_images/1955359038532653056/OSHY3ewP_normal.jpg",
"banner_url": "https://pbs.twimg.com/profile_banners/783214/1690175171",
"created_at": "Tue Feb 20 14:35:54 +0000 2007",
"created_at_unix": 1171982154,
"profile_image_shape": "Square",
"tweet_count": 15718,
"media_tweet_count": 2491,
"follower_count": 60738503,
"following_count": 1,
"favorites_count": 5972,
"affiliates_count": 759,
"creator_subscriptions_count": 0,
"is_private": false,
"is_verified": false,
"is_blue_verified": true,
"verification_info": {
"is_identity_verified": false,
"verified_since_msec": "1362700632470",
"reason": "This account is verified because it's an official organization on X"
},
"can_dm": false,
"can_media_tag": false,
"is_profile_translatable": false,
"possibly_sensitive": false,
"premium_gifting_eligible": false,
"super_follow_eligible": false,
"profile_sort_enabled": true,
"has_graduated_access": true,
"has_hidden_subscriptions_on_profile": false,
"urls": [
{
"url": "https://t.co/Xp0xJlcROt",
"display_url": "x.com",
"expanded_url": "https://x.com"
}
],
"affiliates_highlighted_label": {
"description": "",
"url": "",
"badge_url": "",
"type": ""
},
"professional": {
"category": [
{
"id": 714,
"name": "Technology Company"
}
],
"id": "1858538123375874167",
"type": "Business"
},
"parody_commentary_fan_label": "None",
"pinned_tweet_ids": [
"1283491850641461248"
],
"profile_url": "https://x.com/X"
},
"in_reply_to_tweet_id": null,
"in_reply_to_user_id": null,
"in_reply_to_screen_name": null,
"is_quote_status": false,
"quoted_status_id": null,
"is_translatable": false,
"is_edit_eligible": false,
"possibly_sensitive": false,
"possibly_sensitive_editable": true,
"created_at_unix": 1777056370,
"created_at": "Fri Apr 24 18:46:10 +0000 2026",
"source": "Twitter Web App",
"url": "https://x.com/x/status/2047748954071195814"
}
}{
"message": "Bad request"
}{
"message": "Invalid API key. Go to https://docs.rapidapi.com/docs/keys for more info."
}{
"message": "You are not subscribed to this API."
}{
"message": "Request failed with status 500: Internal Server Error",
"status_code": 500
}Tweet
Get Tweet Detail
Get Tweet Detail
GET
/
api
/
v2
/
tweet
/
detail
Get Tweet Detail
curl --request GET \
--url https://twitter-x-api.p.rapidapi.com/api/v2/tweet/detail \
--header 'x-rapidapi-key: <api-key>'import requests
url = "https://twitter-x-api.p.rapidapi.com/api/v2/tweet/detail"
headers = {"x-rapidapi-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-rapidapi-key': '<api-key>'}};
fetch('https://twitter-x-api.p.rapidapi.com/api/v2/tweet/detail', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://twitter-x-api.p.rapidapi.com/api/v2/tweet/detail",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-rapidapi-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://twitter-x-api.p.rapidapi.com/api/v2/tweet/detail"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-rapidapi-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://twitter-x-api.p.rapidapi.com/api/v2/tweet/detail")
.header("x-rapidapi-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://twitter-x-api.p.rapidapi.com/api/v2/tweet/detail")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-rapidapi-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "2047748954071195814",
"conversation_id": "2047748954071195814",
"desc": "i just upgraded your home screen\nthe XChat app is now available on iOS\nhttps://t.co/YD93djN8Zx",
"lang": "en",
"view_count": 1959126,
"bookmark_count": 623,
"favorite_count": 6926,
"quote_count": 318,
"reply_count": 1584,
"retweet_count": 940,
"medias": [
{
"id": "2047746842713313280",
"url": "https://t.co/YD93djN8Zx",
"media_url": "https://pbs.twimg.com/media/HGsSzUwXcAEeKZx.jpg",
"type": "video",
"width": 1920,
"height": 1080
}
],
"hashtags": [],
"user_mentions": [],
"author": {
"id": "783214",
"encoded_id": "VXNlcjo3ODMyMTQ=",
"screen_name": "X",
"name": "X",
"desc": "what's happening?!",
"location": "everywhere",
"birthdate": {
"day": 21,
"month": 3,
"year": 2006
},
"website_url": "https://t.co/Xp0xJlcROt",
"avatar_url": "https://pbs.twimg.com/profile_images/1955359038532653056/OSHY3ewP_normal.jpg",
"banner_url": "https://pbs.twimg.com/profile_banners/783214/1690175171",
"created_at": "Tue Feb 20 14:35:54 +0000 2007",
"created_at_unix": 1171982154,
"profile_image_shape": "Square",
"tweet_count": 15718,
"media_tweet_count": 2491,
"follower_count": 60738503,
"following_count": 1,
"favorites_count": 5972,
"affiliates_count": 759,
"creator_subscriptions_count": 0,
"is_private": false,
"is_verified": false,
"is_blue_verified": true,
"verification_info": {
"is_identity_verified": false,
"verified_since_msec": "1362700632470",
"reason": "This account is verified because it's an official organization on X"
},
"can_dm": false,
"can_media_tag": false,
"is_profile_translatable": false,
"possibly_sensitive": false,
"premium_gifting_eligible": false,
"super_follow_eligible": false,
"profile_sort_enabled": true,
"has_graduated_access": true,
"has_hidden_subscriptions_on_profile": false,
"urls": [
{
"url": "https://t.co/Xp0xJlcROt",
"display_url": "x.com",
"expanded_url": "https://x.com"
}
],
"affiliates_highlighted_label": {
"description": "",
"url": "",
"badge_url": "",
"type": ""
},
"professional": {
"category": [
{
"id": 714,
"name": "Technology Company"
}
],
"id": "1858538123375874167",
"type": "Business"
},
"parody_commentary_fan_label": "None",
"pinned_tweet_ids": [
"1283491850641461248"
],
"profile_url": "https://x.com/X"
},
"in_reply_to_tweet_id": null,
"in_reply_to_user_id": null,
"in_reply_to_screen_name": null,
"is_quote_status": false,
"quoted_status_id": null,
"is_translatable": false,
"is_edit_eligible": false,
"possibly_sensitive": false,
"possibly_sensitive_editable": true,
"created_at_unix": 1777056370,
"created_at": "Fri Apr 24 18:46:10 +0000 2026",
"source": "Twitter Web App",
"url": "https://x.com/x/status/2047748954071195814"
}
}{
"message": "Bad request"
}{
"message": "Invalid API key. Go to https://docs.rapidapi.com/docs/keys for more info."
}{
"message": "You are not subscribed to this API."
}{
"message": "Request failed with status 500: Internal Server Error",
"status_code": 500
}Authorizations
Rapid API Key. How can I get Rapid API Key?