The twitter profile scraper API for X profile data as JSON
Look up an X (Twitter) account by username and get its public profile as JSON. Pass a username to see the counts.
X Profile API at a glance
This API returns one public X (Twitter) profile as JSON. Send a POST request with a username and read the user object from the response. Run the example below to see the exact shape.
- Endpoint
POST /v1/data/twitter/profile- Authentication
- API key as
Authorization: Bearer wh_… - Stage
- Stable
- Output
- A user object with id, username, name, description, counts, a verification flag, join date and location
- Input
- One required field, username, sent without the @ sign. It runs from 1 to 50 characters.
- Counts
- followers_count, following_count, tweet_count, like_count and listed_count, each with a status field
- Image fields
- profile_image_url, profile_banner_url and url come back in the response and are left out of the sample
- Credit weight
- 1. See the pricing page for current rates.
One request, structured JSON.
This request looks up the NASA account. The response below keeps only the main user fields. Copy the request to try it yourself.
curl -X POST "https://api.datablue.dev/v1/data/twitter/profile" \
-H "Authorization: Bearer wh_..." \
-H "Content-Type: application/json" \
-d '{
"username": "nasa"
}'{
"success": true,
"source": "graphql",
"user": {
"id": "11348282",
"username": "NASA",
"name": "NASA",
"description": "Making the seemingly impossible, possible. ✨",
"followers_count": 92191724,
"followers_count_status": "present",
"following_count": 115,
"tweet_count": 74570,
"like_count": 17122,
"listed_count": 96878,
"blue_verified": true,
"created_at": "Wed Dec 19 20:20:32 +0000 2007",
"location": "Pale Blue Dot"
}
}What an X profile returns.
Each profile arrives as one user object with named fields.
Identity
Every profile carries a numeric id and a username. The display name sits in the name field, so store the id beside the username in your own records.
Bio and place
The description field holds the bio text as plain text, and the location field holds a text value instead of a place. NASA returned Pale Blue Dot in our sample, so do not expect a map place.
Audience counts
The response gives followers_count and following_count for the account. It also returns tweet_count, like_count and listed_count. Each count has a status field beside it, and ours all read present in our sample. Check that status before you store a number.
Verification
The blue_verified flag holds true or false, and the NASA account returned true in our sample. Filter on it to split verified accounts from the rest.
Join date
The created_at field holds the account creation time as text, such as Wed Dec 19 20:20:32 +0000 2007 for NASA. Parse it before you compare ages across accounts.
Images and link
The response also includes profile_image_url, profile_banner_url and url fields. We left those links out of the sample above. Call the endpoint to see the live values.
One option that shapes your lookup.
This API takes a single required field. It has no paging options and no filters.
Username
Set username to the handle without the @ sign, and keep the value between 1 and 50 characters. Our example request sends nasa as the username.
Letter case
Our request sent nasa in lowercase letters. The response returned the username as NASA. Read the username from the response for the display form.
Authentication
Send your key in the Authorization header. Prefix the key with the word Bearer. Keep the key out of public browser code.
Scope
This API reads the account level and returns no posts. Use X Posts for the timeline of the same username.
What teams build with it.
Profile counts show how an account grows over time.
Audience tracking
Look up a brand account once a day, then store followers_count with the date to chart growth over time.
Account research
Read description and location for a list of handles. Group the accounts by the topics in each bio.
Verification checks
Read blue_verified before you add an account to a list. Keep the flag beside each row so reviewers see it.
Record enrichment
Match each handle in your CRM to its numeric id. Refresh the row when you need current counts.
Why call an API instead of scraping X profiles yourself.
One request returns one flat user object. Your code reads fields by name and parses no page, and counts arrive as numbers that need no cleanup before charting.
Each count comes with a status field. In our sample every status read present. Store the status beside each number so gaps stand out.
This API covers the account level only. X Posts returns recent posts for a username, while X Post returns one post by its numeric ID. Pick the API that matches the object you track.
Your first profile lookup in a minute.
Sign up, grab a key and look up one account.
Create an account
Sign up to get your API key.
Send a lookup
POST a username to /v1/data/twitter/profile with your Bearer key, and use a brand account while you test.
Read the user object
Read the counts and the bio from the user object. Save followers_count with a date for each run.
Responsible use of X data.
This API covers public X data only. X publishes its own terms of service. Read them before you use the data commercially.
You are responsible for how you use the data, including privacy law in your region. This page gives general information, not legal advice. Review the DataBlue terms of service before you build.
Twitter profile scraper API questions.
Short answers about data and billing before you start.
It turns an X (Twitter) profile lookup into structured JSON. One request returns one user object for that username.
Still have a question?Ask us anything
Send a POST request to /v1/data/twitter/profile with a Bearer token. Put the username in the JSON body.
It returns the id and the bio for the account, and counts for followers and posts come back as numbers. Compare the fields with the sample response above.
Send the handle without the @ sign. The value runs from 1 to 50 characters.
The response includes profile_image_url and profile_banner_url fields. The sample above leaves both fields out.
No, this API returns the account only. Use X Posts for recent posts from the same username.
This API covers public profile data only. Send the handle of a public account.
Run the lookup daily and store followers_count with a date. Chart the stored rows to see growth.
This API is marked stable in our catalogue today. Build against the documented fields, then check the changelog before each upgrade you ship to production.
This API has a credit weight of 1. Check the pricing page for current rates.
Look up an X profile in a minute.
Create an account and copy your key. Then run the request with a brand handle you follow.
Start free
