X API endpoint
Returns the public profile of an X account by `username`, with or without a leading `@`: name, description, location, avatar and banner images, creation date, verification flags, and `metrics` for followers, following, posts, likes, listed and media. `verified_type` and `affiliate_label` appear only when the account has them. Returns 404 when the profile is not public.
/x/profile/{username}MCP tool: x_profile
Path parameters:
username: required. X username, with or without a leading @.Notable response behavior:
verified_type distinguishes the flavor of the checkmark (e.g. Business, Government) and is only present for gold/grey verified accounts; ordinary blue-verified accounts omit it.affiliate_label is the small highlighted-affiliation badge X shows next to the display name (e.g. Prime Video) and is only present when the account has one.| Field | In the sample | Value in the sample |
|---|---|---|
| id | Has a value | |
| username | Has a value | |
| name | Has a value | |
| url | Has a value | x.com |
| avatar_url | Has a value | pbs.twimg.com |
| banner_url | Has a value | pbs.twimg.com |
| is_blue_verified | Has a value | true |
| description | Has a value | 130 characters |
| external_url | Has a value | openai.com |
| verified_type | Has a value | |
| affiliate_label | Has a value | 130 characters |
| created_at | Has a value | 2015-12-06 |
| metrics.followers | Has a value | 5,430,397 |
| metrics.following | Has a value | 4 |
| metrics.posts | Has a value | 2,179 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| username (path) | string | Yes | X username | Ansel_Flipradio | |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/x/profile/Ansel_Flipradio" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"id": "1634026666518519808",
"username": "Ansel_Flipradio",
"name": "Fear_Nation_世界苦茶",
"url": "https://x.com/Ansel_Flipradio",
"avatar_url": "https://pbs.twimg.com/profile_images/example_normal.jpg",
"banner_url": "https://pbs.twimg.com/profile_banners/example/banner",
"is_blue_verified": true,
"verified_type": "Business",
"affiliate_label": "Prime Video",
"description": "Public profile description",
"external_url": "https://example.com",
"metrics": {
"followers": 39608,
"following": 188,
"posts": 5498
}
}
}Request schema
No body schema
Response schema
#/definitions/x.profileResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | x.Profile | No | ||||
| data.affiliate_label | string | No | AffiliateLabel is the small highlighted-affiliation badge X shows next to the display name (e.g. "Prime Video" for an account run on behalf of that brand). Distinct from VerifiedType; empty when the account has no highlighted affiliation. | |||
| data.avatar_url | string | No | ||||
| data.banner_url | string | No | ||||
| data.bio_urls | array | No | BioURLs are links written inside the bio, expanded from their t.co form. Distinct from ExternalURL, which is the single profile-header link. | |||
| data.created_at | string | No | ||||
| data.description | string | No | ||||
| data.email | string | No | Email is an address the account self-published in its own bio text. It is only ever extracted, never inferred or de-obfuscated. Empty for the vast majority of profiles. | |||
| data.external_url | string | No | ||||
| data.id | string | No | ||||
| data.is_blue_verified | boolean | No | ||||
| data.is_default_profile_image | boolean | No | IsDefaultProfileImage marks accounts still on the placeholder avatar -- a strong shell/abandoned-account signal. | |||
| data.is_protected | boolean | No | ||||
| data.is_unavailable | boolean | No | ||||
| data.location | string | No | ||||
| data.metrics | x.ProfileMetrics | No | ||||
| data.metrics.followers | integer | No | ||||
| data.metrics.following | integer | No | ||||
| data.metrics.likes | integer | No | ||||
| data.metrics.listed | integer | No | Listed is how many curated lists include this account -- the best authority proxy in the payload. Media/Likes are activity signals. Only the syndication source populates these; the x.com page parser leaves them zero. | |||
| data.metrics.media | integer | No | ||||
| data.metrics.posts | integer | No | ||||
| data.name | string | No | ||||
| data.url | string | No | ||||
| data.username | string | No | ||||
| data.verified_type | string | No | VerifiedType distinguishes the flavour of verification (e.g. "Business", "Government"); empty for ordinary/blue accounts. | |||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Missing or invalid parameters | #/definitions/app.Response |
| 404 | Profile not found | #/definitions/app.Response |
| 503 | Upstream error or parser drift | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/x/profile/Ansel_Flipradio" \
-H "x-api-key: $CRAWLORA_API_KEY"