Get a public X profile

GET /v1/x/users/{user}

Returns one account's profile: name, bio, counters, pinned posts, and whether it is protected. A protected account's profile is public on X, so it is returned; its posts are not. 404 when the account does not exist, is suspended, or is withheld in the country Weir reads from (X sends only a blank stub there). When X says the account is suspended, the 404 says so: details.reason is suspended. A 404 costs nothing. Profiles are cached for up to 30 minutes, so the counters can trail x.com by that much.

Price: 1 credit per call, plus 2 credits per X profile returned. Failed and refused calls cost nothing.

Rate limit: Counts as 1 request against your per-minute rate limit.

MCP tool: get_x_user, on every MCP connection.

Requires an API key, sent as Authorization: Bearer <key>.

Request

curl --request GET \
  --url https://api.weirapp.io/v1/x/users/USER \
  --header "Authorization: Bearer $WEIR_API_KEY"

Path parameters

Field Type Required Notes
user string yes A username, with or without the @, or a numeric account id. An all-digit value is read as an id. · matches ^@?[A-Za-z0-9_]{1,50}$

Response

An X profile, in X's own field names.

200

Field Type Required Notes
data object yes
data.id string yes
data.username string yes Handle without the @ prefix.
data.name string yes Display name.
data.description string or null yes
data.url string yes
data.profileImageUrl string or null yes
data.profileBannerUrl string or null yes
data.location string or null yes
data.verified boolean yes
data.followersCount integer yes min 0
data.followingCount integer yes min 0
data.statusesCount integer yes Posts published. · min 0
data.likeCount integer yes min 0
data.createdAt string (date-time) yes
data.pinnedPostIds array of string yes Ids of the posts pinned to the top of the profile, usually zero or one.
data.protected boolean yes True when only approved followers can see this account's posts. Its posts, replies, media, and relationship lists are then not available through this API.
meta object yes
meta.requestId string yes
meta.nextCursor string or null no

Errors

Status Meaning What to do
400 The request failed validation. The request was malformed. The details object names the field.
401 The API key is missing, malformed, expired, or revoked. The key is missing, malformed, revoked, or expired.
402 The account is out of credits. Not retryable. The message names the day free credits return and the price of the smallest pack; details carries buyUrl, smallestPack and freeCreditsRenewAt. Out of credits. Never retry. It clears in two ways only: the month's free credits return on the 1st (UTC), or a person adds credits at https://weirapp.io/buy (from $5). Retrying never works.
403 The API key does not carry the scope this route requires. The key is valid but lacks the scope this operation needs.
404 The requested resource does not exist. No such resource, or it is not public.
429 The per-minute rate limit is exhausted. Retryable: wait for Retry-After and try again. Rate limited. Retryable: wait for Retry-After, then try again.
500 An unexpected error occurred. Something failed on our side. Retryable with backoff.
503 The source is busy or temporarily unavailable. Retryable: wait for Retry-After and try again. A source was busy or unreachable. Retryable: wait for Retry-After, then try again.

View this page as Markdown