Profile
GET/v1/twitter/profile1 credit
Returns the public profile of an X account: name, bio, avatar and banner, verification, follower, following, post and media counts, and pinned post ids.
01Query parameters
| Name | Type | Description |
|---|---|---|
| handlerequired | string | The account's username, e.g. `NASA`. A leading `@` is ignored. |
| cache_max_ageoptional | string | Accepted for compatibility; every call is fetched fresh and costs the normal price. Any other value is a free 400.Accepted values:1d3d7d14d30d |
02Request
curl "https://api.scrapesocial.ai/v1/twitter/profile?handle=NASA" \ -H "x-api-key: $SCRAPESOCIAL_KEY"
03Responses
Real answers from the API. Lists are shortened to 2 items.
GET /v1/twitter/profile?handle=NASA
{
"success": true,
"credits_remaining": 4980,
"credits_charged": 1,
"__typename": "User",
"affiliates_highlighted_label": {},
"avatar": {
"image_url": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_normal.jpg"
},
"business_account": {
"affiliates_count": 85
},
"core": {
"created_at": "Wed Dec 19 20:20:32 +0000 2007",
"name": "NASA",
"screen_name": "NASA"
},
"creator_subscriptions_count": 0,
"dm_permissions": {
"can_dm": false
},
"has_graduated_access": true,
"has_hidden_subscriptions_on_profile": false,
"highlights_info": {
"can_highlight_tweets": true,
"highlighted_tweets": "287"
},
"id": "VXNlcjoxMTM0ODI4Mg==",
"is_blue_verified": true,
"is_profile_translatable": false,
"legacy": {
"created_at": "Wed Dec 19 20:20:32 +0000 2007",
"name": "NASA",
"screen_name": "NASA",
"default_profile": false,
"default_profile_image": false,
"description": "Making the seemingly impossible, possible. ✨",
"entities": {
"description": {},
"url": {
"urls": [
{
"display_url": "nasa.gov",
"expanded_url": "http://www.nasa.gov/",
"indices": [
0,
23
],
"url": "https://t.co/9NkQJKAnuU"
}
]
}
},
"fast_followers_count": 0,
"favourites_count": 17049,
"follow_request_sent": false,
"followers_count": 92312406,
"friends_count": 115,
"has_custom_timelines": true,
"is_translator": false,
"listed_count": 96844,
"media_count": 28207,
"needs_phone_verification": false,
"normal_followers_count": 92312406,
"notifications": false,
"pinned_tweet_ids_str": [
"2113776971603689874"
],
"possibly_sensitive": false,
"profile_banner_url": "https://pbs.twimg.com/profile_banners/11348282/1788992290",
"profile_interstitial_type": "",
"statuses_count": 74455,
"time_zone": "",
"translator_type": "regular",
"url": "https://t.co/9NkQJKAnuU",
"utc_offset": 0,
"withheld_description": "",
"withheld_scope": "",
"location": "Pale Blue Dot",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_normal.jpg"
},
"legacy_extended_profile": {
"birthdate": {
"day": 1,
"month": 10,
"visibility": "Public",
"year": 1958,
"year_visibility": "Public"
}
},
"location": {
"location": "Pale Blue Dot"
},
"media_permissions": {
"can_media_tag": false
},
"parody_commentary_fan_label": "None",
"privacy": {
"protected": false
},
"profile_image_shape": "Square",
"relationship_perspectives": {
"blocked_by": false,
"blocking": false,
"followed_by": false,
"following": false,
"muting": false
},
"rest_id": "11348282",
"super_follow_eligible": false,
"super_followed_by": false,
"super_following": false,
"tipjar_settings": {
"bandcamp_handle": "",
"bitcoin_handle": "",
"cash_app_handle": "",
"ethereum_handle": "",
"gofundme_handle": "",
"is_enabled": false,
"patreon_handle": "",
"pay_pal_handle": "",
"venmo_handle": ""
},
"user_seed_tweet_count": 0,
"verification": {
"verified": false,
"verified_type": "Government"
},
"verification_info": {
"is_identity_verified": false,
"reason": {
"description": {
"entities": [
{
"from_index": 91,
"ref": {
"url": "https://help.twitter.com/en/rules-and-policies/profile-labels",
"url_type": "ExternalUrl"
},
"to_index": 101
}
],
"text": "This account is verified because it is a government or multilateral organization account. Learn more"
},
"verified_since_msec": "1249674830941"
}
}
}Common to every endpoint
Any route can answer these: a missing or wrong key, no credits left, the platform not answering, or a failure on our side. None of them costs credits.
GET /v1/cosmos/profile?handle=design
{
"success": false,
"message": "Invalid API key"
}04Notes
An unknown or suspended account answers 404 with `handle`, `userId` (null) and the message `Account doesn't exist`, free. Viewer-related fields (whether you follow the account, can message it) describe an anonymous visitor and are always false.
05Errors & credits
Every error has success: false, a real HTTP status and costs no credits.
400missing_parameter
A required parameter is missing or invalid.
403private_account
The account is private or age-restricted.
404not_found
No such account.
503upstream_error
The platform did not answer; retry shortly.