The X Profile Info API returns public profile data from x.com (formerly Twitter). Pass a username, @handle, or profile URL and receive structured JSON with bio, follower counts, verification status, and avatar URLs.
X profile pages require browser rendering to load JSON-LD profile data and timeline markup.
X Search is not supported: search results are not rendered as parseable HTML.
GET https://api.piloterr.com/v2/x/profile/info?query=elonmusk
Or with a profile URL:
GET https://api.piloterr.com/v2/x/profile/info?query=https://x.com/elonmusk
Via POST:
POST https://api.piloterr.com/v2/x/profile/info
Content-Type: application/json
{"query": "@elonmusk", "return_page_source": false}
| Parameter |
Type |
Required |
Description |
query |
string |
yes |
Username, @handle, or profile URL on x.com / twitter.com |
return_page_source |
boolean |
no |
Return raw HTML as {"result": "..."} (default: false) |
| Format |
Example |
| Username |
elonmusk |
| Handle |
@elonmusk |
| Profile URL |
https://x.com/elonmusk |
| Legacy domain |
https://twitter.com/elonmusk |
Rejected (400): search URLs, status URLs, invalid handles.
| Field |
Type |
Always present |
Description |
user_id |
string |
yes |
Numeric X user ID |
username |
string |
yes |
Handle without @ |
name |
string |
yes |
Display name |
description |
string | null |
no |
Bio text |
url |
string |
yes |
Canonical profile URL |
created_at |
string | null |
no |
Account creation date (ISO 8601) |
location |
string | null |
no |
Location label |
verified |
boolean |
yes |
Verified badge |
followers_count |
integer | null |
no |
Follower count |
following_count |
integer | null |
no |
Following count |
tweet_count |
integer | null |
no |
Post count |
profile_image_url |
string | null |
no |
Avatar URL (400×400) |
profile_image_url_normal |
string | null |
no |
Avatar URL (normal size) |
profile_banner_url |
string | null |
no |
Profile banner URL |
Parsed from JSON-LD ProfilePage and banner preload tags in the rendered HTML.
| Code |
Meaning |
400 |
Missing or invalid query |
404 |
X error page, unrendered content, or profile not found |
500 |
Rendering or parsing error |
- Accepted domains:
x.com, twitter.com.
- Costs 2 credits per call (browser rendering, ~8s wait).
- Use X Post Info to fetch individual tweet data from a status URL.
- Social listening: monitor follower counts and profile metadata
- Lead enrichment: resolve X handles to user IDs and bios
- Influencer research: collect verification status and audience size
- Account verification: confirm a handle exists and is active