Introduction

Manage Bookmarks

We have two available methods for manage Bookmarks, POST and DELETE. The POST method lets you create Bookmarks. Likewise, the DELETE method allows you to delete a specific Bookmark. 

There is a per-user rate limit of 50 requests per 15 minutes for the POST and DELETE methods.

Since you are making requests on behalf of a user with the manage Bookmarks endpoints, you must authenticate by generating a user Access Token with OAuth 2.0. You can use the Authorization Code with PKCE grant flow to do so. To use this endpoint you must pass in the scopes tweet.read, users.read, and  bookmark.write.

Bookmarks lookup

The Bookmarks lookup endpoint has one method available, GET. This method allows you to get Bookmarks back from yourself or an authenticated account. Pagination tokens will be provided for paging through large sets of results for this endpoint.

There is a per-user rate limit of 180 requests per 15 min window for the GET method. With this endpoint you will get back 800 of your most recent Bookmarked Posts.

Since you are making requests on behalf of a user with the lookup Bookmarks endpoints, you must authenticate by generating a user Access Token with OAuth 2.0. You can use the Authorization Code with PKCE grant flow to do so. To use this endpoint you must pass in the scopes tweet.read, users.read, and bookmark.read.

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 manage Bookmarks endpoints

This quick start guide will help you make your first request to the manage Bookmarks endpoints using Postman.

If you would like to see sample code in different 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 manage Bookmarks request

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 the 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 “Bookmarks” folder, and select “Create a Bookmark”.

Step two: Authenticate your request

To make a successful request to this endpoint, you will need to use OAuth 2.0 Authorization Code Flow with PKCE. You can generate an access token within Postman. 

If you go to the tab entitled “Authorization” and select “OAuth 2.0”.

In this tab, be sure to follow these steps:

  1. Name your token

  2. Select the Grant Type as Authorization Code (with PKCE)

  3. Update the parameters:

    Callback URL - https://www.example.com

    This should be matching the callback URL you set in your auth settings page in the Developer Portal.

    Auth URL - https://twitter.com/i/oauth2/authorize

    Access Token URL - https://api.x.com/2/oauth2/token

    Client ID - Cut and paste OAuth 2.0 client ID from the Developer Portal

    **Client Secret **- Cut and paste OAuth 2.0 client ID from the Developer Portal. You will need this only if you are using an App type that is a confidential client.

  4. Update the scopes with the following values: post.read users.read bookmark.write

  5. Populate the field state with “State”

  6. Click where it says “Generate Token”

  7. Press the save icon to save the folder changes.

You may get a message that you are not logged into X. If you get this error, you will need to log in to the X account inside of Postman you are trying to post on behalf of.

Step three: Specify a user

With this endpoint, you must specify the user ID whose followers you would like to receive in the response. For example, the user ID for @XDevelopers is 2244994945.

In Postman, navigate to the “Params” tab and enter the ID of yourself or an authenticated user as the value for the id parameter.

KeyValue
id2244994945

Step four: Specify Specify a Post you want to Bookmark

You will want to navigate to the “Body” tab and make sure the Post ID is set to the one you are looking to save to your Bookmarks. The JSON payload should look similar to the one below.

{"tweet_id": "1460323737035677698"}

Step five: Make your request and review your response

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

{
   "data": {
       "bookmarked": true
   }
}

To delete a Post, select the “Remove a Bookmark” request also found in the “Bookmarks” folder of the X API v2 collection loaded in Postman. You will first want to specify the user ID of the user you are making a request on behalf of as the value for the “id” column. This endpoint also requires the ID of the Post you wish to delete. Then, in the “Params” tab, enter the ID of the Post you wish to delete as the value for the “tweet_id” column. 

When you have a successful delete request, you will receive a response similar to the following example: 

{
   "data": {
       "bookmarked": false
   }
}

Quick start

Getting started with the Bookmarks lookup endpoint

This quick start guide will help you make your first request to the Bookmarks lookup endpoint using Postman.

Please visit our X API v2 sample code GitHub repository if you want to see sample code in different languages.

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 Bookmarks lookup request

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 will use the Postman tool here to simplify the process.

To load the 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 “Bookmarks” folder, and select “ Bookmarks lookup”.

Step two: Authenticate your request

To make a successful request to this endpoint, you will need to use OAuth 2.0 Authorization Code Flow with PKCE. You can generate an access token within Postman. 

If you go to the tab entitled “Authorization” and select “OAuth 2.0”.

In this tab, be sure to follow these steps:

  1. Name your token

  2. Select the Grant Type as Authorization Code (with PKCE)

  3. Update the parameters:

    Callback URLhttps://www.example.com

    This should be matching the callback URL you set in your auth settings page in the Developer Portal.

    Auth URL - https://twitter.com/i/oauth2/authorize

    Access Token URL - https://api.x.com/2/oauth2/token

    Client ID - Cut and paste OAuth 2.0 client ID from the Developer Portal

    Client Secret - Cut and paste OAuth 2.0 client ID from the Developer Portal. You will need this only if you are using an App type that is a confidential client.

  4. Update the scopes with the following values: post.read users.read bookmark.read

  5. Populate the field state with “State”

  6. Click where it says “Generate Token”

  7. Press the save icon to save the folder changes.

You may get a message that you are not logged into X. If you get this error, you will need to log in to the X account inside of Postman you are trying to post on behalf of.

Step three: Specify a user

With this endpoint, you must specify the user ID whose followers you would like to receive in the response. For example, the user ID for @XDevelopers is2244994945. In Postman, navigate to the “Params” tab and enter the ID of yourself or an authenticated user as the value for the id parameter.

KeyValue
id2244994945

Step four: Make your request and review your response

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

{
   "data": [
       {
           "id": "1501258597237342208",
           "text": "🗣 Have you built a project using the Twitter API you’d like to share with the community? We’d love to hear from you. Share your project with us!"
       },
       {
           "id": "1501258542258348032",
           "text": "🧰🛠 This is just one way developer innovation helps make Twitter a better place. You can find other ready-to-use tools built by our developer community in our Twitter Toolbox here ⬇️ https://t.co/rK0X30JSYU"
       },
       {
           "id": "1501257716941000709",
           "text": "📣Today’s an important day! \nWe’ve partnered with @Jigsaw on the launch of this new tool. This collaboration allows NGOs and nonprofits to build tools that help people stay safe on Twitter by addressing the needs and preferences of the communities they serve. Learn More ⬇️ https://t.co/MmznmgxoWT"
       },
       {
           "id": "1501686770810900485",
           "text": "Join us tomorrow for a continued conversation on customizing timelines and how this might work for developers. And stay tuned for more Spaces coming up next week. 👀 https://t.co/P4JTc14mdC"
       },
       {
           "id": "1501596763194593285",
           "text": "Developer innovation is always important, including in times of crisis. If you're building tools to help connect people, keep them safe, or share information with the world, we're here to support—reply to this Tweet to tell us more about your app."
       }
   ]
}

Getting started with the manage Bookmarks endpoints

This quick start guide will help you make your first request to the manage Bookmarks endpoints using Postman.

If you would like to see sample code in different 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 manage Bookmarks request

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 the 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 “Bookmarks” folder, and select “Create a Bookmark”.

Step two: Authenticate your request

To make a successful request to this endpoint, you will need to use OAuth 2.0 Authorization Code Flow with PKCE. You can generate an access token within Postman. 

If you go to the tab entitled “Authorization” and select “OAuth 2.0”.

In this tab, be sure to follow these steps:

  1. Name your token

  2. Select the Grant Type as Authorization Code (with PKCE)

  3. Update the parameters:

    Callback URL - https://www.example.com

    This should be matching the callback URL you set in your auth settings page in the Developer Portal.

    Auth URL - https://twitter.com/i/oauth2/authorize

    Access Token URL - https://api.x.com/2/oauth2/token

    Client ID - Cut and paste OAuth 2.0 client ID from the Developer Portal

    **Client Secret **- Cut and paste OAuth 2.0 client ID from the Developer Portal. You will need this only if you are using an App type that is a confidential client.

  4. Update the scopes with the following values: post.read users.read bookmark.write

  5. Populate the field state with “State”

  6. Click where it says “Generate Token”

  7. Press the save icon to save the folder changes.

You may get a message that you are not logged into X. If you get this error, you will need to log in to the X account inside of Postman you are trying to post on behalf of.

Step three: Specify a user

With this endpoint, you must specify the user ID whose followers you would like to receive in the response. For example, the user ID for @XDevelopers is 2244994945.

In Postman, navigate to the “Params” tab and enter the ID of yourself or an authenticated user as the value for the id parameter.

KeyValue
id2244994945

Step four: Specify Specify a Post you want to Bookmark

You will want to navigate to the “Body” tab and make sure the Post ID is set to the one you are looking to save to your Bookmarks. The JSON payload should look similar to the one below.

{"tweet_id": "1460323737035677698"}

Step five: Make your request and review your response

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

{
   "data": {
       "bookmarked": true
   }
}

To delete a Post, select the “Remove a Bookmark” request also found in the “Bookmarks” folder of the X API v2 collection loaded in Postman. You will first want to specify the user ID of the user you are making a request on behalf of as the value for the “id” column. This endpoint also requires the ID of the Post you wish to delete. Then, in the “Params” tab, enter the ID of the Post you wish to delete as the value for the “tweet_id” column. 

When you have a successful delete request, you will receive a response similar to the following example: 

{
   "data": {
       "bookmarked": false
   }
}

Integration guide

This page contains information on several tools and critical concepts that you should know as you integrate the manage Bookmarks endpoints into your system. We’ve broken the page into a couple of different sections:

Helpful tools

Before we dive into some key concepts that will help you integrate this endpoint, we recommend that you become familiar with:

Postman

Postman is a great tool that you can use to test out an endpoint. Each Postman request includes every path and body parameter to help you quickly understand what is available to you. To learn more about our Postman collections, please visit our “Using Postman” page. 

Code samples

Are you interested in getting set up with this endpoint with some code in your preferred coding language? We’ve got a handful of different code samples available that you can use as a starting point on our Github page.

Third-party libraries

Take advantage of one of our communities’ third-party libraries to help you get started. You can find a library that works with the v2 endpoints by looking for the proper version tag.

Key concepts

Authentication

All X API v2 endpoints require you to authenticate your requests with a set of credentials, also known as keys and tokens. 

These specific endpoints require the use of OAuth 2.0 Authorization Code Flow with PKCE, which means that you must use a set of keys and user Access Tokens to make a successful request. The Access Tokens must be associated with the user that you are requesting on behalf of. If you want to generate a set of Access Tokens for another user, they must authorize or authenticate your App using an Authorize URL.

Please note that OAuth 2.0 can be tricky to use. If you are not familiar with this authentication method, we recommend using a library or a tool like Postman to properly authenticate your requests.

Developer portal, Projects, and developer Apps

To retrieve a set of authentication credentials that will work with the X API v2 endpoints, you must have a developer account, set up a Project within that account, and created a developer App within that Project. You can then find your keys and tokens within your developer App. 

Rate limits

Every day, many thousands of developers make requests to the X API. To help manage the sheer volume of these requests, rate limits are placed on each endpoint that limits the number of requests that you can make on behalf of your app or on behalf of an authenticated user. 

These endpoints are rate limited at the user level, meaning that the authenticated user that you are making the request on behalf of can only call the endpoint a certain number of times across any developer App. There is a user rate limit of 180 requests per 15 min window for the GET method. With the GET method of the Bookmarks lookup endpoint you will get back 800 of your most recent Bookmarked Posts. Additionally, there is a user rate limit of 50 requests per 15 minutes for the POST and DELETE methods. 

API Reference index

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

Bookmarks lookup

**Lookup a user’s Bookmarks **GET /2/users/:id/bookmarks

Manage Bookmarks

Bookmark a Post[POST /2/users/:id/bookmarks](/x-api/x-api-v2/tweets/bookmarks#api-reference-index/post-users-id-bookmarks)
Remove a Bookmark of a Post[DELETE /2/users/:id/bookmarks/:tweet_id](/x-api/x-api-v2/tweets/bookmarks#api-reference-index/delete-users-id-bookmarks-tweet_id)

DELETE /2/users/:id/bookmarks/:tweet_id

Allows a user or authenticated user ID to remove a Bookmark of a Tweet.

Endpoint URL

https://api.x.com/2/users/:id/bookmarks/:tweet_id

Authentication and rate limits

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

OAuth 2.0 scopes required by this endpoint

tweet.read

users.read

bookmark.write
Learn more about OAuth 2.0 Authorization Code with PKCE

Path parameters

NameTypeDescription
id
 Required
stringThe user ID of an authenticated user who you are removing a Bookmark of a Tweet on behalf of. It must match your own user ID or that of an authenticating user, meaning that you must pass the Access Tokens associated with the user ID when authenticating your request.
tweet_id
 Required
stringThe ID of the Tweet that you would like the id to remove a Bookmark of.

Example code with offical SDKs

(async () => {
  try {
    const removeBookmark =
      await twitterClient.bookmarks.usersIdBookmarksDelete(
        //The ID of the user whose bookmark is to be removed.
        "2244994945",

        //The ID of the tweet that the user is removing from bookmarks
        "1228393702244134912"
      );
    console.dir(removeBookmark, {
      depth: null,
    });
  } catch (error) {
    console.log(error);
  }
})();

Example responses

{
  "data": {
    "bookmarked": false
  }
}

Response fields

NameTypeDescription
bookmarksbooleanIndicates whether the user has removed the Bookmark of the specified Tweet. specified Tweet as a result of this request. The returned value is false for a successful request.

POST /2/users/:id/bookmarks

Causes the user ID of an authenticated user identified in the path parameter to Bookmark the target Tweet provided in the request body.

Endpoint URL

https://api.x.com/2/users/:id/bookmarks

Authentication and rate limits

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

OAuth 2.0 scopes required by this endpoint

tweet.read

users.read

bookmark.write
Learn more about OAuth 2.0 Authorization Code with PKCE

Path parameters

NameTypeDescription
id
 Required
stringThe user ID of an authenticated user who you are bookmarking a Tweet on behalf of. It must match your own user ID or that of an authenticating user, meaning that you must pass the Access Token associated with the user ID when authenticating your request.

JSON body parameters

NameTypeDescription
tweet_id
 Required
stringThe ID of the Tweet that you would like an id to Bookmark.

Example code with offical SDKs

(async () => {
  try {
    const postBookmark = await twitterClient.bookmarks.postUsersIdBookmarks(
      //User ID
      "2244994945",
      {
        tweet_id: "1228393702244134912",
      }
    );
    console.dir(postBookmark, {
      depth: null,
    });
  } catch (error) {
    console.log(error);
  }
})();

Example responses

{
  "data": {
    "bookmarked": true
  }
}

Response fields

NameTypeDescription
bookmarkedbooleanIndicates whether the user bookmarks the specified Tweet as a result of this request.

GET /2/users/:id/bookmarks

Allows you to get an authenticated user’s 800 most recent bookmarked Tweets.

Endpoint URL

https://api.x.com/2/users/:id/bookmarks

Authentication and rate limits

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

OAuth 2.0 scopes required by this endpoint

tweet.read

users.read

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

Path parameters

NameTypeDescription
id
 Required
stringUser ID of an authenticated user to request bookmarked Tweets for.

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
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.
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.
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.
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, entities, edit_controls, 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 getUserBookmarks =
      await twitterClient.bookmarks.getUsersIdBookmarks(
        //User ID
        "2244994945"
      );
    console.dir(getUserBookmarks, {
      depth: null,
    });
  } catch (error) {
    console.log(error);
  }
})();

Example responses

{
  "data": [
    {
      "id": "1362449997430542337",
      "text": "Honored to be the first developer to be featured in @TwitterDev's love fest 🥰♥️😍 https://t.co/g8TsPoZsij"
    },
    {
      "id": "1365416026435854338",
      "text": "We're so happy for our Official Partner @Brandwatch and their big news. https://t.co/3DwWBNSq0o https://t.co/bDUGbgPkKO"
    },
    {
      "id": "1296487407475462144",
      "text": "Check out this feature on @TwitterDev to learn more about how we're mining social media data to make sense of this evolving #publichealth crisis https://t.co/sIFLXRSvEX."
    },
    {
      "id": "1294346980072624128",
      "text": "I awake from five years of slumber https://t.co/OEPVyAFcfB"
    },
    {
      "id": "1283153843367206912",
      "text": "@wongmjane Wish we could tell you more, but I’m only a teapot 👀"
    }
  ],
  "meta": {
    "result_count": 5,
    "next_token": "zldjwdz3w6sba13nbs0mbravfipbtqvbiqplg9h0p4k"
  }
}

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_history_tweet_ids
 Default
arrayUnique identifiers indicating all versions of an edited Tweet. For Tweets with no edits, there will be one ID. For Tweets with an edit history, there will be multiple IDs, arranged in ascending order reflecting the order of edit, with the most recent version in the last position of the array.
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. This end index is exclusive.
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. This end index is exclusive.
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. This end index is exclusive.
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 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.