How to get X (Twitter) profiles and tweets without the official API
Updated · 3 steps
As of Nov 2026, X sells its official API pay-per-use: you buy credits in advance, and each read is billed per resource returned. If you need public profiles and tweets for a dashboard, a research project or a creator tool, Fetchproof charges a flat 1 credit per call, whatever the size of the response.
These three calls cover the common jobs: look up a profile, read the tweets that perform best on it, and get the details of any single tweet.
Look up a profile
Pass the handle without @. The response carries the profile's rest_id, name, bio, location, verification and statuses_count (number of posts).
cURL
curl --request GET 'https://api.fetchproof.com/v1/twitter/profile?handle=NASA' \
--header 'x-api-key: YOUR_API_KEY' JavaScript
const response = await fetch("https://api.fetchproof.com/v1/twitter/profile?handle=NASA", {
method: 'GET',
headers: {
'x-api-key': process.env.FETCHPROOF_API_KEY,
},
});
const data = await response.json();
console.log(data); Python
import os
import requests
response = requests.get(
"https://api.fetchproof.com/v1/twitter/profile?handle=NASA",
headers={"x-api-key": os.environ["FETCHPROOF_API_KEY"]},
)
print(response.json()) Go
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.fetchproof.com/v1/twitter/profile?handle=NASA", nil)
req.Header.Set("x-api-key", os.Getenv("FETCHPROOF_API_KEY"))
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
} PHP
<?php
$ch = curl_init("https://api.fetchproof.com/v1/twitter/profile?handle=NASA");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
'x-api-key: ' . getenv('FETCHPROOF_API_KEY'),
],
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response; {
"success": true,
"credits_remaining": 100,
"credits_charged": 1,
"__typename": "User",
"id": "VXNlcjoxMTM0ODI4Mg==",
"rest_id": "11348282",
"is_blue_verified": null,
"profile_image_shape": "Square",
"legacy": {
"description": "Making the seemingly impossible, possible. ✨",
"followers_count": null,
"friends_count": null,
"location": "Pale Blue Dot",
"name": "NASA",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_mini.jpg",
"screen_name": "NASA",
"statuses_count": 74544,
"url": "https://x.com/NASA",
"verified": true
}
} Get the user's popular tweets
Returns a selection of the most popular tweets on a public profile, each with its text, created_at, language and favorite_count. These are the profile's popular tweets, not its latest ones, so use this endpoint to see what performs, not as a live feed.
cURL
curl --request GET 'https://api.fetchproof.com/v1/twitter/user-tweets?handle=NASA' \
--header 'x-api-key: YOUR_API_KEY' JavaScript
const response = await fetch("https://api.fetchproof.com/v1/twitter/user-tweets?handle=NASA", {
method: 'GET',
headers: {
'x-api-key': process.env.FETCHPROOF_API_KEY,
},
});
const data = await response.json();
console.log(data); Python
import os
import requests
response = requests.get(
"https://api.fetchproof.com/v1/twitter/user-tweets?handle=NASA",
headers={"x-api-key": os.environ["FETCHPROOF_API_KEY"]},
)
print(response.json()) Go
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.fetchproof.com/v1/twitter/user-tweets?handle=NASA", nil)
req.Header.Set("x-api-key", os.Getenv("FETCHPROOF_API_KEY"))
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
} PHP
<?php
$ch = curl_init("https://api.fetchproof.com/v1/twitter/user-tweets?handle=NASA");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
'x-api-key: ' . getenv('FETCHPROOF_API_KEY'),
],
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response; {
"success": true,
"credits_remaining": 100,
"credits_charged": 1,
"tweets": [
{
"__typename": "Tweet",
"rest_id": "2122404409292337592",
"core": "{…}",
"legacy": "{…}"
}
]
} Get one tweet's details
Pass a tweet URL from x.com or twitter.com to get its text, author, timestamp and engagement.
cURL
curl --request GET 'https://api.fetchproof.com/v1/twitter/tweet?url=https%3A%2F%2Fx.com%2Fjack%2Fstatus%2F20' \
--header 'x-api-key: YOUR_API_KEY' JavaScript
const response = await fetch("https://api.fetchproof.com/v1/twitter/tweet?url=https%3A%2F%2Fx.com%2Fjack%2Fstatus%2F20", {
method: 'GET',
headers: {
'x-api-key': process.env.FETCHPROOF_API_KEY,
},
});
const data = await response.json();
console.log(data); Python
import os
import requests
response = requests.get(
"https://api.fetchproof.com/v1/twitter/tweet?url=https%3A%2F%2Fx.com%2Fjack%2Fstatus%2F20",
headers={"x-api-key": os.environ["FETCHPROOF_API_KEY"]},
)
print(response.json()) Go
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.fetchproof.com/v1/twitter/tweet?url=https%3A%2F%2Fx.com%2Fjack%2Fstatus%2F20", nil)
req.Header.Set("x-api-key", os.Getenv("FETCHPROOF_API_KEY"))
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
} PHP
<?php
$ch = curl_init("https://api.fetchproof.com/v1/twitter/tweet?url=https%3A%2F%2Fx.com%2Fjack%2Fstatus%2F20");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
'x-api-key: ' . getenv('FETCHPROOF_API_KEY'),
],
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response; {
"success": true,
"credits_remaining": 100,
"credits_charged": 1,
"__typename": "Tweet",
"rest_id": "20",
"core": {
"user_results": {
"result": "{…}"
}
},
"legacy": {
"created_at": "2006-03-21T20:50:14.000Z",
"favorite_count": 325463,
"full_text": "just setting up my twttr",
"lang": "en",
"id_str": "20"
}
} Limits
Follower and following counts are not returned: followers_count and friends_count come back as null, so don't build follower tracking for X on this endpoint. Only public profiles and tweets are returned.
What it costs
Each call costs 1 credit, and failed calls cost 0. Set cache_max_age on profile and tweet lookups to reuse a recent copy for 0 credits.
Try it with 100 free credits
Sign up with an email address, no card. Credits never expire. Errors cost 0 credits, and each endpoint page lists exactly what it charges.