curl --request GET \
--url https://twitter-x-api.p.rapidapi.com/api/v2/search/top \
--header 'x-rapidapi-key: <api-key>'import requests
url = "https://twitter-x-api.p.rapidapi.com/api/v2/search/top"
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/search/top', 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/search/top",
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/search/top"
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/search/top")
.header("x-rapidapi-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://twitter-x-api.p.rapidapi.com/api/v2/search/top")
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{
"cursor": "DAACCgACHSUbw5KAJxAKAAMdJRvDkn_Y8AgABAAAAAILAAUAAAD8RW1QQzZ3QUFBZlEvZ0dKTjB2R3AvQUFBQUJVZEpIYzdFRmNCUGgwbEFlRGJXbkVlRmM0WHJ6SFh3QUFkSkh3cnRWclJQQjBsR1ZxYkczRWpIU1JTMVBCWEFOd1A4Nzd6YXBUQUFCMGtvVTJoRjNIYkVQdWVxa2ZXa0FZV3BRalJOZHB3QUIwazlUV2hHb0dWSFNOaDg1TlhzVlFkSWkzWUxsb3dqQjBsQUxBTEZ2QlZIUjlqdTdKWFlKUVErNlo0YlZhUUFCd0FSUUg0bWhFQ0Z5M2RwQ2lXSUFBZEpIVjM3VnRnTGgwbEFrRzRWMUJNSFNVVHBvWWFNT1E9CAAGAAAAAAgABwAAAAAMAAgKAAEP877zapTAAAAAAA",
"has_more": true,
"data": [
{
"id": "2088010341183787008",
"conversation_id": "2088010341183787008",
"desc": "No, just the week.\n\nStrong people have wills; weak people have only wishes.\n\nKeep making good trades with your future self. Earn more and stack harder. https://t.co/mUQdFoRTfp",
"lang": "en",
"view_count": 224687,
"bookmark_count": 17,
"favorite_count": 799,
"quote_count": 12,
"reply_count": 166,
"retweet_count": 216,
"medias": [
{
"id": "2088010209482682368",
"url": "https://t.co/mUQdFoRTfp",
"media_url": "https://pbs.twimg.com/media/HPoaOQeasAAqb3a.jpg",
"type": "photo",
"width": 1510,
"height": 1480
}
],
"author": {
"id": "357312062",
"encoded_id": "VXNlcjozNTczMTIwNjI=",
"screen_name": "Bitcoin",
"name": "Bitcoin",
"desc": "Bitcoin is an open source censorship-resistant peer-to-peer immutable network. Trackable digital gold. Don't trust; verify. Not your keys; not your coins.",
"location": "Worldwide",
"birthdate": {
"day": 3,
"month": 1,
"year": 2009
},
"website_url": "https://t.co/foKG3v5VuE",
"avatar_url": "https://pbs.twimg.com/profile_images/421692600446619648/dWAbC2wg_normal.jpeg",
"banner_url": "https://pbs.twimg.com/profile_banners/357312062/1566845268",
"created_at": "Thu Aug 18 05:06:08 +0000 2011",
"created_at_unix": 1313643968,
"profile_image_shape": "Circle",
"tweet_count": 30158,
"media_tweet_count": 4574,
"follower_count": 8899205,
"following_count": 13,
"favorites_count": 2772,
"affiliates_count": 0,
"creator_subscriptions_count": 0,
"is_private": false,
"is_verified": false,
"is_blue_verified": true,
"verification_info": {
"is_identity_verified": false,
"verified_since_msec": "1682247319678",
"reason": "This account is verified"
},
"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/foKG3v5VuE",
"display_url": "bitcoin.org/bitcoin.pdf",
"expanded_url": "https://bitcoin.org/bitcoin.pdf"
}
],
"affiliates_highlighted_label": {
"description": "",
"url": "",
"badge_url": "",
"type": ""
},
"professional": {
"category": [
{
"id": "",
"name": ""
}
],
"id": "1679703878185672704",
"type": "Business"
},
"parody_commentary_fan_label": "None",
"pinned_tweet_ids": [
"1283491850641461248"
]
},
"in_reply_to_tweet_id": null,
"in_reply_to_user_id": null,
"in_reply_to_screen_name": null,
"is_quote_status": true,
"quoted_status_id": "2087635216474976683",
"is_translatable": false,
"is_edit_eligible": true,
"possibly_sensitive": false,
"possibly_sensitive_editable": true,
"created_at_unix": 1786655433,
"created_at": "Thu Aug 13 21:10:33 +0000 2026",
"source": "Twitter Web App"
}
]
}{
"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
}Search Top
Search Top
curl --request GET \
--url https://twitter-x-api.p.rapidapi.com/api/v2/search/top \
--header 'x-rapidapi-key: <api-key>'import requests
url = "https://twitter-x-api.p.rapidapi.com/api/v2/search/top"
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/search/top', 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/search/top",
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/search/top"
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/search/top")
.header("x-rapidapi-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://twitter-x-api.p.rapidapi.com/api/v2/search/top")
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{
"cursor": "DAACCgACHSUbw5KAJxAKAAMdJRvDkn_Y8AgABAAAAAILAAUAAAD8RW1QQzZ3QUFBZlEvZ0dKTjB2R3AvQUFBQUJVZEpIYzdFRmNCUGgwbEFlRGJXbkVlRmM0WHJ6SFh3QUFkSkh3cnRWclJQQjBsR1ZxYkczRWpIU1JTMVBCWEFOd1A4Nzd6YXBUQUFCMGtvVTJoRjNIYkVQdWVxa2ZXa0FZV3BRalJOZHB3QUIwazlUV2hHb0dWSFNOaDg1TlhzVlFkSWkzWUxsb3dqQjBsQUxBTEZ2QlZIUjlqdTdKWFlKUVErNlo0YlZhUUFCd0FSUUg0bWhFQ0Z5M2RwQ2lXSUFBZEpIVjM3VnRnTGgwbEFrRzRWMUJNSFNVVHBvWWFNT1E9CAAGAAAAAAgABwAAAAAMAAgKAAEP877zapTAAAAAAA",
"has_more": true,
"data": [
{
"id": "2088010341183787008",
"conversation_id": "2088010341183787008",
"desc": "No, just the week.\n\nStrong people have wills; weak people have only wishes.\n\nKeep making good trades with your future self. Earn more and stack harder. https://t.co/mUQdFoRTfp",
"lang": "en",
"view_count": 224687,
"bookmark_count": 17,
"favorite_count": 799,
"quote_count": 12,
"reply_count": 166,
"retweet_count": 216,
"medias": [
{
"id": "2088010209482682368",
"url": "https://t.co/mUQdFoRTfp",
"media_url": "https://pbs.twimg.com/media/HPoaOQeasAAqb3a.jpg",
"type": "photo",
"width": 1510,
"height": 1480
}
],
"author": {
"id": "357312062",
"encoded_id": "VXNlcjozNTczMTIwNjI=",
"screen_name": "Bitcoin",
"name": "Bitcoin",
"desc": "Bitcoin is an open source censorship-resistant peer-to-peer immutable network. Trackable digital gold. Don't trust; verify. Not your keys; not your coins.",
"location": "Worldwide",
"birthdate": {
"day": 3,
"month": 1,
"year": 2009
},
"website_url": "https://t.co/foKG3v5VuE",
"avatar_url": "https://pbs.twimg.com/profile_images/421692600446619648/dWAbC2wg_normal.jpeg",
"banner_url": "https://pbs.twimg.com/profile_banners/357312062/1566845268",
"created_at": "Thu Aug 18 05:06:08 +0000 2011",
"created_at_unix": 1313643968,
"profile_image_shape": "Circle",
"tweet_count": 30158,
"media_tweet_count": 4574,
"follower_count": 8899205,
"following_count": 13,
"favorites_count": 2772,
"affiliates_count": 0,
"creator_subscriptions_count": 0,
"is_private": false,
"is_verified": false,
"is_blue_verified": true,
"verification_info": {
"is_identity_verified": false,
"verified_since_msec": "1682247319678",
"reason": "This account is verified"
},
"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/foKG3v5VuE",
"display_url": "bitcoin.org/bitcoin.pdf",
"expanded_url": "https://bitcoin.org/bitcoin.pdf"
}
],
"affiliates_highlighted_label": {
"description": "",
"url": "",
"badge_url": "",
"type": ""
},
"professional": {
"category": [
{
"id": "",
"name": ""
}
],
"id": "1679703878185672704",
"type": "Business"
},
"parody_commentary_fan_label": "None",
"pinned_tweet_ids": [
"1283491850641461248"
]
},
"in_reply_to_tweet_id": null,
"in_reply_to_user_id": null,
"in_reply_to_screen_name": null,
"is_quote_status": true,
"quoted_status_id": "2087635216474976683",
"is_translatable": false,
"is_edit_eligible": true,
"possibly_sensitive": false,
"possibly_sensitive_editable": true,
"created_at_unix": 1786655433,
"created_at": "Thu Aug 13 21:10:33 +0000 2026",
"source": "Twitter Web App"
}
]
}{
"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?
Query Parameters
Search keyword
"crypto"
The number of results to be returned
20
cursor parameter is used for pagination. In the first request, the default value of cursor is empty. For subsequent requests, the value of cursor will be taken from the response of the previous request
Response
Success
Cursor for pagination. Use this value in subsequent requests to fetch more data
"DAACCgACHSUbw5KAJxAKAAMdJRvDkn_Y8AgABAAAAAILAAUAAAD8RW1QQzZ3QUFBZlEvZ0dKTjB2R3AvQUFBQUJVZEpIYzdFRmNCUGgwbEFlRGJXbkVlRmM0WHJ6SFh3QUFkSkh3cnRWclJQQjBsR1ZxYkczRWpIU1JTMVBCWEFOd1A4Nzd6YXBUQUFCMGtvVTJoRjNIYkVQdWVxa2ZXa0FZV3BRalJOZHB3QUIwazlUV2hHb0dWSFNOaDg1TlhzVlFkSWkzWUxsb3dqQjBsQUxBTEZ2QlZIUjlqdTdKWFlKUVErNlo0YlZhUUFCd0FSUUg0bWhFQ0Z5M2RwQ2lXSUFBZEpIVjM3VnRnTGgwbEFrRzRWMUJNSFNVVHBvWWFNT1E9CAAGAAAAAAgABwAAAAAMAAgKAAEP877zapTAAAAAAA"
Indicates whether there are more data available to fetch
true
Show child attributes
Show child attributes