Single user by username

GET https://api.twitter.com/labs/2/users/by/username/:username

This endpoint returns information about users. You can specify users by their ID or username.

For full details, see the API reference for this endpoint.

Request Params

KeyDatatypeRequiredDescription
expansionsnullpinned_tweet_id
tweet.fieldsnullattachments,author_id,created_at,entities,geo,id,in_reply_to_user_id,lang,possibly_sensitive,public_metrics,referenced_tweets,source,text,withheld
media.fieldsnullduration_ms,height,media_key,preview_image_url,type,url,width
poll.fieldsnullduration_minutes,end_datetime,id,options,voting_status
place.fieldsnullcontained_within,country,country_code,full_name,geo,id,name,place_type
user.fieldsnullcreated_at,description,entities,id,location,name,pinned_tweet_id,profile_image_url,protected,public_metrics,url,username,verified,withheld

RESPONSES

status: OK

{"data":[{"id":"2244994945","created_at":"2013-12-14T04:35:55.000Z","name":"Twitter Dev","username":"TwitterDev","protected":false,"verified":true,"profile_image_url":"https://pbs.twimg.com/profile_images/880136122604507136/xHrnqf1T_normal.jpg","format":"compact"}]}