X response objects
Every object the X endpoints return, field by field, named after X's API v2. Every key is there on every call: a field the platform does not show is null, and a list is empty.
x_user
An X account. Returned by x/profile, x/retweeters, x/followers, x/search.
| Field | What it is |
|---|---|
id | X's numeric id for the account. |
username | Without the @. |
name | The display name. |
description | The bio. |
location | As they wrote it. |
url | The link in their profile, unshortened, as X's API names it. |
profile_url | The account on X. |
profile_image_url | The profile picture, at full size. |
profile_banner_url | The header image above the profile. |
created_at | When the account was made. |
verified | Whether it has a checkmark, of any kind. |
protected | Whether its posts are private. |
public_metrics | The counts on the profile. null where the source does not give one. |
public_metrics.followers_count | How many accounts follow them. |
public_metrics.following_count | How many accounts they follow. |
public_metrics.tweet_count | Posts, replies and reposts together, as X counts them. |
public_metrics.listed_count | How many lists include them. |
public_metrics.like_count | Posts they have liked. |
public_metrics.media_count | Posts with photos or videos. |
pinned_tweet_id | The id of the post pinned to the profile. null where there is none, or the source does not say. |
x_post
| Field | What it is |
|---|---|
id | X's id for the post. |
url | The post on X. |
text | The whole text. Links stay as X shortens them. |
created_at | When it was posted. null when the source does not say. |
lang | The language X detected, e.g. en. |
author | Who posted it. |
author.id | X's numeric id for the account. |
author.username | Without the @. |
author.name | The display name. |
author.profile_url | The account on X. |
author.profile_image_url | The profile picture, at full size. |
author.verified | Whether the account has a checkmark. |
conversation_id | The first post of the thread it belongs to. |
referenced_tweets | The post it replies to, quotes or reposts, as X's API names them. |
referenced_tweets[].type | How this post refers to it: a reply, a quote or a repost. replied_to · quoted · retweeted |
referenced_tweets[].id | X's id for that post. |
public_metrics | null where the source does not give one. |
public_metrics.retweet_count | Reposts. |
public_metrics.reply_count | Replies. |
public_metrics.like_count | Likes. |
public_metrics.quote_count | Quotes. |
public_metrics.bookmark_count | Bookmarks. |
public_metrics.impression_count | Views. |
media | Photos and videos, in order. |
media[].type | null where the source does not say.photo · video · animated_gif |
media[].url | The image, or a video's preview image. |
hashtags | Without the #. |
mentions | Usernames, without the @. |
x_community
An X community. Returned by x/community.
| Field | What it is |
|---|---|
id | X's id for the community. |
url | The community on X. |
name | The community's name. |
description | What it is about, in its own words. |
member_count | How many members it has. |
created_at | When the community was made. |
join_policy | As X names it: "Open" or "Closed". |
rules | Its rules, in order. |
rules[].name | The rule's title. |
rules[].description | More about the rule. null where it has none. |
creator_username | Who made it. |