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"
}Get user profile
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"
}π€ 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.
Username (choose one with rest_id), obtainable from the user profile URL For example: https://twitter.com/elonmusk β the username is elonmusk
"elonmusk"
User ID (choose one with screen_name)
"44196397"
The response is of type object.