X: Get Public Profile by Username

View all X (Twitter) Public Data API endpoints →

Resolve a public X (Twitter) handle with required screenname, without the @ prefix. Optional rest_id is the numeric account ID and takes precedence over screenname; screenname remains required by the request schema. An observed successful response has status=active, profile, rest_id, id, name, desc, website, avatar, header_image, location, created_at, protected, blue_verified and verification_type. Account counters include sub_count (followers), friends (following), statuses_count and media_count; affiliates and business_account may also be present. A nonexistent handle returned status=notfound with null identity and count fields, rather than a profile or numeric zero. Preserve IDs as strings, allow nullable fields and store the collection time with changing public counters. Verification labels are platform metadata, not proof of identity or ownership.

API Features

Handle-to-ID resolution The observed active profile includes profile, rest_id and id, supporting stable string-ID joins from a supplied username.
Public profile attributes Names, biographies, websites, images and account metadata can enrich a handle record; missing values must remain null.
Follower and activity counters Read sub_count, friends, statuses_count and media_count as time-dependent public snapshots, not private account analytics.
Explicit missing-profile status The verified negative lookup returns status=notfound with null identity fields, distinct from an active account with zero activity.

Live API Demo

GET /api/project/twitter/user-info

API Response (JSON)

{}
curl -X GET 'https://api.opendata-api.com/api/project/twitter/user-info?key=<API_KEY>&screenname=NASA'
📢
Need Help?
If you encounter API issues or need other API requirements, please contact us.
Contact Us

Use Cases

Frequently asked questions

How do I turn a Twitter username into a user ID?

Call user-info with required screenname without the @ prefix. An observed active profile includes rest_id and id; preserve them as strings. Optional rest_id takes precedence over screenname, but the request schema still requires screenname.

What should I do when a profile has status=notfound?

Treat it as an unavailable handle rather than a profile with zero activity. The verified notfound response has null identity and count fields. Preserve those nulls and correct or review the input before requesting an account timeline.

Related operations

Guides

View Subscription Plans →