Skip to content
ScrapeField

Get an X profile

Fetch an X account: username, name, description, location, the link in the profile, verified, created_at, and public_metrics (followers_count, following_count, tweet_count and more) — named as in X's own API v2. Use this to size an account or enrich a handle.

3credits
GEThttps://api.scrapefield.com/v1/x/profile
Try itno key needed3 credits on a real call · 0 here
https://api.scrapefield.com/v1/x/profile?username=Ferrari

In your code

const params = new URLSearchParams({
  "username": "nasa"
});

const res = await fetch(`https://api.scrapefield.com/v1/x/profile?${params}`, {
  headers: { Authorization: `Bearer ${process.env.SCRAPEFIELD_KEY}` },
});

const { data, meta } = await res.json();
console.log(data, meta.credits_charged);

Parameters

ParameterWhat it does
username
string · one of the account ids
The username, without the @.
url
string · one of the account ids
The profile URL, on x.com or twitter.com.
fresh
boolean
Skip the cache and fetch now. Charged normally. Not available on trial credits — buy any pack to unlock it.
default false

Response

Returns one x_user. This is the demo’s answer, the one the playground above returns, in full rather than abbreviated — including the fields that come back null, because a field is null when the platform does not show it and you should know which ones those are before you build on them. A call with your key returns the account you ask for.

{
  "data": {
    "id": "850244031139721378",
    "username": "bluedoorcoffee",
    "name": "Bluedoorcoffee",
    "description": "Documenting small kitchens and the people in them.",
    "location": "Copenhagen, United States",
    "url": null,
    "profile_url": "https://x.com/bluedoorcoffee",
    "profile_image_url": "https://cdn.example/x/r76YgIRNQzq9.jpg",
    "profile_banner_url": "https://cdn.example/x/banner/dN3BJ0fxwI6Q.jpg",
    "created_at": "2024-04-18T19:17:31.000Z",
    "verified": true,
    "protected": false,
    "public_metrics": {
      "followers_count": 890058,
      "following_count": 385,
      "tweet_count": 4684,
      "listed_count": 543,
      "like_count": 7515,
      "media_count": 1575
    },
    "pinned_tweet_id": null
  },
  "meta": {
    "request_id": "req_7f3ac1e94b2d40f8a1c6e5d2",
    "credits_charged": 3,
    "credits_remaining": 74218,
    "cached": false,
    "fetched_at": "2026-09-20T09:12:03Z",
    "next_cursor": null
  }
}

Fields of x_user

An X account. Named after X's API v2.

FieldWhat it is
id
string
X's numeric id for the account.
username
string
Without the @.
name
string · or null
The display name.
description
string · or null
The bio.
location
string · or null
As they wrote it.
url
URL · or null
The link in their profile, unshortened, as X's API names it.
profile_url
URL
The account on X.
profile_image_url
URL · or null
The profile picture, at full size.
profile_banner_url
URL · or null
The header image above the profile.
created_at
time, ISO 8601 UTC · or null
When the account was made.
verified
boolean · or null
Whether it has a checkmark, of any kind.
protected
boolean · or null
Whether its posts are private.
public_metrics
object
The counts on the profile. null where the source does not give one.
public_metrics.followers_count
integer · or null
How many accounts follow them.
public_metrics.following_count
integer · or null
How many accounts they follow.
public_metrics.tweet_count
integer · or null
Posts, replies and reposts together, as X counts them.
public_metrics.listed_count
integer · or null
How many lists include them.
public_metrics.like_count
integer · or null
Posts they have liked.
public_metrics.media_count
integer · or null
Posts with photos or videos.
pinned_tweet_id
string · or null
The id of the post pinned to the profile. null where there is none, or the source does not say.

What it costs

3 credits per successful call, whether we fetch it or serve it from cache — you pay for the answer, not for how we produced it. Responses are cached for 12 hours and a cached one tells you when the data was actually fetched. A call we fail costs 0 and is refunded automatically.

On the smallest pack that is $2.34 per 1,000 calls; on the largest, $1.32. The full table.

What people build with it

Questions

How much does the X (Twitter) profile API cost?

3 credits a call: $2.34 per 1,000 calls on the smallest pack and $1.32 on the largest. A call that fails costs nothing, and the refund is automatic. A cached answer costs the same as a fresh one. Credits are bought in packs and never expire; there is no subscription.

Do I need a X account, a login or cookies?

No. You need a key from us and nothing from X. We never take a customer's login, cookies or session, at any price, and no account of yours is ever at risk.

Can I try it without signing up?

Yes. Add demo=true and leave the key out, or press Send request in the playground on this page. The demo answers with a real answer about Ferrari, captured once a week, in exactly the shape a live call returns, whatever you ask, and charges nothing.

How fresh is the data?

An answer is kept for up to 12 hours, and a cached one says when it was fetched, in meta.fetched_at. Add fresh=true to fetch it again now, at the same price; it needs any purchase, not the trial.

What does it return?

One x_user object. Its fields are named after X's API v2. A field is null when X does not show it, never missing. Every field is described on this page.

Can an AI agent call it?

Yes: it is the MCP tool get_x_profile on our MCP server, with the same parameters, answer and price. Without a key, the tool answers from the demo.