X Profile Scraper API
The X Profile Scraper API lets you scrape comprehensive profile data for any X (Twitter) user including follower counts, engagement metrics, bio, profile picture, and account metadata. Each successful request costs 5 API credits.
Endpoint:
https://api.scrapingdog.com/x/profileAPI Parameters
🔑
Scrapingdog Parameters
api_keyRequiredYour personal API key. Available on your dashboard.
Type: String
👤
Profile
profileIdRequiredThis is the user ID or username of the X (Twitter) profile you want to scrape (e.g.,elonmusk,nasa).
Type: String
API Examples
Code to Integrate
curl "https://api.scrapingdog.com/x/profile?api_key=APIKEY&profileId=elonmusk"
import requests params = { "api_key": "APIKEY", "profileId": "elonmusk" } response = requests.get("https://api.scrapingdog.com/x/profile", params=params) data = response.json() print(data["name"], "-", data["followers_count"], "followers")
const params = new URLSearchParams({ api_key: "APIKEY", profileId: "elonmusk" }); const res = await fetch(`https://api.scrapingdog.com/x/profile?${params}`); const data = await res.json(); console.log(data.name, data.followers_count);
<?php $url = 'https://api.scrapingdog.com/x/profile?' . http_build_query([ 'api_key' => 'APIKEY', 'profileId' => 'elonmusk', ]); echo file_get_contents($url);
API Response
{
"id": "44196397",
"rest_id": "44196397",
"name": "Elon Musk",
"handle": "elonmusk",
"url": "https://twitter.com/elonmusk",
"description": "The people voted for major government reform",
"location": "America",
"profile_picture": "https://pbs.twimg.com/profile_images/1718187989397278720/KM8TtPKM_normal.jpg",
"followers_count": 221041700,
"following_count": 1147,
"likes_count": 151468,
"statuses_count": 80069,
"media_count": 3915,
"listed_count": 162896,
"is_blue_verified": true,
"verified": false,
"pinned_tweet_ids": ["1877764053985370337"],
"translator_type": "none",
"labels": []
}