User Lookup
User Lookup
Retrieve detailed user profiles including follower counts, tweet counts, bio, and verification status for any X user.
GET
/v2/users/:usernameLook up a user by their @username.BASH
curl https://xcrop.io/api/v2/users/elonmusk \ -H "Authorization: Bearer $XCROP_API_KEY"
ResponseJSON
{ "data": { "id": "44196397", "username": "elonmusk", "name": "Elon Musk", "description": "", "followers": 236033705, "following": 1292, "tweets_count": 98496, "listed": 167755, "verified": true, "verified_type": null, "profile_image": "https://pbs.twimg.com/profile_images/...", "created_at": "Tue Jun 02 20:12:29 +0000 2009" }, "meta": { "latency_ms": 2450, "cached": false } }
verified is X’s blue check. verified_type tells you which other badge the account holds: Business for the gold badge an organisation carries, Government for the grey one, and null when there is neither. Worth reading both: X leaves verified false for an organisation that holds the gold badge without a Premium subscription, so checking only verified reports a verified brand as unverified. Both fields appear on every user object, including list owners.
GET
/v2/users/:username/tweetsFetch the posts and quotes a user wrote, with full engagement metrics. Reposts are left out unless you ask for them.| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| count | integer | optional | 20 | Number of tweets to return (up to 1,000; same on every plan, paginate for more) |
| sort | string | optional | latest | Sort: latest, popular, engagement. Invalid values return 400 |
| include_retweets | boolean | optional | false | Include reposts of other accounts. X’s Posts tab carries them (11 of 20 items for @elonmusk when measured), so they are left out by default; meta.removed_retweets counts what was dropped |
| cursor | string | optional | — | Pagination cursor from previous response |