Skip to main content
GET
/
v1
/
twitter
/
fetch_user_profile
cURL
curl --request GET \
  --url 'https://api.keyapi.ai/v1/twitter/fetch_user_profile?screen_name=elonmusk&rest_id=44196397' \
  --header 'Authorization: Bearer <YOUR_API_KEY>'
{
  "code": 0,
  "message": "success",
  "data": {
    "status": "active",
    "profile": "elonmusk",
    "rest_id": "44196397",
    "blue_verified": true,
    "verification_type": null,
    "affiliates": {
      "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": [],
    "avatar": "https://pbs.twimg.com/profile_images/2008546467615580160/57KcqsTA_normal.jpg",
    "header_image": "https://pbs.twimg.com/profile_banners/44196397/1739948056",
    "desc": "",
    "name": "Elon Musk",
    "protected": null,
    "location": null,
    "friends": 1292,
    "sub_count": 236275320,
    "statuses_count": 98779,
    "media_count": 4388,
    "pinned_tweet_ids_str": [
      "2030159267689632121"
    ],
    "created_at": "Tue Jun 02 20:12:29 +0000 2009",
    "id": "44196397"
  },
  "requestId": "cf83b059-2fe8-4db6-8ce6-6f13237a0ca6"
}
πŸͺ™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

screen_name
string

Username (choose one with rest_id), obtainable from the user profile URL For example: https://twitter.com/elonmusk β€” the username is elonmusk

Example:

"elonmusk"

rest_id
string

User ID (choose one with screen_name)

Example:

"44196397"

Response

The response is of type object.