Introduction

The lookup by ID endpoints return data you can use to build experiences to display Spaces information to your users, or return details about one or more Spaces. You can lookup one or more Spaces in the same request.

You can also lookup Spaces by their creator ID. This endpoint is useful to lookup Spaces from users in a list, or to determine if multiple recurring hosts are live now or have an upcoming Space scheduled. Up to 100 users can be looked up in a single request.

Account setup

To access these endpoints, you will need:

Learn more about getting access to the X API v2 endpoints in our getting started guide.

Getting started with the Spaces lookup endpoints

This quick start guide will help you make your first request to one of the Spaces lookup endpoints with a set of specified fields using Postman.

If you would like to see sample code in different programming languages, please visit our X API v2 sample code GitHub repository.

Prerequisites

To complete this guide, you will need to have a set of keys and tokens to authenticate your request. You can generate these keys and tokens by following these steps:

  • Sign up for a developer account and receive approval.
  • Create a Project and an associated developer App in the developer portal.
  • Navigate to your App’s “Keys and tokens” page to generate the required credentials. Make sure to save all credentials in a secure location.

Steps to build a Spaces lookup request

_For this example, we will make a request to the user Spaces lookup by creator ID endpoint, but you can apply the learnings from this quick start to other lookup requests as well. _

Step one: Start with a tool or library

There are several different tools, code examples, and libraries that you can use to make a request to this endpoint, but we are going to use the Postman tool here to simplify the process.

To load X API v2 Postman collection into your environment, please click on the following button:

Once you have the X API v2 collection loaded in Postman, navigate to the Spaces folder and find the “Lookup Spaces created by one or more users” request.  

Step two: Authenticate your request

To properly make a request to the X API, you need to verify that you have permission. To do so, this endpoint requires you to authenticate your request with either OAuth 2.0 App-Only or OAuth 2.0 Authorization Code with PKCE authentication methods.

For simplicity’s sake, we will utilize OAuth 2.0 App-Only with this request, but you will need to use one of the other authentication methods if you’d like to request private metrics or Spaces from a private user. 

To utilize OAuth 2.0 App-Only, you must add your keys and tokens, specifically the App Access Token (also known as the App-only Bearer Token) to Postman. You can do this by selecting the environment named “X API v2” in the top-right corner of Postman and adding your keys and tokens to the “initial value” and “current value” fields (by clicking the eye icon next to the environment dropdown).

These variables will automatically be pulled into the request’s authorization tab if you’ve done this correctly.  

Step three: Identify and specify which user from which you would like to retrieve Posts

You must specify a user you would like to retrieve live or upcoming Spaces for within the request. In this example, we will be passing a single user ID.

User IDs are simply the numerical value that represents an account handle that you can find within an account’s profile URL. For example, the following account’s username is XDevelopers.

https://x.com/XDevelopers

To convert this username to the user ID, you will have to use the user lookup endpoint with the username and find the numerical user ID in the payload. In the case of @XDevelopers, the user ID is 2244994945.

In Postman, navigate to the “Params” tab and enter this user ID into the “Value” column of the id parameter.

KeyValue
id2244994945

Step four: Identify and specify which fields you would like to retrieve

If you click the “Send” button after step three, you will receive an id, which is the only Space object field returned by default in your response.

If you would like to receive additional fields, you will have to specify them in your request with the space.fields or expansions parameters.

For this exercise, we will requested three additional sets of fields from different objects:

  • The additional title field in the primary Spaces object.
  • The full user object of the specified creator ID
  • The additional user.created_at field in the associated user object.

In Postman, navigate to the “Params” tab and add the following key:value pair to the “Query Params” table:

KeyValueReturned fields
space.fieldstitlecreator_id
expansionscreator_idincludes.users.id, includes.users.name, includes.users.username
user.fieldscreated_atincludes.users.created_at

You should now see the following URL next to the “Send” button:

https://api.x.com/2/spaces/by/creator\_ids?user\_ids=2244994945&space.fields=creator\_id&expansions=creator\_id&user.fields=created_at

Step five: Make your request and review your response

Once you have everything set up, hit the “Send” button and you will receive the following response:

{
   "data": [
    {
        "creator_id": "2244994945",
        "id": "1zqKVXPQhvZJB",
        "title": "Hello world 👋",
        "state": "Running"
   },
   "includes": {
       "users": [
           {
               "created_at": "2013-12-14T04:35:55.000Z",
               "name": "Twitter Dev",
               "id": "2244994945",
               "username": "TwitterDev"
           }
       ]
   }
]
}

API reference index

For the complete API reference, select an endpoint from the list:

Spaces lookup

Lookup Space by ID[GET /2/spaces/:id](/x-api/x-api-v2/spaces/spaces-lookup#get-2-spaces-id)
Lookup multiple Spaces by ID[GET /2/spaces](/x-api/x-api-v2/spaces/spaces-lookup#get-2-spaces)
Get users who purchased a ticket to a Space[GET /2/spaces/:id/buyers](/x-api/x-api-v2/spaces/spaces-lookup#get-2-spaces-id-buyers)

Discover

Discover Spaces created by user ID[GET /2/spaces/by/creator_ids](/x-api/x-api-v2/spaces/spaces-lookup#get-2-spaces-by-creator-ids)

GET /2/spaces/:id

Returns a variety of information about a single Space specified by the requested ID.

Endpoint URL

https://api.x.com/2/spaces/:id

Authentication and rate limits

Authentication methods
supported by this endpoint
OAuth 2.0 Authorization Code with PKCE

OAuth 2.0 App-only
Rate limitUser rate limit (User context): 300 requests per 15-minute window per each authenticated user

App rate limit (Application-only): 300 requests per 15-minute window shared among all users of your app

OAuth 2.0 scopes required by this endpoint

tweet.read

users.read

space.read
Learn more about OAuth 2.0 Authorization Code with PKCE

Path parameters

NameTypeDescription
id
 Required
stringUnique identifier of the Space to request.

Query parameters

NameTypeDescription
expansions
 Optional
enum (invited_user_ids, speaker_ids, creator_id, host_ids, topics_ids)Expansions enable you to request additional data objects that relate to the originally returned Space. Submit a list of desired expansions in a comma-separated list. The ID that represents the expanded data object will be included directly in the Space data object, but the expanded object metadata will be returned within the includes response object, and will also include the ID so that you can match this data object to the original Space object.

The following data objects can be expanded using this parameter:

* The Spaces creator’s user object
* The user objects of any Space co-host
* Any mentioned users’ object
* Any speaker’s user object
space.fields
 Optional
enum (host_ids, created_at, creator_id, id, lang, invited_user_ids, participant_count, speaker_ids, started_at, ended_at, subscriber_count, topic_ids, state, title, updated_at, scheduled_start, is_ticketed)This fields parameter enables you to select which specific Space fields will deliver in each returned Space. Specify the desired fields in a comma-separated list.
topic.fields
 Optional
enum (id, name, description)This fields parameter enables you to select which specific topic metadata in each returned Space topic object, if the creator of the Space set one or more topics. Specify the desired fields in a comma-separated list.
user.fields
 Optional
enum (created_at, description, entities, id, location, most_recent_tweet_id, name, pinned_tweet_id, profile_image_url, protected, public_metrics, url, username, verified, verified_type, withheld)This fields parameter enables you to select which specific user fields will deliver in each returned Space. Specify the desired fields in a comma-separated list without spaces between commas and fields. While the user ID will be located in the original Space object, you will find this ID and all additional user fields in the includes data object.

Example code with offical SDKs

(async () => {
  try {
    const searchSpacesById = await twitterClient.spaces.findSpaceById(
      //The space id to be retrieved
      "1DXxyRYNejbKM"
    );
    console.dir(searchSpacesById, {
      depth: null,
    });
  } catch (error) {
    console.log(error);
  }
})();

Example responses

{
  "data": {
    "id": "1DXxyRYNejbKM",
    "state": "live"
  }
}

Response fields

NameTypeDescription
id
 Default
stringUnique identifier of this Space.
host_idsarrayAn array containing the user ID of each Space co-host. These IDs are returned as strings in order to avoid complications with languages and tools that cannot handle large integers.

To return this field, add space.fields=host_ids in the request’s query parameter.

You can obtain the expanded object in includes.users by adding expansions=host_ids in the request’s query parameter.
created_atdate (ISO 8601)Creation date and time of this Space. For scheduled Spaces, this indicates the time the Space was created, not the time when the Space will start.

To return this field, add space.fields=created_at in the request’s query parameter.
creator_idstringThe user ID of the account that created this Space. This ID is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.

To return this field, add space.fields=creator_id in the request’s query parameter.

You can obtain the expanded object in includes.users by adding expansions=creator_id in the request’s query parameter.
ended_atdate (ISO 8601)End date and time of this Space. This field will be only present for Spaces in the ended state.

To return this field, add space.fields=ended_at in the request’s query parameter.
langstringMain language of the Space’s creator, as inferred by Twitter (this may differ from the language spoken in the Space). Returned as a BCP 47 language tag.

Supported values:

* Arabic (ar)
* Armenian (hy)
* Chinese (zh)
* Danish (da)
* English (en)
* Finnish (fi)
* French (fr)
* German (de)
* Hindi (hi)
* Hebrew (iw)
* Indonesian (in)
* Italian (it)
* Japanese (ja)
* Kazakh (kk)
* Korean (ko)
* Norwegian (no)
* Polish (pl)
* Portuguese (pt)
* Romanian (ro)
* Russian (ru)
* Spanish (es)
* Swedish (sv)
* Turkish (tr)
* Ukranian (uk)



To return this field, add space.fields=lang in the request’s query parameter.
is_ticketedbooleanIndicates if this is a ticketed Space.

To return this field, add space.fields=is_ticketed in the request’s query parameter.
invited_user_idsarrayThe list of user IDs that can automatically join as Speakers. Usually, users in this list are invited to speak via the Invite user option and have a Speaker role when the Space starts.

These IDs are returned as strings in order to avoid complications with languages and tools that cannot handle large integers.

To return this field, add space.fields=invited_user_ids in the request’s query parameter.

You can obtain the expanded object in includes.users by adding expansions=invited_user_ids in the request’s query parameter.
participant_countintegerThe current number of users in the Space, including Hosts and Speakers.

To return this field, add space.fields=participant_count in the request’s query parameter.
scheduled_startdate (ISO 8601)Indicates the scheduled start time of a Space. This field is returned only if the Space has been scheduled; in other words, if the field is returned, it means the Space is a scheduled Space.

To return this field, add space.fields=scheduled_start in the request’s query parameter.
speaker_idsarrayThe list of users who were speaking at any point during the Space. This list contains all the users in invited_user_ids in addition to any user who requested to speak and was allowed via the Add speaker option.

These IDs are returned as strings in order to avoid complications with languages and tools that cannot handle large integers.These IDs are returned as strings in order to avoid complications with languages and tools that cannot handle large integers.

To return this field, add space.fields=speaker_ids in the request’s query parameter.

You can obtain the expanded object in includes.users by adding expansions=speaker_ids in the request’s query parameter.
started_atdate (ISO 8601)The start date and time of the Space. Only available if the space has started.

To return this field, add space.fields=started_at in the request’s query parameter.
state
 Default
enum (live, scheduled)Indicates whether the Space is scheduled and hasn’t started yet (scheduled) or if it’s in progress (live).

To return this field, add space.fields=state in the request’s query parameter.
subscriber_countintegerIndicates the number of people who set a remainder to this Space. This field can only be requested if your app is authentic the request using the Access Token of the creator of the Space.

To return this field, add space.fields=subscriber_count in the request’s query parameter.
topic_idsstringA list of the Space topic IDs, if set by the creator of the Space.

To return this field, add space.fields=topic_ids in the request’s query parameter.
topics.idstringThe ID of the Space topic.

To return this field, add topic.fields=topics.id in the request’s query parameter.

You can obtain the expanded object in includes.topics by adding expansions=topics in the request’s query parameter.
topics.namestringA full text description of the Space topic.

To return this field, add topic.fields=topics.name in the request’s query parameter.

You can obtain the expanded object in includes.topics by adding expansions=topics in the request’s query parameter.
titlestringThe title of this Space as specified by the creator.

To return this field, add space.fields=title in the request’s query parameter.
updated_atdate (ISO 8601)The timestamp of the last update to any of this Space’s metadata, such as the title or scheduled time.

To return this field, add space.fields=updated_at in the request’s query parameter.
includesobjectIf you include an [expansion](/x-api/x-api-v2/fundamentals/expansions) parameter, the referenced objects will be returned if available.
includes.usersarrayWhen including the expansions=author_id parameter, this includes a list of referenced Tweet authors in the form of user objects with their default fields and any additional fields requested using the user.fields parameter.
errorsobjectContains details about errors that affected any of the requested Tweets. See Status codes and error messages for more details.

GET /2/spaces

Returns details about multiple Spaces. Up to 100 comma-separated Spaces IDs can be looked up using this endpoint.

Endpoint URL

https://api.x.com/2/spaces

Authentication and rate limits

Authentication methods
supported by this endpoint
OAuth 2.0 App-only

OAuth 2.0 Authorization Code with PKCE
Rate limitUser rate limit (User context): 300 requests per 15-minute window per each authenticated user

App rate limit (Application-only): 300 requests per 15-minute window shared among all users of your app

OAuth 2.0 scopes required by this endpoint

tweet.read

users.read

space.read
Learn more about OAuth 2.0 Authorization Code with PKCE

Query parameters

NameTypeDescription
ids
 Required
stringA comma separated list of Spaces (up to 100).
expansions
 Optional
enum (invited_user_ids, speaker_ids, creator_id, host_ids, topics_ids)Expansions enable you to request additional data objects that relate to the originally returned Space. Submit a list of desired expansions in a comma-separated list. The ID that represents the expanded data object will be included directly in the Space data object, but the expanded object metadata will be returned within the includes response object, and will also include the ID so that you can match this data object to the original Space object.

The following data objects can be expanded using this parameter:

* The Spaces creator’s user object
* The user objects of any Space co-host
* Any mentioned users’ object
* Any speaker’s user object
space.fields
 Optional
enum (host_ids, created_at, creator_id, id, lang, invited_user_ids, participant_count, speaker_ids, started_at, ended_at, subscriber_count, topic_ids, state, title, updated_at, scheduled_start, is_ticketed)This fields parameter enables you to select which specific Space fields will deliver in each returned Space. Specify the desired fields in a comma-separated list.
topic.fields
 Optional
enum (id, name, description)This fields parameter enables you to select which specific topic metadata in each returned Space topic object, if the creator of the Space set one or more topics. Specify the desired fields in a comma-separated list.
user.fields
 Optional
enum (created_at, description, entities, id, location, most_recent_tweet_id, name, pinned_tweet_id, profile_image_url, protected, public_metrics, url, username, verified, verified_type, withheld)This fields parameter enables you to select which specific user fields will deliver in each returned Space. Specify the desired fields in a comma-separated list without spaces between commas and fields. While the user ID will be located in the original Space object, you will find this ID and all additional user fields in the includes data object.

Example code with offical SDKs

(async () => {
  try {
    const searchSpacesByIds = await twitterClient.spaces.findSpacesByIds({
      //A list of space ids
      ids: ["1DXxyRYNejbKM", "1nAJELYEEPvGL"],
    });
    console.dir(searchSpacesByIds, {
      depth: null,
    });
  } catch (error) {
    console.log(error);
  }
})();

Example responses

{
  "data": [
    {
      "id": "1DXxyRYNejbKM",
      "state": "live"
    }
  ]
}

Response fields

NameTypeDescription
id
 Default
stringUnique identifier of this Space.
host_idsarrayAn array containing the user ID of each Space co-host. These IDs are returned as strings in order to avoid complications with languages and tools that cannot handle large integers.

To return this field, add space.fields=host_ids in the request’s query parameter.

You can obtain the expanded object in includes.users by adding expansions=host_ids in the request’s query parameter.
created_atdate (ISO 8601)Creation date and time of this Space. For scheduled Spaces, this indicates the time the Space was created, not the time when the Space will start.

To return this field, add space.fields=created_at in the request’s query parameter.
creator_idstringThe user ID of the account that created this Space. This ID is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.

To return this field, add space.fields=creator_id in the request’s query parameter.

You can obtain the expanded object in includes.users by adding expansions=creator_id in the request’s query parameter.
ended_atdate (ISO 8601)End date and time of this Space. This field will be only present for Spaces in the ended state.

To return this field, add space.fields=ended_at in the request’s query parameter.
langstringMain language of the Space’s creator, as inferred by Twitter (this may differ from the language spoken in the Space). Returned as a BCP 47 language tag.

Supported values:

* Arabic (ar)
* Armenian (hy)
* Chinese (zh)
* Danish (da)
* English (en)
* Finnish (fi)
* French (fr)
* German (de)
* Hindi (hi)
* Hebrew (iw)
* Indonesian (in)
* Italian (it)
* Japanese (ja)
* Kazakh (kk)
* Korean (ko)
* Norwegian (no)
* Polish (pl)
* Portuguese (pt)
* Romanian (ro)
* Russian (ru)
* Spanish (es)
* Swedish (sv)
* Turkish (tr)
* Ukranian (uk)



To return this field, add space.fields=lang in the request’s query parameter.
is_ticketedbooleanIndicates if this is a ticketed Space.

To return this field, add space.fields=is_ticketed in the request’s query parameter.
invited_user_idsarrayThe list of user IDs that can automatically join as Speakers. Usually, users in this list are invited to speak via the Invite user option and have a Speaker role when the Space starts.

These IDs are returned as strings in order to avoid complications with languages and tools that cannot handle large integers.

To return this field, add space.fields=invited_user_ids in the request’s query parameter.

You can obtain the expanded object in includes.users by adding expansions=invited_user_ids in the request’s query parameter.
participant_countintegerThe current number of users in the Space, including Hosts and Speakers.

To return this field, add space.fields=participant_count in the request’s query parameter.
scheduled_startdate (ISO 8601)Indicates the scheduled start time of a Space. This field is returned only if the Space has been scheduled; in other words, if the field is returned, it means the Space is a scheduled Space.

To return this field, add space.fields=scheduled_start in the request’s query parameter.
speaker_idsarrayThe list of users who were speaking at any point during the Space. This list contains all the users in invited_user_ids in addition to any user who requested to speak and was allowed via the Add speaker option.

These IDs are returned as strings in order to avoid complications with languages and tools that cannot handle large integers.These IDs are returned as strings in order to avoid complications with languages and tools that cannot handle large integers.

To return this field, add space.fields=speaker_ids in the request’s query parameter.

You can obtain the expanded object in includes.users by adding expansions=speaker_ids in the request’s query parameter.
started_atdate (ISO 8601)The start date and time of the Space. Only available if the space has started.

To return this field, add space.fields=started_at in the request’s query parameter.
state
 Default
enum (live, scheduled)Indicates whether the Space is scheduled and hasn’t started yet (scheduled) or if it’s in progress (live).

To return this field, add space.fields=state in the request’s query parameter.
subscriber_countintegerIndicates the number of people who set a remainder to this Space. This field can only be requested if your app is authentic the request using the Access Token of the creator of the Space.

To return this field, add space.fields=subscriber_count in the request’s query parameter.
topic_idsstringA list of the Space topic IDs, if set by the creator of the Space.

To return this field, add space.fields=topic_ids in the request’s query parameter.
topics.idstringThe ID of the Space topic.

To return this field, add topic.fields=topics.id in the request’s query parameter.

You can obtain the expanded object in includes.topics by adding expansions=topics in the request’s query parameter.
topics.namestringA full text description of the Space topic.

To return this field, add topic.fields=topics.name in the request’s query parameter.

You can obtain the expanded object in includes.topics by adding expansions=topics in the request’s query parameter.
titlestringThe title of this Space as specified by the creator.

To return this field, add space.fields=title in the request’s query parameter.
updated_atdate (ISO 8601)The timestamp of the last update to any of this Space’s metadata, such as the title or scheduled time.

To return this field, add space.fields=updated_at in the request’s query parameter.
includesobjectIf you include an [expansion](/x-api/x-api-v2/fundamentals/expansions) parameter, the referenced objects will be returned if available.
includes.usersarrayWhen including the expansions=author_id parameter, this includes a list of referenced Tweet authors in the form of user objects with their default fields and any additional fields requested using the user.fields parameter.
errorsobjectContains details about errors that affected any of the requested Tweets. See Status codes and error messages for more details.

GET /2/spaces/by/creator_ids

Returns live or scheduled Spaces created by the specified user IDs. Up to 100 comma-separated IDs can be looked up using this endpoint.

Endpoint URL

https://api.x.com/2/spaces/by/creator_ids

Authentication and rate limits

Authentication methods
supported by this endpoint
OAuth 2.0 Authorization Code with PKCE

OAuth 2.0 App-only

This is not an auth method but a shared rate limit between user and application-only
Rate limitUser rate limit (User context): 300 requests per 15-minute window per each authenticated user

App rate limit (Application-only): 300 requests per 15-minute window shared among all users of your app

Shared rate limit: 1 per second among all users of your app

OAuth 2.0 scopes required by this endpoint

tweet.read

users.read

space.read
Learn more about OAuth 2.0 Authorization Code with PKCE

Query parameters

NameTypeDescription
user_ids
 Required
stringA comma separated list of user IDs (up to 100).
expansions
 Optional
enum (invited_user_ids, speaker_ids, creator_id, host_ids, topics_ids)Expansions enable you to request additional data objects that relate to the originally returned Space. Submit a list of desired expansions in a comma-separated list. The ID that represents the expanded data object will be included directly in the Space data object, but the expanded object metadata will be returned within the includes response object, and will also include the ID so that you can match this data object to the original Space object.

The following data objects can be expanded using this parameter:

* The Spaces creator’s user object
* The user objects of any Space co-host
* Any mentioned users’ object
* Any speaker’s user object
space.fields
 Optional
enum (host_ids, created_at, creator_id, id, lang, invited_user_ids, participant_count, speaker_ids, started_at, ended_at, subscriber_count, topic_ids, state, title, updated_at, scheduled_start, is_ticketed)This fields parameter enables you to select which specific Space fields will deliver in each returned Space. Specify the desired fields in a comma-separated list.
topic.fields
 Optional
enum (id, name, description)This fields parameter enables you to select which specific topic metadata in each returned Space topic object, if the creator of the Space set one or more topics. Specify the desired fields in a comma-separated list.
user.fields
 Optional
enum (created_at, description, entities, id, location, most_recent_tweet_id, name, pinned_tweet_id, profile_image_url, protected, public_metrics, url, username, verified, verified_type, withheld)This fields parameter enables you to select which specific user fields will deliver in each returned Space. Specify the desired fields in a comma-separated list without spaces between commas and fields. While the user ID will be located in the original Space object, you will find this ID and all additional user fields in the includes data object.

Example code with offical SDKs

(async () => {
  try {
    const getSpacesByCreatorId =
      await twitterClient.spaces.findSpacesByCreatorIds({
        //A list of user ids
        user_ids: ["2244994945", "6253282"],
      });
    console.dir(getSpacesByCreatorId, {
      depth: null,
    });
  } catch (error) {
    console.log(error);
  }
})();

Example responses

{
  "data": [
    {
      "id": "1DXxyRYNejbKM",
      "state": "live"
    }
  ],
  "meta": {
    "result_count": 2
  }
}

Response fields

NameTypeDescription
id
 Default
stringUnique identifier of this Space.
host_idsarrayAn array containing the user ID of each Space co-host. These IDs are returned as strings in order to avoid complications with languages and tools that cannot handle large integers.

To return this field, add space.fields=host_ids in the request’s query parameter.

You can obtain the expanded object in includes.users by adding expansions=host_ids in the request’s query parameter.
created_atdate (ISO 8601)Creation date and time of this Space. For scheduled Spaces, this indicates the time the Space was created, not the time when the Space will start.

To return this field, add space.fields=created_at in the request’s query parameter.
creator_idstringThe user ID of the account that created this Space. This ID is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.

To return this field, add space.fields=creator_id in the request’s query parameter.

You can obtain the expanded object in includes.users by adding expansions=creator_id in the request’s query parameter.
ended_atdate (ISO 8601)End date and time of this Space. This field will be only present for Spaces in the ended state.

To return this field, add space.fields=ended_at in the request’s query parameter.
langstringMain language of the Space’s creator, as inferred by Twitter (this may differ from the language spoken in the Space). Returned as a BCP 47 language tag.

Supported values:

* Arabic (ar)
* Armenian (hy)
* Chinese (zh)
* Danish (da)
* English (en)
* Finnish (fi)
* French (fr)
* German (de)
* Hindi (hi)
* Hebrew (iw)
* Indonesian (in)
* Italian (it)
* Japanese (ja)
* Kazakh (kk)
* Korean (ko)
* Norwegian (no)
* Polish (pl)
* Portuguese (pt)
* Romanian (ro)
* Russian (ru)
* Spanish (es)
* Swedish (sv)
* Turkish (tr)
* Ukranian (uk)



To return this field, add space.fields=lang in the request’s query parameter.
is_ticketedbooleanIndicates if this is a ticketed Space.

To return this field, add space.fields=is_ticketed in the request’s query parameter.
invited_user_idsarrayThe list of user IDs that can automatically join as Speakers. Usually, users in this list are invited to speak via the Invite user option and have a Speaker role when the Space starts.

These IDs are returned as strings in order to avoid complications with languages and tools that cannot handle large integers.

To return this field, add space.fields=invited_user_ids in the request’s query parameter.

You can obtain the expanded object in includes.users by adding expansions=invited_user_ids in the request’s query parameter.
participant_countintegerThe current number of users in the Space, including Hosts and Speakers.

To return this field, add space.fields=participant_count in the request’s query parameter.
scheduled_startdate (ISO 8601)Indicates the scheduled start time of a Space. This field is returned only if the Space has been scheduled; in other words, if the field is returned, it means the Space is a scheduled Space.

To return this field, add space.fields=scheduled_start in the request’s query parameter.
speaker_idsarrayThe list of users who were speaking at any point during the Space. This list contains all the users in invited_user_ids in addition to any user who requested to speak and was allowed via the Add speaker option.

These IDs are returned as strings in order to avoid complications with languages and tools that cannot handle large integers.These IDs are returned as strings in order to avoid complications with languages and tools that cannot handle large integers.

To return this field, add space.fields=speaker_ids in the request’s query parameter.

You can obtain the expanded object in includes.users by adding expansions=speaker_ids in the request’s query parameter.
started_atdate (ISO 8601)The start date and time of the Space. Only available if the space has started.

To return this field, add space.fields=started_at in the request’s query parameter.
state
 Default
enum (live, scheduled)Indicates whether the Space is scheduled and hasn’t started yet (scheduled) or if it’s in progress (live).

To return this field, add space.fields=state in the request’s query parameter.
subscriber_countintegerIndicates the number of people who set a remainder to this Space. This field can only be requested if your app is authentic the request using the Access Token of the creator of the Space.

To return this field, add space.fields=subscriber_count in the request’s query parameter.
topic_idsstringA list of the Space topic IDs, if set by the creator of the Space.

To return this field, add space.fields=topic_ids in the request’s query parameter.
topics.idstringThe ID of the Space topic.

To return this field, add topic.fields=topics.id in the request’s query parameter.

You can obtain the expanded object in includes.topics by adding expansions=topics in the request’s query parameter.
topics.idstringThe ID of the Space topic.

To return this field, add topic.fields=topics.id in the request’s query parameter.

You can obtain the expanded object in includes.topics by adding expansions=topics in the request’s query parameter.
topics.namestringThe name of the Space topic.

To return this field, add topic.fields=topics.name in the request’s query parameter.

You can obtain the expanded object in includes.topics by adding expansions=topics in the request’s query parameter.
topics.namestringA full text description of the Space topic.

To return this field, add topic.fields=topics.name in the request’s query parameter.

You can obtain the expanded object in includes.topics by adding expansions=topics in the request’s query parameter.
titlestringThe title of this Space as specified by the creator.

To return this field, add space.fields=title in the request’s query parameter.
updated_atdate (ISO 8601)The timestamp of the last update to any of this Space’s metadata, such as the title or scheduled time.

To return this field, add space.fields=updated_at in the request’s query parameter.
includesobjectIf you include an [expansion](/x-api/x-api-v2/fundamentals/expansions) parameter, the referenced objects will be returned if available.
includes.usersarrayWhen including the expansions=author_id parameter, this includes a list of referenced Tweet authors in the form of user objects with their default fields and any additional fields requested using the user.fields parameter.
errorsobjectContains details about errors that affected any of the requested Tweets. See Status codes and error messages for more details.

GET /2/spaces/:id/buyers

Returns a list of user who purchased a ticket to the requested Space. You must authenticate the request using the Access Token of the creator of the requested Space.

Endpoint URL

https://api.x.com/2/spaces/:id/buyers

Authentication and rate limits

Authentication methods
supported by this endpoint
OAuth 2.0 Authorization Code with PKCE
Rate limitUser rate limit (User context): 300 requests per 15-minute window per each authenticated user

OAuth 2.0 scopes required by this endpoint

tweet.read

users.read

space.read
Learn more about OAuth 2.0 Authorization Code with PKCE

Path parameters

NameTypeDescription
id
 Required
stringUnique identifier of the Space for which you want to request Tweets.

Query parameters

NameTypeDescription
expansions
 Optional
enum (pinned_tweet_id)Expansions enable you to request additional data objects that relate to the originally returned users. The ID that represents the expanded data object will be included directly in the user data object, but the expanded object metadata will be returned within the includes response object, and will also include the ID so that you can match this data object to the original Tweet object. At this time, the only expansion available to endpoints that primarily return user objects is expansions=pinned_tweet_id. You will find the expanded Tweet data object living in the includes response object.
max_results
 Optional
integerThe maximum number of results to be returned per page. This can be a number between 1 and 100. By default, each page will return 100 results.
pagination_token
 Optional
stringUsed to request the next page of results if all results weren’t returned with the latest request, or to go back to the previous page of results. To return the next page, pass the next_token returned in your previous response. To go back one page, pass the previous_token returned in your previous response.
tweet.fields
 Optional
enum (attachments, author_id, context_annotations, conversation_id, created_at, edit_controls, entities, geo, id, in_reply_to_user_id, lang, non_public_metrics, public_metrics, organic_metrics, promoted_metrics, possibly_sensitive, referenced_tweets, reply_settings, source, text, withheld)This fields parameter enables you to select which specific Tweet fields will deliver in each returned pinned Tweet. Specify the desired fields in a comma-separated list without spaces between commas and fields. The Tweet fields will only return if the user has a pinned Tweet and if you’ve also included the expansions=pinned_tweet_id query parameter in your request. While the referenced Tweet ID will be located in the original Tweet object, you will find this ID and all additional Tweet fields in the includes data object.
user.fields
 Optional
enum (created_at, description, entities, id, location, most_recent_tweet_id, name, pinned_tweet_id, profile_image_url, protected, public_metrics, url, username, verified, verified_type, withheld)This fields parameter enables you to select which specific user fields will deliver with each returned users objects. Specify the desired fields in a comma-separated list without spaces between commas and fields. These specified user fields will display directly in the user data objects.

Example code with offical SDKs

(async () => {
  try {
    const getSpaceBuyers = await twitterClient.spaces.spaceBuyers(
      //The space id from which buyers of the space will be retrieved
      "1DXxyRYNejbKM"
    );
    console.dir(getSpaceBuyers, {
      depth: null,
    });
  } catch (error) {
    console.log(error);
  }
})();

Example responses

{
  "data": [
    {
      "id": "2244994945",
      "username": "TwitterDev",
      "name": "Twitter Dev"
    },
    {
      "id": "783214",
      "username": "Twitter",
      "name": "Twitter"
    }
  ]
}

Response fields

NameTypeDescription
id
 Default
stringUnique identifier of this user. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.
name
 Default
stringThe friendly name of this user, as shown on their profile.
username
 Default
stringThe Twitter handle (screen name) of this user.
created_atdate (ISO 8601)Creation time of this account.

To return this field, add user.fields=created_at in the request’s query parameter.
most_recent_tweet_idstringThe ID of the User’s most recent Tweet

To return this field, add user.fields=most_recent_tweet_id in the request’s query parameter.
protectedbooleanIndicates if this user has chosen to protect their Tweets (in other words, if this user’s Tweets are private).

To return this field, add user.fields=protected in the request’s query parameter.
withheldobjectContains withholding details for withheld content.

To return this field, add user.fields=withheld in the request’s query parameter.
withheld.country_codesarrayProvides a list of countries where this user is not available.

To return this field, add user.fields=withheld.country_codes in the request’s query parameter.
withheld.scopeenum (tweet, user)Indicates whether the content being withheld is a Tweet or a user (this API will return user).

To return this field, add user.fields=withheld.scope in the request’s query parameter.
locationstringThe location specified in the user’s profile, if the user provided one. As this is a freeform value, it may not indicate a valid location, but it may be fuzzily evaluated when performing searches with location queries.

To return this field, add user.fields=location in the request’s query parameter.
urlstringThe URL specified in the user’s profile, if present.

To return this field, add user.fields=url in the request’s query parameter.
descriptionstringThe text of this user’s profile description (also known as bio), if the user provided one.

To return this field, add user.fields=description in the request’s query parameter.
verifiedbooleanIndicate if this user is a verified Twitter user.

To return this field, add user.fields=verified in the request’s query parameter.
entitiesobjectThis object and its children fields contain details about text that has a special meaning in the user’s description.

To return this field, add user.fields=entities in the request’s query parameter.
entities.urlarrayContains details about the user’s profile website.
entities.url.urlsarrayContains details about the user’s profile website.
entities.url.urls.startintegerThe start position (zero-based) of the recognized user’s profile website. All start indices are inclusive.
entities.url.urls.endintegerThe end position (zero-based) of the recognized user’s profile website. This end index is exclusive.
entities.url.urls.urlstringThe URL in the format entered by the user.
entities.url.urls.expanded_urlstringThe fully resolved URL.
entities.url.urls.display_urlstringThe URL as displayed in the user’s profile.
entities.descriptionarrayContains details about URLs, Hashtags, Cashtags, or mentions located within a user’s description.
entities.description.urlsarrayContains details about any URLs included in the user’s description.
entities.description.urls.startintegerThe start position (zero-based) of the recognized URL in the user’s description. All start indices are inclusive.
entities.description.urls.endintegerThe end position (zero-based) of the recognized URL in the user’s description. This end index is exclusive.
entities.description.urls.urlstringThe URL in the format entered by the user.
entities.description.urls.expanded_urlstringThe fully resolved URL.
entities.description.urls.display_urlstringThe URL as displayed in the user’s description.
entities.description.hashtagsarrayContains details about text recognized as a Hashtag.
entities.description.hashtags.startintegerThe start position (zero-based) of the recognized Hashtag within the Tweet. All start indices are inclusive.
entities.description.hashtags.endintegerThe end position (zero-based) of the recognized Hashtag within the Tweet. This end index is exclusive.
entities.description.hashtags.hashtagstringThe text of the Hashtag.
entities.description.mentionsarrayContains details about text recognized as a user mention.
entities.description.mentions.startintegerThe start position (zero-based) of the recognized user mention within the Tweet. All start indices are inclusive.
entities.description.mentions.endintegerThe end position (zero-based) of the recognized user mention within the Tweet. This end index is exclusive.
entities.description.mentions.usernamestringThe part of text recognized as a user mention.
entities.description.cashtagsarrayContains details about text recognized as a Cashtag.
entities.description.cashtags.startintegerThe start position (zero-based) of the recognized Cashtag within the Tweet. All start indices are inclusive.
entities.description.cashtags.endintegerThe end position (zero-based) of the recognized Cashtag within the Tweet. This end index is exclusive.
entities.description.cashtags.cashtagstringThe text of the Cashtag.
profile_image_urlstringThe URL to the profile image for this user, as shown on the user’s profile.
public_metricsobjectContains details about activity for this user.
public_metrics.followers_countintegerNumber of users who follow this user.
public_metrics.following_countintegerNumber of users this user is following.
public_metrics.tweet_countintegerNumber of Tweets (including Retweets) posted by this user.
public_metrics.listed_countintegerNumber of lists that include this user.
pinned_tweet_idstringUnique identifier of this user’s pinned Tweet.

You can obtain the expanded object in includes.tweets by adding expansions=pinned_tweet_id in the request’s query parameter.
includes.tweetsarrayWhen including the expansions=pinned_tweet_id parameter, this includes the pinned Tweets attached to the returned users’ profiles in the form of Tweet objects with their default fields and any additional fields requested using the tweet.fields parameter, assuming there is a referenced Tweet present in the returned Tweet(s).
errorsobjectContains details about errors that affected any of the requested users. See Status codes and error messages for more details.

GET /2/spaces/:id/tweets

Returns Tweets shared in the requested Spaces.

Endpoint URL

https://api.x.com/2/spaces/:id/tweets

Authentication and rate limits

Authentication methods
supported by this endpoint
OAuth 2.0 Authorization Code with PKCE
Rate limitUser rate limit (User context): 300 requests per 15-minute window per each authenticated user

OAuth 2.0 scopes required by this endpoint

tweet.read

users.read

space.read
Learn more about OAuth 2.0 Authorization Code with PKCE

Path parameters

NameTypeDescription
id
 Required
stringUnique identifier of the Space containing the Tweets you’d like to access.

Query parameters

NameTypeDescription
expansions
 Optional
enum (attachments.poll_ids, attachments.media_keys, author_id, edit_history_tweet_ids, entities.mentions.username, geo.place_id, in_reply_to_user_id, referenced_tweets.id, referenced_tweets.id.author_id)Expansions enable you to request additional data objects that relate to the originally returned Tweets. Submit a list of desired expansions in a comma-separated list without spaces. The ID that represents the expanded data object will be included directly in the Tweet data object, but the expanded object metadata will be returned within the includes response object, and will also include the ID so that you can match this data object to the original Tweet object.

The following data objects can be expanded using this parameter:

* The Tweet author’s user object
* The user object of the Tweet’s author that the original Tweet is responding to
* Any mentioned users’ object
* Any referenced Tweets’ author’s user object
* Attached media’s object
* Attached poll’s object
* Attached place’s object
* Any referenced Tweets’ object
media.fields
 Optional
enum (duration_ms, height, media_key, preview_image_url, type, url, width, public_metrics, non_public_metrics, organic_metrics, promoted_metrics, alt_text, variants)This fields parameter enables you to select which specific media fields will deliver in each returned Tweet. Specify the desired fields in a comma-separated list without spaces between commas and fields. The Tweet will only return media fields if the Tweet contains media and if you’ve also included the expansions=attachments.media_keys query parameter in your request. While the media ID will be located in the Tweet object, you will find this ID and all additional media fields in the includes data object.
place.fields
 Optional
enum (contained_within, country, country_code, full_name, geo, id, name, place_type)This fields parameter enables you to select which specific place fields will deliver in each returned Tweet. Specify the desired fields in a comma-separated list without spaces between commas and fields. The Tweet will only return place fields if the Tweet contains a place and if you’ve also included the expansions=geo.place_id query parameter in your request. While the place ID will be located in the Tweet object, you will find this ID and all additional place fields in the includes data object.
poll.fields
 Optional
enum (duration_minutes, end_datetime, id, options, voting_status)This fields parameter enables you to select which specific poll fields will deliver in each returned Tweet. Specify the desired fields in a comma-separated list without spaces between commas and fields. The Tweet will only return poll fields if the Tweet contains a poll and if you’ve also included the expansions=attachments.poll_ids query parameter in your request. While the poll ID will be located in the Tweet object, you will find this ID and all additional poll fields in the includes data object.
tweet.fields
 Optional
enum (attachments, author_id, context_annotations, conversation_id, created_at, edit_controls, entities, geo, id, in_reply_to_user_id, lang, non_public_metrics, public_metrics, organic_metrics, promoted_metrics, possibly_sensitive, referenced_tweets, reply_settings, source, text, withheld)This fields parameter enables you to select which specific Tweet fields will deliver in each returned Tweet object. Specify the desired fields in a comma-separated list without spaces between commas and fields. You can also pass the expansions=referenced_tweets.id expansion to return the specified fields for both the original Tweet and any included referenced Tweets. The requested Tweet fields will display in both the original Tweet data object, as well as in the referenced Tweet expanded data object that will be located in the includes data object.
user.fields
 Optional
enum (created_at, description, entities, id, location, most_recent_tweet_id, name, pinned_tweet_id, profile_image_url, protected, public_metrics, url, username, verified, verified_type, withheld)This fields parameter enables you to select which specific user fields will deliver in each returned Tweet. Specify the desired fields in a comma-separated list without spaces between commas and fields. While the user ID will be located in the original Tweet object, you will find this ID and all additional user fields in the includes data object.

You must also pass one of the user expansions to return the desired user fields:

* expansions=author_id
* expansions=entities.mentions.username
* expansions=in_reply_to_user_id
* expansions=referenced_tweets.id.author_id

Example code with offical SDKs

(async () => {
  try {
    const getSpacesTweets = await twitterClient.spaces.spaceTweets(
      //The space id to be retrieved
      "1DXxyRYNejbKM"
    );
    console.dir(getSpacesTweets, {
      depth: null,
    });
  } catch (error) {
    console.log(error);
  }
})();

Example responses

{
  "data": [
    {
      "id": "1389270063807598594",
      "text": "now, everyone with 600 or more followers can host a Space.nnbased on what we've learned, these accounts are likely to have a good experience hosting because of their existing audience. before bringing the ability to create a Space to everyone, we're focused on a few things. :thread:"
    },
    {
      "id": "1354143047324299264",
      "text": "Academics are one of the biggest groups using the #TwitterAPI to research what's happening. Their work helps make the world (& Twitter) a better place, and now more than ever, we must enable more of it. nIntroducing :drum_with_drumsticks: the Academic Research product track!nhttps://t.co/nOFiGewAV2"
    },
    {
      "id": "1293595870563381249",
      "text": "Twitter API v2: Early Access releasednnToday we announced Early Access to the first endpoints of the new Twitter API!nn#TwitterAPI #EarlyAccess #VersionBump https://t.co/g7v3aeIbtQ"
    }
  ],
  "meta": {
    "result_count": 3
  }
}

Response fields

NameTypeDescription
id
 Default
stringUnique identifier of this Tweet. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.
text
 Default
stringThe content of the Tweet.

To return this field, add tweet.fields=text in the request’s query parameter.
created_atdate (ISO 8601)Creation time of the Tweet.

To return this field, add tweet.fields=created_at in the request’s query parameter.
author_idstringUnique identifier of this user. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.

You can obtain the expanded object in includes.users by adding expansions=author_id in the request’s query parameter.
edit_controlsobjectIndicates if a Tweet is eligible for edit, how long it is editable for, and the number of remaining edits.

The is_edit_eligible field indicates if a Tweet was eligible for edit when published. This field is not dynamic and won’t toggle from True to False when a Tweet reaches its editable time limit, or maximum number of edits. The following Tweet features will cause this field to be false:

* Tweet is promoted
* Tweet has a poll
* Tweet is a non-self-thread reply
* Tweet is a Retweet (note that Quote Tweets are eligible for edit)
* Tweet is nullcast
* Community Tweet
* Superfollow Tweet
* Collaborative Tweet

{ <br/>  "edit_controls": { <br/>   "is_edit_eligible": true, <br/>   "editable_until": "2022-08-21 09:35:20.311", <br/>   "edits_remaining": 4 <br/> } <br/>} <br/>Editable Tweets can be edited for the first 30 minutes after creation and can be edited up to five times.

To return this field, add tweet.fields=edit_controls in the request’s query parameter.
conversation_idstringThe Tweet ID of the original Tweet of the conversation (which includes direct replies, replies of replies).

To return this field, add tweet.fields=conversation_id in the request’s query parameter.
note_tweetobjectInformation about Tweets with more than 280 characters.

To return this field, add tweet.fields=note_tweet in the request’s query parameter.
in_reply_to_user_idstringIf this Tweet is a Reply, indicates the user ID of the parent Tweet’s author. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.

You can obtain the expanded object in includes.users by adding expansions=in_reply_to_user_id in the request’s query parameter.
referenced_tweetsarrayA list of Tweets this Tweet refers to. For example, if the parent Tweet is a Retweet, a Retweet with comment (also known as Quoted Tweet) or a Reply, it will include the related Tweet referenced to by its parent.

To return this field, add tweet.fields=referenced_tweets in the request’s query parameter.
referenced_tweets.typeenum (retweeted, quoted, replied_to)Indicates the type of relationship between this Tweet and the Tweet returned in the response: retweeted (this Tweet is a Retweet), quoted (a Retweet with comment, also known as Quoted Tweet), or replied_to (this Tweet is a reply).
referenced_tweets.idstringThe unique identifier of the referenced Tweet.

You can obtain the expanded object in includes.tweets by adding expansions=referenced_tweets.id in the request’s query parameter.
attachmentsobjectSpecifies the type of attachments (if any) present in this Tweet.

To return this field, add tweet.fields=attachments in the request’s query parameter.
attachments.media_keysarrayList of unique identifiers of media attached to this Tweet. These identifiers use the same media key format as those returned by the Media Library.

You can obtain the expanded object in includes.media by adding expansions=attachments.media_keys in the request’s query parameter.
attachments.poll_idsarrayList of unique identifiers of polls present in the Tweets returned. These are returned as a string in order to avoid complications with languages and tools that cannot handle large integers.

You can obtain the expanded object in includes.polls by adding expansions=attachments.polls_ids in the request’s query parameter.
geoobjectContains details about the location tagged by the user in this Tweet, if they specified one.

To return this field, add tweet.fields=geo in the request’s query parameter.
geo.coordinatesobjectContains details about the coordinates of the location tagged by the user in this Tweet, if they specified one.

To return this field, add tweet.fields=geo.coordinates in the request’s query parameter.
geo.coordinates.typestringDescribes the type of coordinate. The only value supported at present is Point.
geo.coordinates.coordinatesarrayA pair of decimal values representing the precise location of the user (latitude, longitude). This value be null unless the user explicitly shared their precise location.
geo.place_idstringThe unique identifier of the place, if this is a point of interest tagged in the Tweet.

You can obtain the expanded object in includes.places by adding expansions=geo.place_id in the request’s query parameter.
context_annotationsarrayContains context annotations for the Tweet.

To return this field, add tweet.fields=context_annotations in the request’s query parameter.
context_annotations.domainobjectContains elements which identify detailed information regarding the domain classification based on Tweet text.
context_annotations.domain.idstringContains the numeric value of the domain.
context_annotations.domain.namestringDomain name based on the Tweet text.
context_annotations.domain.descriptionstringLong form description of domain classification.
context_annotations.entityobjectContains elements which identify detailed information regarding the domain classification bases on Tweet text.
context_annotations.entity.idstringUnique value which correlates to an explicitly mentioned Person, Place, Product or Organization
context_annotations.entity.namestringName or reference of entity referenced in the Tweet.
context_annotations.entity.descriptionstringAdditional information regarding referenced entity.
entitiesobjectContains details about text that has a special meaning in a Tweet.

To return this field, add tweet.fields=entities in the request’s query parameter.
entities.annotationsarrayContains details about annotations relative to the text within a Tweet.
entities.annotations.startintegerThe start position (zero-based) of the text used to annotate the Tweet. All start indices are inclusive.
entities.annotations.endintegerThe end position (zero based) of the text used to annotate the Tweet. While all other end indices are exclusive, this one is inclusive.
entities.annotations.probabilitynumberThe confidence score for the annotation as it correlates to the Tweet text.
entities.annotations.typestringThe description of the type of entity identified when the Tweet text was interpreted.
entities.annotations.normalized_textstringThe text used to determine the annotation type.
entities.urlsarrayContains details about text recognized as a URL.
entities.urls.startintegerThe start position (zero-based) of the recognized URL within the Tweet. All start indices are inclusive.
entities.urls.endintegerThe end position (zero-based) of the recognized URL within the Tweet. This end index is exclusive.
entities.urls.urlstringThe URL in the format tweeted by the user.
entities.urls.expanded_urlstringThe fully resolved URL.
entities.urls.display_urlstringThe URL as displayed in the Twitter client.
entities.urls.unwound_urlstringThe full destination URL.
entities.hashtagsarrayContains details about text recognized as a Hashtag.
entities.hashtags.startintegerThe start position (zero-based) of the recognized Hashtag within the Tweet. All start indices are inclusive.
entities.hashtags.endintegerThe end position (zero-based) of the recognized Hashtag within the Tweet.
entities.hashtags.tagstringThe text of the Hashtag.
entities.mentionsarrayContains details about text recognized as a user mention.
entities.mentions.startintegerThe start position (zero-based) of the recognized user mention within the Tweet. All start indices are inclusive.
entities.mentions.endintegerThe end position (zero-based) of the recognized user mention within the Tweet.
entities.mentions.usernamestringThe part of text recognized as a user mention.

You can obtain the expanded object in includes.users by adding expansions=entities.mentions.username in the request’s query parameter.
entities.cashtagsarrayContains details about text recognized as a Cashtag.
entities.cashtags.startintegerThe start position (zero-based) of the recognized Cashtag within the Tweet. All start indices are inclusive.
entities.cashtags.endintegerThe end position (zero-based) of the recognized Cashtag within the Tweet.
entities.cashtags.tagstringThe text of the Cashtag.
withheldobjectContains withholding details for withheld content.

To return this field, add tweet.fields=withheld in the request’s query parameter.
withheld.copyrightbooleanIndicates if the content is being withheld for on the basis of copyright infringement.
withheld.country_codesarrayProvides a list of countries where this content is not available.
withheld.scopeenum (tweet, user)Indicates whether the content being withheld is a Tweet or a user.
note_tweetobjectInformation for Tweets longer than 280 characters.

To return this field, add tweet.fields=note_tweet in the request’s query parameter.
note_tweet.textstringThe text for Tweets longer than 280 characters.
note_tweet.entitiesobjectContains details about text that has a special meaning in a Tweet.
note_tweet.entities.urlsarrayContains details about text recognized as a URL.
note_tweet.entities.mentionsarrayContains details about text recognized as a user mention.
note_tweet.entities.hashtagsarrayContains details about text recognized as a Hashtag.
note_tweet.entities.cashtagsarrayContains details about text recognized as a Cashtag.
public_metricsobjectEngagement metrics for the Tweet at the time of the request.

To return this field, add tweet.fields=public_metrics in the request’s query parameter.
public_metrics.retweet_countintegerNumber of times this Tweet has been Retweeted.
public_metrics.reply_countintegerNumber of Replies of this Tweet.
public_metrics.like_countintegerNumber of Likes of this Tweet.
public_metrics.quote_countintegerNumber of times this Tweet has been Retweeted with a comment (also known as Quote).
public_metrics.impression_countintegerNumber of times this Tweet has been viewed.
public_metrics.bookmark_countintegerNumber of times this Tweet has been bookmarked.
non_public_metricsobjectNon-public engagement metrics for the Tweet at the time of the request. This is a private metric, and requires the use of OAuth 2.0 User Context authentication.

To return this field, add tweet.fields=non_public_metrics in the request’s query parameter.
non_public_metrics.impression_countintegerNumber of times the Tweet has been viewed. This is a private metric, and requires the use of OAuth 2.0 User Context authentication.
non_public_metrics.url_link_clicksintegerNumber of times a user clicks on a URL link or URL preview card in a Tweet. This is a private metric, and requires the use of OAuth 2.0 User Context authentication.
non_public_metrics.user_profile_clicksintegerNumber of times a user clicks the following portions of a Tweet - display name, user name, profile picture. This is a private metric, and requires the use of OAuth 2.0 User Context authentication.
organic_metricsobjectOrganic engagement metrics for the Tweet at the time of the request. Requires user context authentication.
organic_metrics.impression_countintegerNumber of times the Tweet has been viewed organically. This is a private metric, and requires the use of OAuth 2.0 User Context authentication.
organic_metrics.url_link_clicksintegerNumber of times a user clicks on a URL link or URL preview card in a Tweet organically. This is a private metric, and requires the use of OAuth 2.0 User Context authentication.
organic_metrics.user_profile_clicksintegerNumber of times a user clicks the following portions of a Tweet organically - display name, user name, profile picture. This is a private metric, and requires the use of OAuth 2.0 User Context authentication.
organic_metrics.retweet_countintegerNumber of times the Tweet has been Retweeted organically.
organic_metrics.reply_countintegerNumber of replies the Tweet has received organically.
organic_metrics.like_countintegerNumber of likes the Tweet has received organically.
promoted_metricsobjectEngagement metrics for the Tweet at the time of the request in a promoted context. Requires user context authentication.
promoted_metrics.impression_countintegerNumber of times the Tweet has been viewed when that Tweet is being promoted. This is a private metric, and requires the use of OAuth 2.0 User Context authentication.
promoted_metrics.url_link_clicksintegerNumber of times a user clicks on a URL link or URL preview card in a Tweet when it is being promoted. This is a private metric, and requires the use of OAuth 2.0 User Context authentication.
promoted_metrics.user_profile_clicksintegerNumber of times a user clicks the following portions of a Tweet when it is being promoted - display name, user name, profile picture. This is a private metric, and requires the use of OAuth 2.0 User Context authentication.
promoted_metrics.retweet_countintegerNumber of times this Tweet has been Retweeted when that Tweet is being promoted.
promoted_metrics.reply_countintegerNumber of Replies to this Tweet when that Tweet is being promoted.
promoted_metrics.like_countintegerNumber of Likes of this Tweet when that Tweet is being promoted.
possibly_sensitivebooleanIndicates if this Tweet contains URLs marked as sensitive, for example content suitable for mature audiences.

To return this field, add tweet.fields=possibly_sensitive in the request’s query parameter.
langstringLanguage of the Tweet, if detected by Twitter. Returned as a BCP47 language tag.

To return this field, add tweet.fields=lang in the request’s query parameter.
reply_settingsstringShows who can reply to this Tweet. Fields returned are everyone, mentionedUsers, and following.

To return this field, add tweet.fields=reply_settings in the request’s query parameter.
sourcestringThe name of the app the user Tweeted from.

To return this field, add tweet.fields=source in the request’s query parameter.
includesobjectIf you include an [expansion](/x-api/x-api-v2/fundamentals/expansions) parameter, the referenced objects will be returned if available.
includes.tweetsarrayWhen including the expansions=referenced_tweets.id parameter, this includes a list of referenced Retweets, Quoted Tweets, or replies in the form of Tweet objects with their default fields and any additional fields requested using the tweet.fields parameter, assuming there is a referenced Tweet present in the returned Tweet(s).
includes.usersarrayWhen including the expansions=author_id parameter, this includes a list of referenced Tweet authors in the form of user objects with their default fields and any additional fields requested using the user.fields parameter.
includes.placesarrayWhen including the expansions=geo.place_id parameter, this includes a list of referenced places in Tweets in the form of place objects with their default fields and any additional fields requested using the place.fields parameter, assuming there is a place present in the returned Tweet(s).
includes.mediaarrayWhen including the expansions=attachments.media_keys parameter, this includes a list of images, videos, and GIFs included in Tweets in the form of media objects with their default fields and any additional fields requested using the media.fields parameter, assuming there is a media attachment present in the returned Tweet(s).
includes.pollsstringWhen including the expansions=attachments.poll_ids parameter, this includes a list of polls that are attached to Tweets in the form of poll objects with their default fields and any additional fields requested using the poll.fields parameter, assuming there is a poll present in the returned Tweet(s).
errorsobjectContains details about errors that affected any of the requested Tweets. See Status codes and error messages for more details.