---
title: "User Info by ID"
method: GET
path: "/user/info_by_id"
tags: ["User Reads"]
---

# User Info by ID

`GET /user/info_by_id`

## Request

- Base URL: `https://api.twitterapis.com/twitter`
- URL: `https://api.twitterapis.com/twitter/user/info_by_id`
- Auth: HTTP bearer

Resolve a numeric user ID into the full user object. Use this when you already have the stable ID (handles can change, IDs do not). Cost: $0.0008 per call.

## Query parameters

- `user_id` string, required: Numeric ID of the user.
- `fields` string
- `compact` '1'

## Response `200`

Fetch a full profile by numeric user ID.

- object
  - `user` User: A Twitter/X user profile.
    - `id` string: Numeric user ID as a string.
    - `username` string: Handle without the leading @.
    - `name` string: Display name.
    - `verified` boolean: Whether the account is legacy-verified.
    - `is_blue_verified` boolean: Whether the account carries the Verified (Blue) badge.
    - `verified_type` string, nullable: Verification type, for example Business or Government, when applicable; null otherwise.
    - `followers_count` integer: Follower count.
    - `following_count` integer: Following count.
    - `tweet_count` integer: Number of tweets the account has posted.
    - `favourites_count` integer: Number of tweets the account has liked.
    - `media_count` integer: Number of media items the account has posted.
    - `description` string: Profile bio text.
    - `location` string: Self-reported location.
    - `url` string: Linked website URL from the profile, when set.
    - `created_at` string: Account creation timestamp in Twitter date format.
    - `profile_image_url` string: Avatar image URL.
    - `cover_picture` string: Profile banner/cover image URL, when set.
    - `listed_count` integer, nullable: Number of public lists the account appears on.
    - `can_dm` boolean, nullable: Whether the account accepts direct messages. Currently null on profile lookups (user/info, user/search) and on tweet authors: X no longer includes DM permission in those payloads. The key stays so it fills again if X restores it. For a real answer between two accounts, use can_dm on /twitter/user/check_follow_relationship.
    - `parody_commentary_fan_label` string, nullable: X's parody / commentary / fan account label, when the account is marked as one; null when it carries no such label.
    - `creator_subscriptions_enabled` boolean, nullable: True when the account sells X Subscriptions to its followers; null when X does not say.
    - `can_media_tag` boolean, nullable: Whether other accounts are permitted to tag this account in media; null when X does not report the media-tag permission.
    - `has_custom_timelines` boolean, nullable: Whether the account has created custom timelines.
    - `is_translator` boolean, nullable: Whether the account is a Twitter/X translator.
    - `possibly_sensitive` boolean, nullable: Whether the account is flagged as possibly posting sensitive media.
    - `default_profile` boolean, nullable: True when the account still uses the default profile theme.
    - `default_profile_image` boolean, nullable: True when the account still uses the default avatar.
    - `professional_type` string, nullable: Professional account type when set, for example "Creator" or "Business"; null otherwise.
    - `profile_bio` object, nullable: Structured bio with entity ranges, when present.
      - `description` string, nullable: The bio text.
      - `entities` object, nullable: Mention/URL entity ranges within the bio, when present.
    - `affiliate_label` object, nullable: Parent-organization/affiliate badge shown on the profile, when present.
      - `description` string, nullable: The affiliate/parent-org label text.
      - `badge_url` string, nullable: Badge image URL.
      - `url` string, nullable: Link the badge points to.
    - `pinned_tweet_ids` string[]: Numeric IDs (as strings) of the account's pinned tweet(s); empty array when the account has none pinned or when a trimmed user object omits the block.
    - `protected` boolean, nullable: Whether the account is protected (locked); null on a trimmed user object that carries no protected flag.
    - `type` string, nullable: The user result __typename, for example "User" or "UserUnavailable"; null when absent.
    - `is_automated` boolean, nullable: True when the profile carries X's automated-account label, which is how an account declares itself a bot. Null when no such label is on the profile. This field is never set to false by inference, so null means only that X did not label the account, never that a human runs it. Null on every account sampled so far, including accounts that are plainly automated.
    - `automated_by` string, nullable: Handle of the account that manages this automated account, read from the link on the automated label. Null unless is_automated is true and that label carries a single-segment x.com or twitter.com profile link. Null on every account sampled so far.
    - `unavailable` boolean, nullable: True when X reports the account as unavailable, for example suspended or withheld. False when X returns an ordinary account result. Null on a trimmed user object that reports no account type at all. It is derived from the same value as type, so the two can never disagree: a type of UserUnavailable always gives true.
    - `unavailable_message` string, nullable: The message X returns explaining why the account is unavailable, for example the text shown in place of the profile. Null when the account is available or when X sends no message.
    - `unavailable_reason` string, nullable: The short reason code X returns for an unavailable account, for example Suspended. Null when the account is available or when X sends no reason.
    - `withheld_in_countries` string[], nullable: ISO country codes in which X withholds this account. The empty array and null mean different things and the difference is legally relevant if you republish profiles: an empty array is X stating the account is withheld nowhere, while null is X not telling us. Do not read null as "not withheld". Null on every account today, because the block this is read from is one X no longer sends; the read is kept so the field fills in on its own if X restores it.

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `402`: Insufficient credits
- `403`: Forbidden
- `404`: Not found
- `429`: Rate limited
- `5XX`: Server error

---

[API](https://skmtc.dev/twitterapis/apis/twitterapis-api.md) · [All operations](https://skmtc.dev/twitterapis/apis/twitterapis-api/llms.txt) · [OpenAPI document](https://skmtc.dev/twitterapis/apis/twitterapis-api/revisions/a33ce0fedb3c?raw)
