Skip to content
ScrapeField

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.

Fields
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.

x_post

A post on X: a post, a reply or a quote. Returned by x/posts, x/post, x/replies, x/search.

Fields
FieldWhat it is
id
string
X's id for the post.
url
URL
The post on X.
text
string · or null
The whole text. Links stay as X shortens them.
created_at
time, ISO 8601 UTC · or null
When it was posted. null when the source does not say.
lang
string · or null
The language X detected, e.g. en.
author
object
Who posted it.
author.id
string · or null
X's numeric id for the account.
author.username
string
Without the @.
author.name
string · or null
The display name.
author.profile_url
URL
The account on X.
author.profile_image_url
URL · or null
The profile picture, at full size.
author.verified
boolean · or null
Whether the account has a checkmark.
conversation_id
string · or null
The first post of the thread it belongs to.
referenced_tweets
array of objects
The post it replies to, quotes or reposts, as X's API names them.
referenced_tweets[].type
string, one of
How this post refers to it: a reply, a quote or a repost.
replied_to · quoted · retweeted
referenced_tweets[].id
string
X's id for that post.
public_metrics
object
null where the source does not give one.
public_metrics.retweet_count
integer · or null
Reposts.
public_metrics.reply_count
integer · or null
Replies.
public_metrics.like_count
integer · or null
Likes.
public_metrics.quote_count
integer · or null
Quotes.
public_metrics.bookmark_count
integer · or null
Bookmarks.
public_metrics.impression_count
integer · or null
Views.
media
array of objects
Photos and videos, in order.
media[].type
string, one of · or null
null where the source does not say.
photo · video · animated_gif
media[].url
URL
The image, or a video's preview image.
hashtags
array of strings
Without the #.
mentions
array of strings
Usernames, without the @.

x_community

An X community. Returned by x/community.

Fields
FieldWhat it is
id
string
X's id for the community.
url
URL
The community on X.
name
string
The community's name.
description
string · or null
What it is about, in its own words.
member_count
integer · or null
How many members it has.
created_at
time, ISO 8601 UTC · or null
When the community was made.
join_policy
string · or null
As X names it: "Open" or "Closed".
rules
array of objects
Its rules, in order.
rules[].name
string
The rule's title.
rules[].description
string · or null
More about the rule. null where it has none.
creator_username
string · or null
Who made it.