Skip to main content
GET
/
v1
/
twitter
/
UserByScreenName
cURL
curl --request GET \
  --url 'https://api.keyapi.ai/v1/twitter/UserByScreenName?username=elonmusk' \
  --header 'Authorization: Bearer <YOUR_API_KEY>'
{
  "code": 0,
  "message": "success",
  "data": {
    "data": {
      "user": {
        "result": {
          "__typename": "User",
          "affiliates_highlighted_label": {
            "label": {
              "badge": {
                "url": "https://pbs.twimg.com/profile_images/1955359038532653056/OSHY3ewP_bigger.jpg"
              },
              "description": "X",
              "url": {
                "url": "https://twitter.com/X",
                "urlType": "DeepLink"
              },
              "userLabelDisplayType": "Badge",
              "userLabelType": "BusinessLabel"
            }
          },
          "business_account": {},
          "has_graduated_access": true,
          "has_nft_avatar": false,
          "id": "VXNlcjo0NDE5NjM5Nw==",
          "is_blue_verified": true,
          "is_profile_translatable": false,
          "legacy": {
            "blocked_by": false,
            "blocking": false,
            "can_dm": false,
            "can_media_tag": false,
            "created_at": "Tue Jun 02 20:12:29 +0000 2009",
            "default_profile": false,
            "default_profile_image": false,
            "description": "https://t.co/dDtDyVssfm",
            "entities": {
              "description": {
                "urls": [
                  {
                    "display_url": "Terafab.ai",
                    "expanded_url": "http://Terafab.ai",
                    "indices": [
                      0,
                      23
                    ],
                    "url": "https://t.co/dDtDyVssfm"
                  }
                ]
              }
            },
            "fast_followers_count": 0,
            "favourites_count": 225074,
            "follow_request_sent": false,
            "followed_by": false,
            "followers_count": 239694411,
            "following": false,
            "friends_count": 1319,
            "has_custom_timelines": true,
            "is_translator": false,
            "listed_count": 168630,
            "location": "",
            "media_count": 4467,
            "muting": false,
            "name": "Elon Musk",
            "needs_phone_verification": false,
            "normal_followers_count": 239694411,
            "notifications": false,
            "possibly_sensitive": false,
            "profile_banner_url": "https://pbs.twimg.com/profile_banners/44196397/1774145451",
            "profile_image_url_https": "https://pbs.twimg.com/profile_images/2035314704307081216/71U1ftM3_normal.jpg",
            "profile_interstitial_type": "",
            "protected": false,
            "screen_name": "elonmusk",
            "statuses_count": 101980,
            "time_zone": "",
            "translator_type": "none",
            "url": "",
            "utc_offset": 0,
            "verified": false,
            "want_retweets": false,
            "withheld_description": "",
            "withheld_scope": ""
          },
          "legacy_extended_profile": {},
          "professional": {
            "category": [],
            "professional_type": "Creator",
            "rest_id": "1679729435447275522"
          },
          "profile_image_shape": "Circle",
          "rest_id": "44196397",
          "smart_blocked_by": false,
          "smart_blocking": false,
          "super_follow_eligible": true,
          "super_followed_by": false,
          "super_following": false,
          "verification_info": {
            "reason": {
              "description": {
                "entities": [
                  {
                    "from_index": 54,
                    "ref": {
                      "url": "https://twitter.com/X",
                      "url_type": "ExternalUrl"
                    },
                    "to_index": 56
                  },
                  {
                    "from_index": 63,
                    "ref": {
                      "url": "https://help.twitter.com/en/rules-and-policies/profile-labels",
                      "url_type": "ExternalUrl"
                    },
                    "to_index": 73
                  }
                ],
                "text": "This account is verified because it's an affiliate of @X on X. Learn more"
              }
            }
          }
        }
      }
    }
  },
  "requestId": "da567eb8-2e2f-44b7-964e-65f6763264df"
}

Documentation Index

Fetch the complete documentation index at: https://docs.keyapi.ai/llms.txt

Use this file to discover all available pages before exploring further.

πŸͺ™1 creditper request

Copy for AI

πŸ€– Why Code When AI Can Do It For You?

Stop writing code like it’s 1970! Let AI do the heavy lifting - click the sparkles to copy a perfectly formatted prompt for ChatGPT, Claude, or your favorite AI assistant.

Authorizations

Authorization
string
header
required

API key for authentication. Format: sk_live_xxxxxxxxxxxxx Get your API key from the Dashboard.

Query Parameters

username
string
required

Username

Example:

"elonmusk"

Response

The response is of type object.