Skip to main content
GET
/
v1
/
twitter
/
users
/
{username}
/
by_username
Get user by username
curl --request GET \
  --url https://scrapebadger.com/v1/twitter/users/{username}/by_username \
  --header 'x-api-key: <api-key>'
{
  "id": "44196397",
  "username": "elonmusk",
  "name": "Elon Musk",
  "created_at": "Tue Jun 02 20:12:29 +0000 2009",
  "description": "Mars & Cars, Chips & Dips",
  "location": "Mars",
  "url": "<string>",
  "profile_image_url": "<string>",
  "profile_banner_url": "<string>",
  "followers_count": 0,
  "following_count": 0,
  "tweet_count": 0,
  "listed_count": 0,
  "favourites_count": 123,
  "media_count": 123,
  "verified": false,
  "verified_type": "<string>",
  "is_blue_verified": true,
  "created_at_datetime": "<string>",
  "protected": true,
  "possibly_sensitive": true,
  "followed_by": true,
  "following": true,
  "can_dm": true,
  "professional_type": "<string>",
  "pinned_tweet_ids": [
    "<string>"
  ]
}

Authorizations

x-api-key
string
header
required

Your ScrapeBadger API key. You can find this in your dashboard at https://scrapebadger.com/dashboard/api-keys.

Path Parameters

username
string
required

The username (screen name) of the user, without the @ symbol.

Example:

"elonmusk"

Response

Successfully retrieved user profile.

Comprehensive user profile data including bio, metrics, verification status, and account metadata.

id
string
required

Unique numeric user identifier.

Example:

"44196397"

username
string
required

The user's screen name (handle).

Example:

"elonmusk"

name
string
required

The user's display name.

Example:

"Elon Musk"

created_at
string
required

Account creation timestamp.

Example:

"Tue Jun 02 20:12:29 +0000 2009"

description
string | null

The user's bio/description.

Example:

"Mars & Cars, Chips & Dips"

location
string | null

The user's self-reported location.

Example:

"Mars"

url
string | null

URL in the user's profile.

profile_image_url
string | null

URL of the user's profile image.

profile_banner_url
string | null

URL of the user's profile banner.

followers_count
integer
default:0

Number of followers.

following_count
integer
default:0

Number of accounts this user follows.

tweet_count
integer
default:0

Total number of tweets posted.

listed_count
integer
default:0

Number of lists this user appears on.

favourites_count
integer | null

Number of tweets this user has liked.

media_count
integer | null

Number of media items posted.

verified
boolean
default:false

Whether the user is verified (legacy verification).

verified_type
string | null

Type of verification (e.g., Government, Business).

is_blue_verified
boolean | null

Whether the user has a Twitter Blue/Premium subscription.

created_at_datetime
string | null

Account creation date in ISO 8601 format.

protected
boolean | null

Whether the user's tweets are protected (private).

possibly_sensitive
boolean | null

Whether the user's content may be sensitive.

followed_by
boolean | null

Whether this user follows the authenticated user.

following
boolean | null

Whether the authenticated user follows this user.

can_dm
boolean | null

Whether the authenticated user can send a DM to this user.

professional_type
string | null

Professional account type, if applicable.

pinned_tweet_ids
string[] | null

IDs of the user's pinned tweets.