Get Twitter Account Based in
Get Twitter Account Based in. The maximum input quantity is limited by your plan’s QPS. To pass larger input quantity limits, upgrade your plan to get higher QPS.
Back to API Reference
/Twitter Account Based in Endpoints
POST
/twitter/account/basedAuthorization
AuthorizationBearer token · headerrequiredGlobal API Bearer Token for TwexAPI. Included as: Authorization: Bearer <YOUR_TWEXAPI_KEY>.
Request Body
requiredapplication/jsonArray of
stringstringResponses
200The Twitter Account Based in data.
codeintegerHTTP status code
default: 200
msgstringResponse message
default: "success"
dataTwitterUserAboutResponse[] | anyTwitter Account Based in data
Show propertiesHide properties
Any of:
TwitterUserAboutResponse[]
Array of
TwitterUserAboutResponseuser_idstringrequiredTwitter user ID
avatarstringrequiredProfile avatar image URL
namestringrequiredUser display name
screen_namestringrequiredTwitter username (handle)
created_atstringrequiredAccount creation date in Twitter format
profile_image_shapestringrequiredProfile image shape (e.g., Circle, Square)
verificationbooleanrequiredWhether the user account is verified
userLabelDisplayTypestringrequiredUser label display type (e.g., Badge)
userLabelTypestringrequiredUser label type (e.g., BusinessLabel)
is_blue_verifiedbooleanrequiredWhether the user has blue verification badge (Twitter Blue/X Premium)
privacy_policy_urlstringrequiredPrivacy policy or learn more URL
account_based_instringrequiredCountry or region where the account is based
location_accuratebooleanrequiredWhether the location information is accurate
affiliate_usernamestringrequiredAffiliated username (e.g., business account username)
sourcestringrequiredSource of account creation (e.g., 'United States App Store')
username_changes_countintegerrequiredNumber of times the username has been changed
override_verified_yearintegerrequiredOverride verified year (if applicable, negative values indicate special cases)
verified_since_msecintegerrequiredTimestamp in milliseconds when the account was verified (negative values indicate special cases)
any
any422Validation Error
detailValidationError[]Show propertiesHide properties
Array of
ValidationErrorlocstring | integer[]requiredShow propertiesHide properties
Array of
string | integerAny of:
string
stringinteger
integermsgstringrequiredtypestringrequiredinputanyctxobject⚡Interactive ConsolePOST
⚡Interactive Console / Try APIPOSTLive Console
🌐Target Server:
https://api.twexapi.io● Production Ready
🔍
Public Data Read (TwexAPI Key Only, No Twitter Cookie Required)
This endpoint queries public Twitter data — no Twitter account or Cookie required! Simply enter your TwexAPI Platform Key (Bearer Token) in the "API Authorization" section below to test.
🔑API Authorization
📝Request Bodyapplication/json
📡
No Response Yet
Configure parameters in the Request tab and click Send Request below.
Request
curl -X POST "https://api.twexapi.io/twitter/account/based" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '[
"screen_name",
"elonmusk"
]'const response = await fetch("https://api.twexapi.io/twitter/account/based", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify([
"screen_name",
"elonmusk"
])
});import requests
response = requests.post(
"https://api.twexapi.io/twitter/account/based",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json=[
"screen_name",
"elonmusk"
],
)Response
{
"code": 200,
"msg": "success",
"data": [
{
"user_id": "44196397",
"avatar": "https://pbs.twimg.com/profile_images/1983681414370619392/oTT3nm5Z_normal.jpg",
"name": "Elon Musk",
"screen_name": "elonmusk",
"created_at": "Tue Jun 02 20:12:29 +0000 2009",
"profile_image_shape": "Circle",
"verification": false,
"userLabelDisplayType": "Badge",
"userLabelType": "BusinessLabel",
"is_blue_verified": true,
"privacy_policy_url": "https://help.twitter.com/managing-your-account/about-twitter-verified-accounts",
"account_based_in": "United States",
"location_accurate": true,
"affiliate_username": "X",
"source": "United States App Store",
"username_changes_count": 0,
"override_verified_year": -3000,
"verified_since_msec": -156836000000000
}
]
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}