diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 406f8642a..79f1b7c0d 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -2,8 +2,6 @@ name: Update Documentation on: workflow_dispatch: - schedule: - - cron: '0 20 * * *' jobs: update-docs: diff --git a/resources/api-reference-index.mdx b/api-reference-index.mdx similarity index 100% rename from resources/api-reference-index.mdx rename to api-reference-index.mdx diff --git a/changelog.mdx b/changelog.mdx index 2f990946b..fea7e14c5 100644 --- a/changelog.mdx +++ b/changelog.mdx @@ -1,1579 +1,1275 @@ --- title: Changelog -description: "The X Developer Platform is updated frequently with new functionality and products to better suit your needs. We will be documenting all changes made to the platform’s products via this resource and the @API X account." -mode: wide +description: "The X Developer Platform is updated frequently with new functionality and products to better suit your needs. We will be documenting all changes made to the platform’s products via this resource and the @API X account." sidebarTitle: Overview --- -To subscribe to updates, please [**“Turn on notifications”**](https://help.x.com/en/managing-your-account/notifications-on-mobile-devices#:~:text=In%20the%20top%20menu,%20you,you%20would%20like%20to%20receive) for [**@API**](https://x.com/api). +To subscribe to updates, please [**“Turn on notifications”**](https://help.x.com/en/managing-your-account/notifications-on-mobile-devices#:~:text=In%20the%20top%20menu,%20you,you%20would%20like%20to%20receive) for [**@API**](https://x.com/api). + + +### Change to DM Events Behavior +Today, we made a change to X API V2 DM Events behavior. With the new change participant_ids array will only be included for ParticipantsJoin and ParticipantsLeave events, and it will list only the participants who joined or left at the time of the event. The MessageCreate event will no longer include the participant_ids array. Learn more [here](https://devcommunity.x.com/t/upcoming-change-to-x-api-dm-events-endpoints-behavior/241841). + + + +### Launch of Account Activity API Endpoints +Today, we launched new X API v2 [Account Activity API endpoints](/x-api/webhooks/introduction). Learn more [here](https://devcommunity.x.com/t/account-activity-api-is-now-available-in-v2/242895). + + + +### Improvements to Media Upload Endpoint +We made few improvements to media upload endpoint to improve the developer experience. We introduced Dedicated Endpoints for Chunked Media Upload [Media Upload endpoints](/x-api/media/introduction). Learn more [here](https://devcommunity.x.com/t/media-upload-endpoints-update-and-extended-migration-deadline/241818). + + + +### Support for Email Address Retrieval with OAuth 2.0 +Today, we added support for email address retrieval with OAuth 2.0 in X API V2. Learn more [here](https://devcommunity.x.com/t/announcing-support-for-email-address-retrieval-with-oauth-2-0-in-the-x-api-v2/240555). + + + +### Changes to User Affiliation Data +Today, we made changes to X API V2 User Affiliation Data. With the new change affiliation.user_id will return an array of user_ids. Earlier it used to return a single user_id as a string, even if a user had multiple affiliations. Learn more [here](https://devcommunity.x.com/t/change-to-x-api-user-affiliation-data/237164). + + + +### Launch of Media Upload Endpoints +Today, we launched new X API v2 [Media Upload endpoints](/x-api/media/introduction). Learn more [here](https://devcommunity.x.com/t/announcing-media-upload-endpoints-in-the-x-api-v2/234175/3). + + + +### Launch of New Documentation Site +Today, we launched our new X Developer Platform documentation site, [https://docs.x.com](https://docs.x.com). + + + +### Launch of xurl Tool +Today, we launched [xurl](https://github.com/xdevplatform/xurl), a new tool that simplifies API testing for X developers, which now supports OAuth 2.0. + + + +### Addition of Community ID Tweet Field +Today, we added the `community_id` Tweet Field to the X API v2. Learn more about it [here](https://x.com/tapshah21/status/1860061806653317126). + + + +### Addition of DM Blocking Endpoints +Today, we added the DM blocking and DM unblocking endpoints to the X API v2. + + + +### Support for Longform Posts +Today, we added the ability to create longform Posts with a length of 25k instead of 4k. + + + +### Support for Long Form Posts +Today, we added the ability to create long form Posts using the X API v2 + + + +### Retrieve User Affiliation +Today, we added the ability to retrieve a User's affiliation programmatically using the X API v2 + + + +### Get Article Metadata +Today, we added the ability to get Article metadata using the X API v2 + + + +### Get Profile Image and Cover Picture +Today, we added the ability to get profile Image and cover picture URL via the X V2 API + + + +### Addition of Connection Status Field +Today, we added the connection_status field in the X API v2. Learn more about it [here](https://devcommunity.x.com/t/announcing-connection-status-field-in-the-user-object-in-the-x-api-v2/212588). + + + +### Addition of Trends Lookup Endpoint +Today, we added the Trends lookup endpoint in the X API v2. Learn more about it [here](https://devcommunity.x.com/t/announcing-the-users-search-and-trends-lookup-endpoints-in-the-x-api-v2/210567). + + + +### Addition of Users Search Endpoint +Today, we added the Users Search endpoint in the X API v2. Learn more about it [here](https://devcommunity.x.com/t/announcing-the-users-search-and-trends-lookup-endpoints-in-the-x-api-v2/210567). + + + +### Get DM Permissions +Today, we added the ability to the get DM permissions via the X API v2. Learn more about it [here](https://devcommunity.x.com/t/dm-permissions-available-in-the-x-api-v2/209688). + + + +### Launch of Subscription Type Field +Today, we launched a subscription_type field on the User object in the X API v2. Learn more about it [here](https://devcommunity.x.com/t/new-subscription-type-field-is-available-in-the-twitter-api-v2/209219/2). + + + +### Get Posts Usage Endpoint +Today, we launched an endpoint to programmatically get your posts usage in the X API v2. Learn more about it [here](https://developer.x.com/en/docs/twitter-api/usage/tweets/api-reference/get-usage-tweets). + + + +### Launch of Reposts Lookup Endpoint +Today, we launched an endpoint to lookup reposts of a post in the X API v2. Learn more about it [here](https://developer.x.com/en/docs/twitter-api/tweets/retweets/api-reference/get-tweets-id-retweets). + + + +### Deprecation of Search Endpoints +Today, we are deprecating the search/tweets, users/search, and geo/search endpoints in the X API v1.1. Learn more [here](https://developer.x.com/en/docs/twitter-api/enterprise/powertrack-api/guides/powertrack_recovery_and_redundancy_features). + + + +### Deprecation of Replay API Endpoint +Today, we are deprecating the Replay API endpoint from the enterprise X API. You can use [recovery](https://developer.x.com/en/docs/twitter-api/enterprise/powertrack-api/guides/powertrack_recovery_and_redundancy_features) featured instead. + + + +### Deprecation of Historical Powertrack Endpoints +Today, we are deprecating the Historical Powertrack and Insights track endpoints from the enterprise X API. + + + +### Removal of Follows Endpoints from Basic and Pro Tiers +Today, we are removing the Follows and List Follows endpoints from the Basic and Pro tiers of the X API v2. + + + +### Removal of Manage Blocks Endpoint +Today, we are removing the Manage Blocks endpoint from X API v2. + + + +### Support for Bookmarks Count and Long Posts +Today, we added support for retrieving bookmarks count and the ability to retrieve posts with more than 280 characters in the X API v2. + + + +### Deprecation of Statuses/Filter Endpoint +Today, we are deprecating the statuses/filter endpoint in the X API v1.1 Developers can use the filtered stream endpoint in the X API v2. + + + +### Support for View Counts +Today, we are adding support for view counts in the X API v2. A new field called impression_count is made available in the public_metrics of the post payload. + + + +### Addition of Verified Type Field +Today, we are adding a verified_type user field to the X API v2 that indicates the type of verification a user account has (blue, business, government or none) . + + + +### Removal of Source Field +Today, we are removing the source field from the post payload in the X APIs. + - - - ### June 3, 2025 + +### Addition of Direct Messages Endpoints +Today, Today, we are adding six v2 Direct Messages endpoints. This release includes three GET methods for retrieving Direct Message conversation events and three POST methods for creating new Direct Messages. These methods support group conversations for the first time. - `X API` + Please visit our [blog post](https://developer.x.com/en/blog/product-news/2022/new-v2-direct-messages-endpoints) to learn more about this update. + - Today, we made a change to X API V2 DM Events behavior. With the new change participant_ids array will only be included for ParticipantsJoin and ParticipantsLeave events, and it will list only the participants who joined or left at the time of the event. The MessageCreate event will no longer include the participant_ids array. Learn more [here](https://devcommunity.x.com/t/upcoming-change-to-x-api-dm-events-endpoints-behavior/241841). - - ### May 20, 2025 + +### Support for Edited Post Metadata +Today, we are adding the ability for developers to retrieve edited post metadata using the X API v2. - `X API` + Please visit our [blog post](https://developer.x.com/en/blog/product-news/2022/supporting-edit-tweet-functionality) to learn more about this update. + - Today, we launched new X API v2 [Account Activity API endpoints](/x-api/webhooks/introduction). Learn more [here](https://devcommunity.x.com/t/account-activity-api-is-now-available-in-v2/242895). + +### Addition of Filtering Operator Aliases +Filtering/query operator "aliases" were added to search and filtered stream endpoints, across enterprise, premium, and v2. In many cases, the operator refers to posts instead of statuses, e.g. "in_reply_to_tweet_id" as an alias for "in_reply_to_status_id." In other cases, the new operator alias adds more clarity to the matching performed. For example., since posts can only have one video attachment, a new "has:video_link" alias is provided for "has:videos." Check out the [v2 filtered stream operator table](https://developer.x.com/en/docs/twitter-api/tweets/filtered-stream/integrate/build-a-rule#list) to see more examples. + - ### April 30, 2025 + +### Updates to Reverse Chronological Home Timeline +Beginning today, the reverse chronological home timeline v2 endpoint can return every post created on a timeline over the last 7 days and the most recent 800 regardless of the creation date. + - `X API` + +### New Filtering Operators for Filtered Stream +Today, 10 new v2 filtering operators are now available to all developers building with the filtered stream endpoints, and another 10 are now more widely available. - We made few improvements to media upload endpoint to improve the developer experience. We introduced Dedicated Endpoints for Chunked Media Upload - [Media Upload endpoints](/x-api/media/introduction). Learn more [here](https://devcommunity.x.com/t/media-upload-endpoints-update-and-extended-migration-deadline/241818). + Please visit our [blog post](https://developer.x.com/en/blog/product-news/2022/twitter-api-v2-filtered-stream) to learn more about this update. + - ### April 3, 2025 + +### Updates to Streaming Endpoints Latency +Today, we’re making updates to the streaming endpoints in the X API v2 to reduce the latency by 50%. + - `X API` + +### Enabling v1.1 Media Endpoints in Essential Access +Today, we're enabling the v1.1 media endpoints in Essential access of the X API v2. - Today, we added support for email address retrieval with OAuth 2.0 in X API V2. Learn more [here](https://devcommunity.x.com/t/announcing-support-for-email-address-retrieval-with-oauth-2-0-in-the-x-api-v2/240555). + Please visit our [forum announcement](https://devcommunity.x.com/t/v1-1-media-endpoints-available-for-essential-access-in-the-twitter-api-v2/171664) to learn more about this update. + + +### Launch of Reverse Chronological Home Timeline Endpoint +Today, we’re launching a new endpoint that enables you to retrieve a collection of the most recent posts and reposts posted by who you follow. - ### February 18, 2025 + Please visit our [forum announcement](https://devcommunity.x.com/t/reverse-chronological-home-timeline-in-the-twitter-api-v2/171549) to learn more about this launch. - `X API` + Along with the new endpoints, the variants field is now available for the [media object](https://developer.x.com/en/docs/twitter-api/data-dictionary/object-model/media). This will give you the type of content attached with the URL. + - Today, we made changes to X API V2 User Affiliation Data. With the new change affiliation.user_id will return an array of user_ids. Earlier it used to return a single user_id as a string, even if a user had multiple affiliations. Learn more [here](https://devcommunity.x.com/t/change-to-x-api-user-affiliation-data/237164). - - ### January 16, 2025 + +### Launch of Bookmarks Endpoints +Today, we’re launching new endpoints that enable you to manage and lookup Bookmarks using the X API v2. The Bookmarks feature has long been available in the X app, but until now, there hasn’t been an endpoint that allows you to retrieve, create or build solutions to manage your Bookmarks via the API. - `X API` + Please visit our [forum announcement](https://devcommunity.x.com/t/build-with-bookmarks-on-the-twitter-api-v2/168804) to learn more about this launch. + - Today, we launched new X API v2 [Media Upload endpoints](/x-api/media/introduction). Learn more [here](https://devcommunity.x.com/t/announcing-media-upload-endpoints-in-the-x-api-v2/234175/3). + +### Launch of Quotes Lookup Endpoint +Today, we’re launching the [quotes lookup endpoint](https://developer.x.com/en/docs/twitter-api/tweets/retweets/introduction) that lets you get the quotes for a post ID. - ### January 13, 2025 + To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/introducing-the-quote-tweets-lookup-endpoint-to-the-twitter-api-v2/168370) to learn more about this launch. + - `Documentation` + +### Updates to Documentation Navigation +We’ve heard your feedback. Finding content in our documentation could be difficult, and it was confusing when you clicked on a link and were taken to an entirely different side navigation. - Today, we launched our new X Developer Platform documentation site, [https://docs.x.com](https://docs.x.com). + Today, we’ve released an updated docs navigation that enables you to browse the full offering of the X Developer Platform from a single side navigation. With this launch, we eliminated redundant pages, removed confusing icons, and improved how you can interact with the different elements within the navigation. - ### December 17, 2024 + If you have any feedback, please let us know via our [feedback channel](https://twitterdevfeedback.uservoice.com/forums/930250-twitter-api). + - `X API` + +### Improvements to Reposts and Likes Lookup Endpoints +Today, we’re launching improvements to the [reposts lookup](https://developer.x.com/en/docs/twitter-api/tweets/retweets/introduction) and the [Likes lookup](https://developer.x.com/en/docs/twitter-api/tweets/likes/introduction) endpoints, allowing you to get back the complete list of accounts who have Liked or reposted a post, not just the last 100 accounts to do so. - Today, we launched [xurl](https://github.com/xdevplatform/xurl), a new tool that simplifies API testing for X developers, which now supports OAuth 2.0. + To learn more about this launch, please visit our forum announcement to learn more about this launch. + - ### November 22, 2024 + +### Support for OAuth 2.0 Authentication +Today, all developers can now authenticate using OAuth 2.0 by selecting OAuth 2.0 as an authentication method in the developer portal. We’ve added support for confidential and public clients and all relevant v2 endpoints to use this authentication method as part of this release. - `X API v2` + OAuth 2.0 is an industry-standard authorization protocol that provides developers more control over an application’s scopes and improves authorization flows across multiple devices. In other words, developers building applications for people on X will have more control over the information their App requests from its users, so that you only have to ask your end-users for the data and information you need. - Today, we added the `community_id` Tweet Field to the X API v2. Learn more about it [here](https://x.com/tapshah21/status/1860061806653317126). + This modern authorization protocol will allow you to present your end-users with a more streamlined consent flow for authorizing your app, which only displays the specific scopes you have requested from them. - ### September 23, 2024 + To learn more about this launch, please visit our forum announcement. + - `X API v2` + +### Major Platform Updates to X API v2 +**Major platform updates: X API v2 is now the primary version, new Essential and Elevated access, and Policy changes** - Today, we added the DM blocking and DM unblocking endpoints to the X API v2. + Today, we are announcing that X API v2 is now the primary version of the X API. We have launched enough endpoints and functionality into X API v2 to satisfy the needs of 90% of all existing Apps built on the X API. - ### August 20, 2024 + We are launching the following changes today to further improve upon the X API v2 developer experience: - `X API v2` + * Fast and free Essential access to the API, and free Elevated access to developers who have had their use cases approved. We have a lot more details on these access levels available on our About the X API page. - Today, we added the ability to create longform Posts with a length of 25k instead of 4k. + * We are removing language in our Developer Policy that restricted how you build with X’s core features, and limited the number of users you can support through your app. - ### August 9, 2024 + * We are opening up our platform to encourage you to build tools and products that make X better, healthier, and extend the public conversation. [See a list of solutions we’d love to see you build](https://developer.x.com/en/docs/twitter-api/what-to-build). - `X API v2` + * Specifically, we’ve removed terms that restricted replication of the X experience, including X’s core features as well as terms that required permission to have high numbers of user tokens. - Today, we added the ability to create long form Posts using the X API v2 + * We know that building solutions that help people on X often means a developer has to build (or replicate) some of the things that are available on X. These changes to our Developer Policy are intended to drive clarity for the developer ecosystem and provide an open API platform that makes it easier for developers to build, innovate, and make an impact on the public conversation. - ### August 2, 2024 + We go into a lot more detail on this launch and the X API launches that led to this moment in our [forum post](https://devcommunity.x.com/t/ushering-in-a-new-era-for-the-twitter-developer-platform-with-the-twitter-api-v2/162087). - `X API v2` + In addition to exploring earlier changelog entries, we’ve put together some key resources that you can review to understand what all has released to X API v2 to-date: - Today, we added the ability to retrieve a User's affiliation programmatically using the X API v2 + * [X API endpoint map](/x-api/migrate/x-api-endpoint-map) - ### July 26, 2024 + * [About the X API](/x-api/getting-started/about-x-api) + - `X API v2` + +### Launch of List Lookup Endpoints +Today, we’re launching the new List lookup endpoints to X API v2. These endpoints will allow users to retrieve details on specified Lists such as followers, members, posts and more. The data retrieved can be used to build solutions that solve for curation, analysis and discoverability use cases and needs. In addition to new List endpoints, a new list: operator has been made available at the Academic Research access level. This will be available to use on search posts and post counts. - Today, we added the ability to get Article metadata using the X API v2 + To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/announcing-list-lookup-endpoints-for-the-twitter-api-v2/161965). + - ### June 17, 2024 + +### Additions to Spaces Endpoints +We are adding functionality to the Spaces endpoint to return the list of people who purchased a ticket to a Space, as well as support for Topics. - `X API v2` + To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/adding-new-functionality-to-spaces-endpoints/161959). + - Today, we added the ability to get profile Image and cover picture URL via the X V2 API + +### Launch of Manage Posts Endpoints +Today, we’re launching new manage posts endpoints to the X API v2. In addition to post and post delete functionality,, we’ve added the ability to post polls, tag people in images, create posts with reply settings, and post to Super Followers. - ### January 16, 2024 + To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/announcing-manage-tweets-endpoints-for-the-twitter-api-v2/161501). + - `X API v2` + +### Changes to Embedded Buttons +Today, we're making some changes to X's embedded buttons. Buttons are now more rounded to match X.com buttons and we've (very slightly) updated our color palette. - Today, we added the connection\_status field in the X API v2. Learn more about it [here](https://devcommunity.x.com/t/announcing-connection-status-field-in-the-user-object-in-the-x-api-v2/212588). + To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/embedded-buttons-have-a-new-look/160528). + - ### December 12, 2023 + +### Launch of Lists Endpoint Group +Today, we’re launching the new Lists endpoint group to X API v2. These endpoints will allow you to build solutions that curate and organize posts based on preferences, interests, groups, or topics. - `X API v2` + To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/announcing-new-twitter-api-v2-manage-list-endpoints/159980). + - Today, we added the Trends lookup endpoint in the X API v2. Learn more about it [here](https://devcommunity.x.com/t/announcing-the-users-search-and-trends-lookup-endpoints-in-the-x-api-v2/210567). + +### Launch of Mutes Lookup Endpoint +Today, we’re launching the new [mutes lookup](https://developer.x.com/en/docs/twitter-api/users/mutes/introduction) endpoint to the X API v2. This endpoint will allow authenticated users to retrieve and get information on the accounts they have muted. - ### December 8, 2023 + To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/announcing-new-mutes-lookup-endpoint-for-the-twitter-api-v2/159680). + - `X API v2` + +### Launch of OAuth 2.0 Beta +Today, we’re launching a beta of OAuth 2.0 and fine-grained scopes on the X API v2. . Developers interested in shaping the future of OAuth 2.0 on the X Developer Platform, can request access to the OAuth 2.0 beta. - Today, we added the Users Search endpoint in the X API v2. Learn more about it [here](https://devcommunity.x.com/t/announcing-the-users-search-and-trends-lookup-endpoints-in-the-x-api-v2/210567). + OAuth 2.0 is the industry standard for authentication and will allow for a more modern authorization experience. - ### November 29, 2023 + The OAuth 2.0 beta lets you test this new functionality in a v2 Project and associated App and give us feedback before a General Availability release. However, since this implementation of OAuth 2.0 is currently in development, we strongly recommend that you refrain from testing on a public, production environment, or app. - `X API v2` + To learn more about this launch, please visit our forum announcement. + - Today, we added the ability to the get DM permissions via the X API v2. Learn more about it [here](https://devcommunity.x.com/t/dm-permissions-available-in-the-x-api-v2/209688). + +### Launch of Batch Compliance Endpoints +Today, we’re launching the new [batch compliance endpoints](https://developer.x.com/en/docs/twitter-api/compliance/batch-compliance/introduction) to the X API v2 to make it easier for developers using the X API to keep their X data in compliance with our [Developer Agreement and Policy](https://developer.x.com/en/developer-terms/policy). These endpoints allow developers and researchers to batch upload large amounts of post or User IDs and understand what action is needed to ensure that their datasets reflect user intent and the current state of the content on X. - ### November 20, 2023 + To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/new-batch-compliance-endpoints-available-on-the-twitter-api-v2/158534). + - `X API v2` + +### Launch of Spaces Endpoints +Today, we’re launching the new [Spaces endpoints](https://developer.x.com/en/docs/twitter-api/spaces/overview) and a [new top-level Spaces data dictionary](https://developer.x.com/en/docs/twitter-api/data-dictionary/object-model/space) to the X API v2. The Spaces endpoints enable you to lookup Spaces by Space ID or user ID, or using keywords, hashtags, or usernames of people mentioned in a title. The new data dictionary contains relevant information about a Space such as its title, ticketed status, and participant metrics; all user IDs can be expanded into full objects. - Today, we launched a subscription\_type field on the User object in the X API v2. Learn more about it [here](https://devcommunity.x.com/t/new-subscription-type-field-is-available-in-the-twitter-api-v2/209219/2). + To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/introducing-new-spaces-endpoints-on-the-twitter-api-v2/158213). + - ### November 2, 2023 + +### New Object for Video Views Limitation +Previously, when you requested video view metrics using the enterprise \[Engagement API]/x-api/enterprise-gnip-2.0/fundamentals/engagement-api) on posts that are older than 1800 days old, we delivered a zero value without much context. Today, we will start delivering a new object in these cases called unsupported_for_video_views_tweet_ids, which will include a comma-separated list of post IDs that are older than 1800 days old. You will still receive all other requested metrics for these posts in a separate object. - `X API v2` + To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/new-engagement-api-video-views-object-to-clarify-limitation/158163). + - Today, we launched an endpoint to programmatically get your posts usage in the X API v2. Learn more about it [here](https://developer.x.com/en/docs/twitter-api/usage/tweets/api-reference/get-usage-tweets). + +### Addition of Alt Text Field +Today, we are making the alt_text field available in the X API v2 media object, in order to enable developers to build more consciously for accessibility. - ### September 28, 2023 + To request this field, you must pass the expansions=attachments.media_keys parameter, as well as the media.fields=alt_text parameter. If included in your request, this field will return the alt text for any posts that include images with alt text. - `X API v2` + To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/media-alt-text-field-now-available-in-twitter-api-v2/157939). + - Today, we launched an endpoint to lookup reposts of a post in the X API v2. Learn more about it [here](https://developer.x.com/en/docs/twitter-api/tweets/retweets/api-reference/get-tweets-id-retweets). + +### Launch of Reposts Endpoints +Today, we’re launching new [reposts](https://developer.x.com/en/docs/twitter-api/tweets/retweets) endpoints to X API v2. Developers can now use these endpoints to repost or undo a repost on behalf of an authenticated user, or to look up who reposted a given post. - ### September 28, 2023 + To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/announcing-new-twitter-api-v2-retweets-endpoints/156827). + - `X API v1.1` + +### Launch of Manage Mutes Endpoints +Today, we’re launching new [manage mutes](https://developer.x.com/en/docs/twitter-api/users/mutes/introduction) endpoints to the X API v2. These endpoints will allow authenticated users to mute or unmute accounts. - Today, we are deprecating the search/tweets, users/search, and geo/search endpoints in the X API v1.1. Learn more [here](https://developer.x.com/en/docs/twitter-api/enterprise/powertrack-api/guides/powertrack_recovery_and_redundancy_features). + To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/announcing-new-manage-mutes-endpoints-for-the-twitter-api-v2/156261). + - ### September 21, 2023 + We have now reduced the `max_results` that can deliver with the [full-archive search](/x-api/posts/full-archive-search) endpoint when you are requesting the `context_annotations` field with the `tweet.fields` parameter to 100, meaning that you can only pull up to 100 posts with the field per page. + - `X API: Enterprise` + +### Reliability Features for Streaming Endpoints +Today, we are launching two reliability streaming features for X API v2’s filtered stream and sampled stream called backfill and redundant connections, which are now available on the Academic Research product track. - Today, we are deprecating the Replay API endpoint from the enterprise X API. You can use [recovery](https://developer.x.com/en/docs/twitter-api/enterprise/powertrack-api/guides/powertrack_recovery_and_redundancy_features)  featured instead. + The redundant connections feature enables you to connect to a given stream two times, which can help to ensure that you maximize streaming up-time in case one of your streams experiences a disconnection. - ### August 1, 2023 + Backfill can be utilized by adding the backfill_minutes parameter and a whole number between one and five to your streaming request, and allows you to request missed data that might have resulted from a disconnected stream. - `X API v1.1` + To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/new-reliability-and-recovery-functionality-available-for-twitter-api-v2-streaming-endpoints/156244/2). + - Today, we are deprecating the Historical Powertrack and Insights track endpoints from the enterprise X API. + +### Launch of Post Counts Endpoints +Today, we’re launching the new [post counts endpoints](/x-api/posts/counts/introduction) to the X API v2. This includes two different endpoints: Recent post counts, which is available to all product tracks, and full-archive post counts, which is currently only available to the Academic Research Product Track. You can use these endpoints to receive the count of posts that matches a specified query. - ### June 26, 2023 + To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/introducing-new-tweet-counts-endpoints-to-the-twitter-api-v2/155997). + - `X API v2` + +### Improvements to Teams +Today, we’re launching key improvements to the functionality of teams based on feedback we’ve heard from the community. We have updated the style and design of the team page. We also made changes to the invitation flow to make it easier to invite team members or to learn more about why an invitation might have failed. If you have a team account you can check out the changes by viewing the [teams page](https://developer.x.com/en/portal/teams) of the developer portal. To learn more about teams check out our [documentation on the subject](https://developer.x.com/en/docs/developer-portal/overview#team) and related [FAQ](https://developer.x.com/en/docs/developer-portal/faq#dev-portal-management-faq). - Today, we are removing the Follows and List Follows endpoints from the Basic and Pro tiers of the X API v2. + To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/announcing-improvements-to-the-functionality-of-teams/155447/2). + - ### June 12, 2023 + +### Retirement of Configuration Endpoint +Today, we retired the standard v1.1 GET /help/configuration endpoint. - `X API v2` + To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/retiring-the-1-1-configuration-endpoint/153319). + - Today, we are removing the Manage Blocks endpoint from X API v2. + +### Consolidation of oEmbed Endpoint +Today, we’re sharing that the v1.1 oEmbed endpoint will be retired and removed on November 23, 2021, so that new features can be supported in a consistent manner. After that date, the only official and supported API endpoint for X oEmbeds (embedded posts and timelines) will be via publish.x.com/oembed. - ### May 31, 2023 + To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/consolidating-the-oembed-functionality/154690/2). + - `X API v2` + +### Launch of Blocks and Likes Lookup Endpoints +Today, we’re launching the new [blocks](/x-api/users/blocks) and [Likes](/x-api/posts/likes) lookup endpoints to the X API v2. These endpoints enable you to use the v2 API to get information about which posts an account has liked, what users have liked a post, and who you or an authenticated user has blocked. - Today, we added support for retrieving bookmarks count and the ability to retrieve posts with more than 280 characters in the X API v2. + To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/announcing-twitter-api-v2-likes-lookup-and-blocks-lookup/154353). + - ### March 14, 2023 + +### Launch of Manage Likes Endpoints +Today, we’re launching the new [manage Likes](https://developer.x.com/en/docs/twitter-api/tweets/likes) endpoints to the X API v2. These endpoints enable you to use the v2 API to like and unlike posts. - `X API v1.1` + To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/announcing-new-manage-likes-endpoints-for-thetwitter-api-v2/152780). + - Today, we are deprecating the statuses/filter endpoint in the X API v1.1 Developers can use the filtered stream endpoint in the X API v2. + +### Launch of Manage Blocks Endpoints +Today, we’re launching the new [manage blocks](/x-api/users/blocks) endpoints to the X API v2. These endpoints enable you to block or unblock accounts on behalf of a user using user IDs. - ### January 5, 2023 + To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/announcing-manage-blocks-for-twitter-api-v2/152358/2). + - `X API v2` + +### Removal of Support for Embedded Timelines +Today we’re sharing our plans for the future of [embedded timeline widgets](https://developer.x.com/en/docs/x-for-websites/timelines/overview). On June 23rd 2021, we plan to retire the Likes, Collections, and Moments timelines. We recommended you use the [Profile](https://developer.x.com/en/docs/x-for-websites/timelines/guides/profile-timeline) and [Lists](https://developer.x.com/en/docs/x-for-websites/timelines/guides/list-timeline) timelines, which we’re updating to become faster, easier to use, and more up-to-date with X features and functionality. - Today, we are adding support for view counts in the X API v2. A new field called impression\_count is made available in the public\_metrics of the post payload. + You can learn more about this change in our [forum announcement](https://devcommunity.x.com/t/removing-support-for-embedded-like-collection-and-moment-timelines/150313). + - ### December 21, 2022 + +### Launch of Manage Follows Endpoints +Today, we’re launching the new [manage follows](/x-api/users/follows) endpoints to the X API v2. These endpoints enable you to follow or unfollow accounts on behalf of a user using their user ID. This launch comes just a few months after the launch of the [follows lookup](/x-api/users/follows) endpoints, which allow you to retrieve an account’s followers and who they are following. - `X API v2` + To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/introducing-the-new-manage-follows-endpoints-to-the-twitter-api-v2/149465). + - Today, we are adding a verified\_type user field to the X API v2 that indicates the type of verification a user account has (blue, business, government or none) . + +### Introduction of Academic Research Product Track +Today, we are introducing the new [Academic Research product track](/resources/fundamentals/projects) to [X API v2](/x-api/introduction). This update introduces a new application process for Academic Researchers that will provide those that are approved with an Academic Research [Project](/resources/fundamentals/projects) that will unlock greater access and advanced functionality. - ### December 20, 2022 + With the new Academic Research product track, you will be able to access the following: - `X API v2` + * The new X API v2 [full-archive search endpoint](/x-api/posts/full-archive-search), which is only available to the Academic Research product track at this time. - Today, we are removing the source field from the post payload in the X APIs. + * An increased [post cap](/x-api/fundamentals/post-cap) of 10 million, up from the 500,000 that is available to the [Standard product track](/resources/fundamentals/projects) at the Basic [access level](https://developer.x.com/en/products/x-api/early-access/guide#na_2). - ### October 27, 2022 + * New filter operators available to [recent search](/x-api/posts/recent-search), [full-archive search](/x-api/posts/full-archive-search), and [filtered stream](/x-api/posts/filtered-stream), including `$` (aka cashtag), `bio` (only available via filtered stream), `bio_name` (only available via filtered stream), `bio_location` (only available via filtered stream), `place`, `place_country`, `point_radius`, `bounding_box`, `-is:nullcast`, `has:cashtags` and `has:geo`. - `X API v2` + * An increased rule limit for filtered stream of 1,000 concurrent rules, up from the 25 that is available to the Standard product track at the Basic access level. - Today, Today, we are adding six v2 Direct Messages endpoints. This release includes three GET methods for retrieving Direct Message conversation events and three POST methods for creating new Direct Messages. These methods support group conversations for the first time. + * An increased query and rule character limit of 1,024 characters long, up from the 512 character limit that is available to the Standard product tack at the Basic access level - Please visit our [blog post](https://developer.x.com/en/blog/product-news/2022/new-v2-direct-messages-endpoints) to learn more about this update. + To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/introducing-the-new-academic-research-product-track/148632). + - ### September 29, 2022 + +### Addition of Reply Settings Field +Today we are launching a new field in the post object called reply_settings. This field is available on all X API v2 endpoints that return posts including post lookup, hide replies, recent search, sampled stream, filtered stream, follows lookup, user post timeline, and user mention timeline endpoints or by [expanding](/x-api/fundamentals/expansions) the post object in any endpoint. - `X API v2` + This field indicates how the post author has allowed others to reply to their posts, whether it’s everyone, just the people they mention in the post, or those they follow. The field values returned by the `reply_settings` field include `everyone`, `mentionedUsers`, and `following`. If no conversation controls are set for the post, this will still show up in the post object with `everyone` value for the field. + - Today, we are adding the ability for developers to retrieve edited post metadata using the X API v2. + +### Launch of User Post and Mention Timeline Endpoints +Today, we’re launching the new [user post timeline and user mention timeline endpoints](/x-api/posts/timelines) to the X API v2. These endpoints enable you to request the posts composed by, or mentioning, a specified account on X. Learn more in the forum post announcement. + - Please visit our [blog post](https://developer.x.com/en/blog/product-news/2022/supporting-edit-tweet-functionality) to learn more about this update. + +### Launch of Follows Lookup Endpoints +Today, we’re launching the new [follows lookup endpoints](/x-api/users/follows) to the X API v2. These endpoints enable you to retrieve an account’s followers and who they are following using their user ID. Learn more in the forum post announcement. + - ### August 3rd, 2022 + +### Retirement of Labs v2 Endpoints +Retired Labs v2 recent search and hide replies endpoints - `X API v2` + We have retired the following endpoints. If you were using the Labs versions of these endpoints, you can use the linked migration guides to update your integration to start using the new X API v2 versions: - Filtering/query operator "aliases" were added to search and filtered stream endpoints, across enterprise, premium, and v2. In many cases, the operator refers to posts instead of statuses, e.g. "in\_reply\_to\_tweet\_id" as an alias for "in\_reply\_to\_status\_id." In other cases, the new operator alias adds more clarity to the matching performed. For example., since posts can only have one video attachment, a new "has:video\_link" alias is provided for "has:videos." Check out the [v2 filtered stream operator table](https://developer.x.com/en/docs/twitter-api/tweets/filtered-stream/integrate/build-a-rule#list) to see more examples. + * [Recent search v2](/x-api/posts/search/migrate/overview) - ### July 27th, 2022 + * [Hide replies v2](/x-api/posts/hide-replies/migrate) - `X API v2` + We also have additional details about migration to the new X API v2 via our [migration hub](/x-api/migrate/overview). - Beginning today, the reverse chronological home timeline v2 endpoint can return every post created on a timeline over the last 7 days and the most recent 800 regardless of the creation date.  + If you have any questions, please reach out to our [Labs forum category](https://devcommunity.x.com/c/labs/57). + - ### July 19th, 2022 + +### Retirement of Labs v1 Endpoints +On August 12th, 2020, we launched the new X API v2: Early access. With this release, we graduated several endpoints to X API v2 from the Labs program, and announced that the Labs version of the endpoints would remain in a deprecated state for 60 days before retiring them. - `X API v2` + Today marks 60 days since the launch, meaning that we have retired the following endpoints. If you are using the Labs versions of these endpoints, you can use the linked migration guides to update your integration to start using the new X API v2 versions: - Today, 10 new v2 filtering operators are now available to all developers building with the filtered stream endpoints, and another 10 are now more widely available.   + * [post metrics v1](https://developer.x.com/en/docs/labs/migrate) - Please visit our [blog post](https://developer.x.com/en/blog/product-news/2022/twitter-api-v2-filtered-stream) to learn more about this update. + * [Filtered stream v1](/x-api/posts/filtered-stream#comparing-x-apis-filtered-stream-endpoints) - ### June 16th, 2022 + * [Sampled stream v1](https://developer.x.com/en/docs/x-api/posts/sampled-stream/migrate) - `X API v2` + We also have additional details about migration to the new X API v2 via our [migration hub](/x-api/migrate/overview). - Today, we’re making updates to the streaming endpoints in the X API v2 to reduce the latency by 50%. + If you have any questions, please reach out to our [Labs forum category](https://devcommunity.x.com/c/labs/57). + - ### May 23rd, 2022 + +### Addition of Post Consumption Status Bar +In the [main dashboard page](https://developer.x.com/en/portal/dashboard) of the new developer portal, you can now check your usage towards the [post cap](/x-api/fundamentals/post-cap) of 500,000 posts per month. This cap is applied at the Project level, across the following v2 endpoints in Basic access: filtered stream, and recent search. - `X API v2` + In order to see this feature and use the new v2 endpoints, you will need to activate the [new developer portal experience](https://developer.x.com/en/portal/opt-in.html). + - Today, we're enabling the v1.1 media endpoints in Essential access of the X API v2. + +### Launch of Hide Replies Endpoint +Today, we’re launching the new hide replies endpoint into the v2 X API. This endpoint enables you to hide abusive, distracting, or misleading replies to posts – a crucial piece to improving the health of the public conversation. Learn more in the forum post announcement. - Please visit our [forum announcement](https://devcommunity.x.com/t/v1-1-media-endpoints-available-for-essential-access-in-the-twitter-api-v2/171664) to learn more about this update. + The same endpoint in X Developer Labs is now deprecated, and it will be retired in 90 days. Learn how to [migrate to the v2 endpoint.](/x-api/posts/hide-replies#comparing-twitter-apis-hide-replies-endpoints) + - ### May 19th, 2022 + +### Early Access to X API v2 Endpoints +Today we announced [Early Access to the first endpoints of the new X API](https://blog.x.com/developer/en_us/topics/tools/2020/introducing_new_twitter_api.html)! - `X API v2` + The new X API features a new API foundation which will allow us to deliver new functionality faster; an updated data format and new functionality that gives you more control over which fields you receive; new post, user, and media fields; and a set of updated endpoints that enable you to listen to and analyze posts, including the following: - Today, we’re launching a new endpoint that enables you to retrieve a collection of the most recent posts and reposts posted by who you follow.  + * [post lookup](/x-api/posts/post-lookup-by-post-ids) - Please visit our [forum announcement](https://devcommunity.x.com/t/reverse-chronological-home-timeline-in-the-twitter-api-v2/171549) to learn more about this launch. + * [User lookup](/x-api/users/user-lookup-by-id) - Along with the new endpoints,  the variants field is now available for the [media object](https://developer.x.com/en/docs/twitter-api/data-dictionary/object-model/media). This will give you the type of content attached with the URL. + * [Recent search](/x-api/posts/recent-search) - ### March 24th, 2022 + * [Filtered stream](/x-api/posts/filtered-stream) - `X API v2` + * [Sampled stream](/x-api/posts/sample-stream) - Today, we’re launching new endpoints that enable you to manage and lookup Bookmarks using the X API v2. The Bookmarks feature has long been available in the X app, but until now, there hasn’t been an endpoint that allows you to retrieve, create or build solutions to manage your Bookmarks via the API.   + You can find a full list of the new functionality available, and find migration resources on our \[X API v2: Early Access docs page]https://developer.x.com/en/docs/x-api/early-access). - Please visit our [forum announcement](https://devcommunity.x.com/t/build-with-bookmarks-on-the-twitter-api-v2/168804) to learn more about this launch. + Learn more about what we have planned in our “\[Guide to the future of the X API]https://developer.x.com/en/docs/x-api/early-access)”. + - ### March 17th, 2022 + +### Deprecation of Labs Endpoints +We are deprecating certain Labs endpoints due to the launch of their X API v2 replacements in this release. - `X API v2` + The following Labs v1 endpoints will be retired 60 days from today's release: - Today, we’re launching the [quotes lookup endpoint](https://developer.x.com/en/docs/twitter-api/tweets/retweets/introduction) that lets you get the quotes for a post ID.  + * post metrics v1 - To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/introducing-the-quote-tweets-lookup-endpoint-to-the-twitter-api-v2/168370) to learn more about this launch. + * Filtered stream v1 - ### February 3, 2022 + * Sampled stream v1 - `Documentation` + The following Labs v2 endpoint will be retired 90 days from today’s release: - We’ve heard your feedback. Finding content in our documentation could be difficult, and it was confusing when you clicked on a link and were taken to an entirely different side navigation.  + * Recent search v2 + - Today, we’ve released an updated docs navigation that enables you to browse the full offering of the X Developer Platform from a single side navigation. With this launch, we eliminated redundant pages, removed confusing icons, and improved how you can interact with the different elements within the navigation.  + +### Improvements to Hide Replies +We added the ability to unhide a reply. Additionally, previously unhidden replies can now be hidden again via this endpoint. - If you have any feedback, please let us know via our [feedback channel](https://twitterdevfeedback.uservoice.com/forums/930250-twitter-api). + Get more details in the [Hide replies documentation](https://developer.x.comhttps://developer.x.com/en/docs/labs). + - ### January 20th, 2022 + +### Retirement of Labs v1 Endpoints +Today we are retiring the Labs v1 posts and users, hide replies, and recent search endpoints. - `X API v2` + You can read more about our Labs v1 plan in our [forum announcement](https://devcommunity.x.com/t/update-on-labs-v1-endpoints/138641). + - Today, we’re launching improvements to the [reposts lookup](https://developer.x.com/en/docs/twitter-api/tweets/retweets/introduction) and the [Likes lookup](https://developer.x.com/en/docs/twitter-api/tweets/likes/introduction) endpoints, allowing you to get back the complete list of accounts who have Liked or reposted a post, not just the last 100 accounts to do so.  + +### Addition of Quote Tweets Metric +Today, the `quote_tweets` metric is now available for 'unowned' posts via the [/totals](/x-api/enterprise-gnip-2.0/fundamentals/engagement-api#post-insights-engagement) endpoint. This means that you can access the quote count for all posts by using app-only authentication. - To learn more about this launch, please visit our forum announcement to learn more about this launch. + You can read more about this change in our [forum post](https://devcommunity.x.com/t/how-the-new-retweets-and-comments-metric-is-returned-with-the-twitter-api/139131). + - ### December 14th, 2021 + +### Addition of New Post Metrics +Today we are adding two new non-public metrics subfields, `user_profile_clicks` and `url_link_clicks`, to the post object in the X Developer Labs post lookup endpoints. They will be returned when using the `tweet.fields` parameter with any of the following values: `non_public_metrics`, `organic_metrics`, or `promoted_metrics`. - `X API v2: Authentication` + To learn more, please visit the [post lookup API reference](https://developer.x.com/en/docs/labs/tweets-and-users/api-reference/get-tweets-id) + - Today, all developers can now authenticate using OAuth 2.0 by selecting OAuth 2.0 as an authentication method in the developer portal. We’ve added support for confidential and public clients and all relevant v2 endpoints to use this authentication method as part of this release.  + +### Changes to Repost Counts +Starting today, X web, iOS and Android will be showing the total 'reposts and comments' count per post. Using the X API, the total 'reposts and comments' number matching the X interface can be calculated by adding the `retweet_count` and `quote_count` when available. Additionally `quote_count` will be the total unique accounts that have quoted the post, rather than the total posts quoting the post. For more details, please see our [forum post](https://devcommunity.x.com/t/how-the-new-retweets-and-comments-metric-is-returned-with-the-twitter-api/139131/2). + - OAuth 2.0 is an industry-standard authorization protocol that provides developers more control over an application’s scopes and improves authorization flows across multiple devices. In other words, developers building applications for people on X will have more control over the information their App requests from its users, so that you only have to ask your end-users for the data and information you need.  + +### Organic and Promoted Metrics Groupings +We are adding `organic_metrics` and `promoted_metrics` to the post and media objects in the post lookup endpoints. + - This modern authorization protocol will allow you to present your end-users with a more streamlined consent flow for authorizing your app, which only displays the specific scopes you have requested from them. + +### Addition of Metrics to Endpoints +We are adding metrics to the post and media objects in the post lookup and recent search endpoints. - To learn more about this launch, please visit our forum announcement. + You can read more about these changes in our [forum announcement](https://devcommunity.x.com/t/adding-metrics-to-the-tweets-and-recent-search-endpoints-in-labs/135315) + - ### November 15th, 2021 + +### Launch of COVID-19 Endpoints +Today we are launching a new COVID-19 stream endpoint and an accompanying compliance endpoint. - `X API v2: Early Access` + You can read more about these changes in our [forum announcement.](https://devcommunity.x.com/t/new-covid-19-stream-endpoint-available-in-twitter-developer-labs/135540) + - **Major platform updates: X API v2 is now the primary version, new Essential and Elevated access, and Policy changes** + +### Updates to Replay API User Profiles +Starting today, the Replay API will deliver user profile objects that reflect the referenced user at the time the Replay API is running. This change to deliver current user profile objects is similar to the recent Historical PowerTrack update below from Nov. 25, 2019. + - Today, we are announcing that X API v2 is now the primary version of the X API. We have launched enough endpoints and functionality into X API v2 to satisfy the needs of 90% of all existing Apps built on the X API.  + +### Addition of Post Annotations +We are adding annotations to the post object in the posts and recent search endpoints. - We are launching the following changes today to further improve upon the X API v2 developer experience: + You can read more about this change in our [forum announcement](https://devcommunity.x.com/t/adding-annotations-to-tweets-and-recent-search-endpoints-in-labs/135193). + - * Fast and free Essential access to the API, and free Elevated access to developers who have had their use cases approved. We have a lot more details on these access levels available on our About the X API page.  + +### Updates to Developer Policy +Today, we announced a significant [update to the Developer Policy](https://developer.x.com/en/developer-terms/policy). We encourage you to read more about this via our [forum](https://devcommunity.x.com/t/a-new-easier-to-understand-twitter-developer-policy/135038) and [blog](https://blog.x.com/developer/en_us/topics/community/2020/twitter_developer_policy_update.html) posts, and to review the revised policy. The Developer Policy is one of the foundations for your use of the X API and it is important to understand your commitments. + - * We are removing language in our Developer Policy that restricted how you build with X’s core features, and limited the number of users you can support through your app. + +### Launch of Hide Replies Endpoint +We want to help people feel safe and comfortable having conversations on X. As part of that, today we’re excited to give post authors more control over the conversations they start by supporting the hide replies feature with a new [endpoint](/x-api/posts/hide-replies). - * We are opening up our platform to encourage you to build tools and products that make X better, healthier, and extend the public conversation. [See a list of solutions we’d love to see you build](https://developer.x.com/en/docs/twitter-api/what-to-build).  + You can read more about this new endpoint in our [forum announcement](https://devcommunity.x.com/t/introducing-the-hide-replies-endpoint/134683). + - * Specifically, we’ve removed terms that restricted replication of the X experience, including X’s core features as well as terms that required permission to have high numbers of user tokens.  + +### Release of v2 Labs Endpoints +Today, we are bringing our posts and Users, Recent Search and Hide Replies endpoints to v2 of Labs. We are deprecating Labs v1 endpoints and will fully retire them 90 days after this initial release. We will also keep our v1 documentation available for this duration. You can provide us feedback on this versioning strategy via our [feedback channel](https://twitterdevfeedback.uservoice.com/). - * We know that building solutions that help people on X often means a developer has to build (or replicate) some of the things that are available on X. These changes to our Developer Policy are intended to drive clarity for the developer ecosystem and provide an open API platform that makes it easier for developers to build, innovate, and make an impact on the public conversation. + We're releasing the following changes to posts and Users: - We go into a lot more detail on this launch and the X API launches that led to this moment in our [forum post](https://devcommunity.x.com/t/ushering-in-a-new-era-for-the-twitter-developer-platform-with-the-twitter-api-v2/162087).  + * Introduce [fields](/x-api/fundamentals/fields) as a query parameter - In addition to exploring earlier changelog entries, we’ve put together some key resources that you can review to understand what all has released to X API v2 to-date: + * Remove [formats](https://developer.x.com/en/docs/labs#payload) as a query parameter - * [X API endpoint map](/x-api/migrate/x-api-endpoint-map) + * Add path variable for single ID [lookup](https://developer.x.com/en/docs/labs/overview/versioning/migration-guide#id-lookup-path) in posts and Users - * [About the X API](/x-api/getting-started/about-x-api)  + * Adjusting the path and query parameters for single and multi-username [lookup](/x-api/migrate/overview#username-lookup-path) in GET /users - ### November 15th, 2021 + * Change field name `stats` to `public_metrics` - `X API v2: Early Access` + Other changes include: - Today, we’re launching the new List lookup endpoints to X API v2. These endpoints will allow users to retrieve details on specified Lists such as followers, members, posts and more. The data retrieved can be used to build solutions that solve for curation, analysis and discoverability use cases and needs. In addition to new List endpoints, a new list: operator has been made available at the Academic Research access level. This will be available to use on search posts and post counts. + * Remove the `most_recent_tweet_id` expansion in Users - To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/announcing-list-lookup-endpoints-for-the-twitter-api-v2/161965). + * Remove HTML tags from the `source` field in posts to make that field easier to parse - ### November 15th, 2021 + The core search, pagination and other functionality of Recent Search will stay the same. - `X API v2: Early Access` + We have put together some [migration materials](/x-api/migrate/overview) for when you update from v1 to v2. - We are adding functionality to the Spaces endpoint to return the list of people who purchased a ticket to a Space, as well as support for Topics. + You can read more about this change in our [forum announcement](https://devcommunity.x.com/t/releasing-a-new-version-of-labs-endpoints/134219). + - To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/adding-new-functionality-to-spaces-endpoints/161959). + +### Addition of Drop/Undrop Events to Compliance Firehose +Today we added new drop/undrop event types to the Compliance Firehose API. You can read more about them in our [documentation.](/x-api/enterprise-gnip-2.0/fundamentals/firehouse) + - ### November 3rd, 2021 + +### Changes to Access Token Management +Today, we're making changes to the way that Access Tokens and Access Token Secrets are presented and managed within the [applications Dashboard on developer.x.com](https://developer.x.com/content/developer-twitter/en/apps). - `X API v2: Early Access` + In order to make API integrations more secure, we will no longer show the Access Token and Access Token Secret on the Dashboard beyond the first time that these values are generated. - Today, we’re launching new manage posts endpoints to the X API v2. In addition to post and post delete functionality,, we’ve added the ability to post polls, tag people in images, create posts with reply settings, and post to Super Followers. + After the first time, these credentials can not be retrieved. You will be able to regenerate the tokens on the Dashboard, but this will invalidate your current token and secret. - To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/announcing-manage-tweets-endpoints-for-the-twitter-api-v2/161501). + You can read more about this change in our [forum announcement](https://devcommunity.x.com/t/upcoming-changes-to-access-token-and-secret-management/130851). + - ### October 12th, 2021 + +### Removal of SPDY Support +Starting January 15, 2020, all connections to the X API (and all other X domains) will no longer support SPDY connections. - `X for Websites` + You can read more about this change in our [forum announcement](https://devcommunity.x.com/t/removing-support-for-spdy-protocol-on-twitter/132530). + - Today, we're making some changes to X's embedded buttons. Buttons are now more rounded to match X.com buttons and we've (very slightly) updated our color palette. + +### Launch of Recent Search Endpoint in Labs +Today, we are releasing a new endpoint to [search for posts posted in the last 7 days](/x-api/posts/recent-search). - To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/embedded-buttons-have-a-new-look/160528). + Learn more about this launch via our [forum announcement.](https://devcommunity.x.com/t/new-recent-search-endpoint-available-in-labs/133076) + - ### September 29th, 2021 + +### Update to Twurl CLI +A new updated major release of our X API CLI, `[twurl](https://github.com/twitter/twurl)`, is now available. This release includes a number of bug fixes and enhancements and introduces Bearer Token support which helps to add functionality around the Premium and X Developer Labs endpoints. Read more in our [forum post](https://devcommunity.x.com/t/twurl-0-9-5-released/132966). + - `X API v2: Early Access` + +### Addition of Post Annotations in Streams +Today in X Developer Labs, we are releasing new metadata elements to the default post payload. These new fields, rendered as part of the post payload, will provide more contextual information about the post. - Today, we’re launching the new Lists endpoint group to X API v2. These endpoints will allow you to build solutions that curate and organize posts based on preferences, interests, groups, or topics. + Learn more about this launch via our [forum announcement](https://devcommunity.x.com/t/tweet-annotations-added-to-the-tweet-object-for-the-sampled-stream-and-filtered-stream-endpoints-in-labs/132407). + - To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/announcing-new-twitter-api-v2-manage-list-endpoints/159980). + +### Updates to Historical PowerTrack User Profiles +Today, we’re updating our "batch historical posts" endpoint (Historical PowerTrack) to provide user profile location, bio description, and display name information that reflects values in place at the of the job processing. When the updated user objects are delivered, there will be a new "updated" string array in the User/Actor object. - ### September 22nd, 2021 + There are up to three possible values: name, description, location: - `X API v2: Early Access` + `"updated": ["name", "description", "location"]` - Today, we’re launching the new [mutes lookup](https://developer.x.com/en/docs/twitter-api/users/mutes/introduction) endpoint to the X API v2. This endpoint will allow authenticated users to retrieve and get information on the accounts they have muted. + See the [documentation on Historical PowerTrack's data format](https://aem-author-production-version-6-3.twitter.biz/content/developer-twitter/en/docs/tweets/batch-historical/guides/powertrack-data-format.html) for more details. + - To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/announcing-new-mutes-lookup-endpoint-for-the-twitter-api-v2/159680). + +### Addition to Account Activity API +Today, we’re releasing a new feature to the Account Activity API that will provide developers with the ability to view whether an account that mentions your subscribed user is blocked. - ### September 9th, 2021 + You can read more about the `user_has_blocked` [data object structure](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#account-activity-data-object-structure) and check out our [forum announcement](https://devcommunity.x.com/t/new-release-account-activity-api-user-has-blocked-field/131157) for more details. + - #### OAuth 2.0 beta now available + +### Launch of Sampled Stream Endpoint in Labs +Today, we are releasing a new endpoint to [stream a sample of all public posts](/x-api/posts/recent-search) in real-time, as they are posted. - Today, we’re launching a beta of OAuth 2.0 and fine-grained scopes on the X API v2. . Developers interested in shaping the future of OAuth 2.0 on the X Developer Platform, can request access to the OAuth 2.0 beta.  + Learn more about this launch via our [forum announcement.](https://devcommunity.x.com/t/new-sampled-stream-endpoint-available-in-labs/130958) + - OAuth 2.0 is the industry standard for authentication and will allow for a more modern authorization experience.  + +### Launch of Filtered Stream Endpoint in Labs +Today, we are releasing a [new streaming endpoint](/x-api/posts/filtered-stream) to retrieve posts, and an endpoint to manage your filters in X Developer Labs. With these endpoints, you will be able to retrieve up to 500,000 posts per month (maximum 50 posts per second); you can set up to 10 filter rules on your stream (these can be applied at the same time). - The OAuth 2.0 beta lets you test this new functionality in a v2 Project and associated App and give us feedback before a General Availability release. However, since this implementation of OAuth 2.0 is currently in development, we strongly recommend that you refrain from testing on a public, production environment, or app. + Learn more about this launch via our [forum announcement](https://devcommunity.x.com/t/new-filtered-stream-endpoints-available-in-labs-and-the-future-of-statuses-filter/129888). - To learn more about this launch, please visit our forum announcement. + Requests parameters documented in the API reference pages are now clearly marked as either optional or required. Additionally, API reference pages will describe a JSON body payload when this is allowed by a request. + - ### August 25th, 2021 + +### Launch of Post Metrics in Labs +You can now retrieve engagement data for any post or list of posts from owned/authorized accounts. The posts you query must be no older than 30 days and cannot be reposts. - #### Batch compliance endpoints now available in X API v2 + [GET /tweets/metrics/private](https://developer.x.com/en/docs/labs/tweet-metrics/overview.html) supports the following metrics: - `X API v2: Early Access` + * `impressions` - Today, we’re launching the new [batch compliance endpoints](https://developer.x.com/en/docs/twitter-api/compliance/batch-compliance/introduction) to the X API v2 to make it easier for developers using the X API to keep their X data in compliance with our [Developer Agreement and Policy](https://developer.x.com/en/developer-terms/policy). These endpoints allow developers and researchers to batch upload large amounts of post or User IDs and understand what action is needed to ensure that their datasets reflect user intent and the current state of the content on X. + * `reposts` - To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/new-batch-compliance-endpoints-available-on-the-twitter-api-v2/158534). + * `quotes` - ### August 18th, 2021 + * `likes` - #### Spaces endpoints now available in X API v2 + * `replies` - `X API v2: Early Access` + * `video views` - Today, we’re launching the new [Spaces endpoints](https://developer.x.com/en/docs/twitter-api/spaces/overview) and a [new top-level Spaces data dictionary](https://developer.x.com/en/docs/twitter-api/data-dictionary/object-model/space) to the X API v2. The Spaces endpoints enable you to lookup Spaces by Space ID or user ID, or using keywords, hashtags, or usernames of people mentioned in a title. The new data dictionary contains relevant information about a Space such as its title, ticketed status, and participant metrics; all user IDs can be expanded into full objects. + * `video view quartiles` (where the requester is also the author of the media) - To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/introducing-new-spaces-endpoints-on-the-twitter-api-v2/158213). + Learn more about this launch via our [forum announcement](https://devcommunity.x.com/t/new-twitter-developer-labs-release-metrics-endpoint/129122). + - ### August 16th, 2021 + +### Changes to DM Permissions +Starting today, applications that need to create Direct Messages will be required to have "Read, Write, and Direct Messages" app permissions (RW+DM). Applications attempting to create Direct Messages with only the RW app permission will receive the following error: - #### New data object to help clarify video view limitation for Engagement API + `{"code": 93,"message": "This application is not allowed to access or delete your direct messages."}` - `X API: Enterprise` + You can learn more about this change via our [forum announcement](https://devcommunity.x.com/t/updates-to-app-permissions-direct-message-write-permission-change/128221). + - Previously, when you requested video view metrics using the enterprise \[Engagement API]/x-api/enterprise-gnip-2.0/fundamentals/engagement-api) on posts that are older than 1800 days old, we delivered a zero value without much context. Today, we will start delivering a new object in these cases called unsupported\_for\_video\_views\_tweet\_ids, which will include a comma-separated list of post IDs that are older than 1800 days old. You will still receive all other requested metrics for these posts in a separate object. + +### Addition of Pinned Post Expansion +`pinned_tweet_id` will expand a user’s pinned post through our user object expansion. + - To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/new-engagement-api-video-views-object-to-clarify-limitation/158163). + +### Addition of Quote Counts Metadata +Developers can use the new Labs endpoints to pull counts of quotes. + - ### August 11th, 2021 + +### Addition of Most Recent Post Expansion +`most_recent_tweet_id` will expand a user’s most recent post through our user object expansion. - #### Media alt text field now available in X API v2 + Learn more about this launch via our [forum announcement](https://devcommunity.x.com/t/update-to-twitter-developer-labs/128060). + - `X API v2: Early Access` + +### Requirement for TLS 1.2 +Today, all connections to the X API (and all other X domains) will require TLS 1.2. - Today, we are making the alt\_text field available in the X API v2 media object, in order to enable developers to build more consciously for accessibility.  + You can read more about this change in our [forum announcement](https://devcommunity.x.com/t/removing-support-for-legacy-tls-versions-1-0-1-1-on-twitter/126648/2). + - To request this field, you must pass the expansions=attachments.media\_keys parameter, as well as the media.fields=alt\_text parameter. If included in your request, this field will return the alt text for any posts that include images with alt text. + +### New Account Activity API Endpoint +Starting today, we are introducing the new [Account Activity API endpoint](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#api-reference) to deactivate user subscriptions using application-only OAuth. - To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/media-alt-text-field-now-available-in-twitter-api-v2/157939). + This new endpoint offers developers the convenience of only having to provide a bearer token to deactivate a subscription, without requiring the subscribed user’s access token. - ### July 14th, 2021 + We are immediately marking the existing enterprise Account Activity API endpoint used to deactivate user subscriptions with 3-Legged OAuth as deprecated. The endpoint will be retired and no longer be available starting from January 15, 2020. - #### reposts now available in X API v2 + Developers can learn more about this API in our [documentation](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#api-reference). + - `X API v2: Early Access` + +### New Expansions for Tweets Endpoint +We added two new expansions to the \[GET /tweets]https://developer.x.com/en/docs/labs/tweets-and-users/api-reference/get-tweets.html) endpoint: - Today, we’re launching new [reposts](https://developer.x.com/en/docs/twitter-api/tweets/retweets) endpoints to X API v2.  Developers can now use these endpoints to repost or undo a repost on behalf of an authenticated user, or to look up who reposted a given post. + entities.mentions.username will expand the username of any recognized user mention in a post into a full user object. - To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/announcing-new-twitter-api-v2-retweets-endpoints/156827). + `referenced_tweets.id.author_id` expands the ID of the author of any referenced post, when one of the posts requested is a repost, Quoted post or Reply. This expansion will also expand the referenced post ID into a full object. + - ### June 30th, 2021 + +### Support for Tweets and Users Endpoints in Labs +The first two endpoints are now available via the Labs portal. Make sure you have an approved developer account and have applied for Labs access to get started with these endpoints. - #### Manage mutes now available in X API v2 + [Key differences](https://developer.x.com/content/developer-twitter/en/docs/labs/overview/whats-new) from equivalent v1.1 functionality include: - `X API v2: Early Access` + * Single endpoint for single object "show" function and batch "lookups" - Today, we’re launching new [manage mutes](https://developer.x.com/en/docs/twitter-api/users/mutes/introduction) endpoints to the X API v2. These endpoints will allow authenticated users to mute or unmute accounts. + * \[Expansion parameters]) support the inclusion of additional objects as part of one request (e.g. mentioned users, referenced posts, e.g.) - To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/announcing-new-manage-mutes-endpoints-for-the-twitter-api-v2/156261). -   + * \[Format parameters]) support different data projections with more or less verbose payloads - #### New limits for max\_results when requesting context\_annotations field + * Rate limiting is at the app level, regardless of auth method (user context or bearer token) - `X API v2: Early Access` + Learn more about this launch via our [forum announcement](https://devcommunity.x.com/t/twitter-developer-labs-is-open-to-all-developers/126717). + - We have now reduced the `max_results` that can deliver with the [full-archive search](/x-api/posts/full-archive-search) endpoint when you are requesting the `context_annotations` field with the `tweet.fields` parameter to 100, meaning that you can only pull up to 100 posts with the field per page. + +### Retirement of Terms and Privacy Endpoints +We have fully retired the Terms of Service and Privacy Endpoints. The current status of our [Privacy Policy](https://x.com/en/privacy) and [Terms of Service](https://x.com/en/tos) is best served by our up-to-date web pages. - ### June 29th, 2021 + You can learn more about this change via our [forum announcement](https://devcommunity.x.com/t/terms-of-service-and-privacy-endpoints-will-no-longer-serve-content-after-june-10/125714). + - #### Redundant connections and backfill are now available with v2 filtered stream and sampled stream + +### Changes to User Object Fields +Today some user object fields, including user.lang, will start returning 'null' for updated metadata fields previously announced in our [forum post](https://devcommunity.x.com/t/upcoming-changes-to-user-object-and-get-users-suggestions-endpoints/124732). - `X API v2: Early Access` + Developers can learn about this change through our [documentation.](/x-api/fundamentals/data-dictionary#user) + - Today, we are launching two reliability streaming features for X API v2’s filtered stream and sampled stream called backfill and redundant connections, which are now available on the Academic Research product track.  + +### Launch of Account Activity Replay API +Starting today, we are introducing the [Account Activity Replay API](/x-api/enterprise-gnip-2.0/fundamentals/account-activity), a data recovery tool available with the enterprise tier of the [Account Activity API](/x-api/enterprise-gnip-2.0/fundamentals/account-activity) - The redundant connections feature enables you to connect to a given stream two times, which can help to ensure that you maximize streaming up-time in case one of your streams experiences a disconnection.  + The [Account Activity Replay API](/x-api/enterprise-gnip-2.0/fundamentals/account-activity) allows you to retrieve events from as far back as five days. It should be utilized to recover data in scenarios where your [webhook](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#api-reference) server misses events - Backfill can be utilized by adding the backfill\_minutes parameter and a whole number between one and five to your streaming request, and allows you to request missed data that might have resulted from a disconnected stream.  + Developers can learn more about this API in our [documentation](/x-api/enterprise-gnip-2.0/fundamentals/account-activity). + - To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/new-reliability-and-recovery-functionality-available-for-twitter-api-v2-streaming-endpoints/156244/2). + +### Support for Native Media in Quotes +Starting today, native media (photos, videos, and GIFs) can be added to quotes on X, which will be shown as additional media metadata in the entities sections of quote payloads. - ### June 24th, 2021 + Developers can learn more about this in our [documentation](https://developer.x.com/en/docs/x-api/v1/data-dictionary/object-model/tweet). + - #### post counts now available in X API v2 + +### Addition of is:reply Operator +Today, the operator is:reply becomes available to use with the [enterprise search APIs](/x-api/enterprise-gnip-2.0/fundamentals/search-api) and the paid version of the [premium search endpoints](https://developer.x.com/content/developer-twitter/en/docs/tweets/search/api-reference/premium-search). - `X API v2: Early Access` + The is:reply Boolean operator can be used to filter all replies to posts, or to filter out explicit replies that match a rule. This operator functions in the same way as the is:quote operator. - Today, we’re launching the new [post counts endpoints](/x-api/posts/counts/introduction) to the X API v2. This includes two different endpoints: Recent post counts, which is available to all product tracks, and full-archive post counts, which is currently only available to the Academic Research Product Track. You can use these endpoints to receive the count of posts that matches a specified query. + Remember that, with the Search API, all ‘is:’ and ‘has:’ operators must be used in conjunction with a standalone operator like a keyword or hashtag. - To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/introducing-new-tweet-counts-endpoints-to-the-twitter-api-v2/155997). + You can learn more about this operator in the [documentation](/x-api/enterprise-gnip-2.0/fundamentals/rules-filtering). + - ### June 21st, 2021 + +### Changes to Expanded URL Enrichment +Today, the expanded URL enrichment will no longer contain the unwound URL object and metadata (including the title and description fields) for URLs linking to posts, Moments, or profiles. Please note that other URLs (to websites, etc.) will continue to be enriched with this metadata, and the url, expanded_url, and `display_url` will still be available. This change applies to [Decahose](/x-api/enterprise-gnip-2.0/fundamentals/decahose-api), [PowerTrack](/x-api/enterprise-gnip-2.0/powertrack-api), [Historical PowerTrack](https://developer.x.com/content/developer-twitter/en/docs/tweets/batch-historical/overview), and the [Search APIs](https://developer.x.com/en/docs/x-api/v1/tweets/search/overview). + - #### Improvements to Teams Functionality + +### Addition of is:reply Operator in PowerTrack +Today, we are introducing a new operator, is:reply, to help you narrow conversations to those you care about most. You can now filter out replies from your results (in addition to the pre-existing ability to filter out reposts, is:retweet, and Quoted posts, is:quote). This new operator is available today within [PowerTrack](/x-api/enterprise-gnip-2.0/powertrack-api), [Historical PowerTrack](https://developer.x.com/content/developer-twitter/en/docs/tweets/batch-historical/overview), and [Replay](/x-api/enterprise-gnip-2.0/powertrack-api#replay-api). - `Developer Portal` + The is:reply Boolean operator can be used to filter all replies to posts, or to filter out explicit replies that match a rule. This operator functions in the same way as the is:quote operator. - Today, we’re launching key improvements to the functionality of teams based on feedback we’ve heard from the community. We have updated the style and design of the team page. We also made changes to the invitation flow to make it easier to invite team members or to learn more about why an invitation might have failed. If you have a team account you can check out the changes by viewing the [teams page](https://developer.x.com/en/portal/teams) of the developer portal. To learn more about teams check out our [documentation on the subject](https://developer.x.com/en/docs/developer-portal/overview#team) and related [FAQ](https://developer.x.com/en/docs/developer-portal/faq#dev-portal-management-faq). + You can learn more about this operator in the [documentation](/x-api/enterprise-gnip-2.0/fundamentals/rules-filtering). + - To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/announcing-improvements-to-the-functionality-of-teams/155447/2). + +### Access to Apps in Developer Portal +Today, we've added the ability for developers to view and edit their existing [X apps](/resources/fundamentals/developer-apps) via the [X app dashboard](https://developer.x.com/content/developer-twitter/en/apps) on developer.x.com as long as they're logged into their X account. Previously, you could only view and edit your existing X apps on developer.x.com if you had applied or been approved for a [developer account](/resources/fundamentals/developer-portal). - ### June 18th, 2021 + You still must have an approved developer account to be able to create new X apps. + - #### Retiring the standard v1.1 GET /help/configuration endpoint + +### Support for Video Subtitles +Today, we are announcing that advertisers and publishers are now able to add subtitle files (SRT) to their videos via ads.x.com, Media Studio and our publisher upload API. Subtitles will be viewable on auto-playing video (when no sound is available) on Android and Web. We will release the functionality for iOS in the coming weeks. - `X API: Standard v1.1` + To read more about the new subtitles endpoints, please review their respective API reference pages: - Today, we retired the standard v1.1 GET /help/configuration endpoint. + * [POST media/subtitles-create](https://developer.x.com/en/docs/x-api/v1/media/upload-media/api-reference/post-media-subtitles-create) - To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/retiring-the-1-1-configuration-endpoint/153319). + * [POST media/subtitles-delete](https://developer.x.com/en/docs/x-api/v1/media/upload-media/api-reference/post-media-subtitles-delete) + - ### May 26th, 2021 + +### Update to Account Activity API Endpoint +Today we are announcing an update to the [Account Activity API](/x-api/enterprise-gnip-2.0/fundamentals/account-activity) endpoint, [GET subscriptions/count](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#get-direct-messages-events-list#get-account-activity-subscriptions-count). To enable greater visibility into your billing details and use of the API, beginning today, you can programmatically pull the number of provisioned subscriptions associated with your Account Activity API instance within the JSON. This means you can now see both what your provisioned number of subscriptions are, and how close you are to hitting that limit via the GET subscriptions/count API endpoint. - #### Consolidating the oEmbed endpoint + This update has been documented with the [Account Activity API documentation](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#get-direct-messages-events-list#get-account-activity-subscriptions-count). + - `X for Websites` + +### New Rate Limits on POST Endpoints +Today we are implementing new app-level rate limits on several of our standard POST endpoints: - Today, we’re sharing that the v1.1 oEmbed endpoint will be retired and removed on November 23, 2021, so that new features can be supported in a consistent manner. After that date, the only official and supported API endpoint for X oEmbeds (embedded posts and timelines) will be via publish.x.com/oembed. + * [POST statuses/update](https://developer.x.com/en/docs/x-api/v1/tweets/post-and-engage/api-reference/post-statuses-update) - To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/consolidating-the-oembed-functionality/154690/2). + * [POST statuses/retweet/:id](https://developer.x.com/en/docs/x-api/v1/tweets/post-and-engage/api-reference/get-statuses-retweets-id) - ### May 20th, 2021 + * [POST favorites/create](https://developer.x.com/en/docs/x-api/v1/accounts-and-users/follow-search-get-users/api-reference/post-friendships-create) - #### Blocks and Likes lookup available in X API v2 + * [POST direct_messages/events/new](https://developer.x.com/en/docs/x-api/v1/direct-messages/sending-and-receiving/api-reference/new-event) - `X API v2: Early Access` + * [POST friendships/create](https://developer.x.com/en/docs/x-api/v1/accounts-and-users/follow-search-get-users/api-reference/post-friendships-create) - Today, we’re launching the new [blocks](/x-api/users/blocks) and [Likes](/x-api/posts/likes) lookup endpoints to the X API v2. These endpoints enable you to use the v2 API to get information about which posts an account has liked, what users have liked a post, and who you or an authenticated user has blocked. + You can read more about this change in our [forum announcement](https://devcommunity.x.com/t/new-post-endpoint-rate-limit-enforcement-begins-today/115355). + - To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/announcing-twitter-api-v2-likes-lookup-and-blocks-lookup/154353). + +### Update to twitter-text Library +Today, we are announcing an update to the [twitter-text](https://github.com/twitter/twitter-text) library to account for the recent changes to the way that X counts emojis. If an emoji previously counted as more than two characters, its count will now be reduced to just two characters to allow for users to make the most out of their 280 characters. - ### April 22nd, 2021 + You can read more about this change in our [forum announcement](https://devcommunity.x.com/t/new-update-to-the-twitter-text-library-emoji-character-count/114607). + - #### Manage Likes available in X API v2 + +### Retirement of Legacy DM Endpoints +We have fully retired the legacy Direct Message endpoints. You can find a list of the retired DM endpoints, as well as their replacements on \[this page]\(https://developer.x.com/content/developer-twitter/en/docs/direct-messages/sending-and-receiving/api-reference. - `X API v2: Early Access` + You can learn more about this update via our [forum announcement](https://devcommunity.x.com/t/details-and-what-to-expect-from-the-api-deprecations-this-week-on-august-16-2018/110746). + - Today, we’re launching the new [manage Likes](https://developer.x.com/en/docs/twitter-api/tweets/likes) endpoints to the X API v2. These endpoints enable you to use the v2 API to like and unlike posts. + +### Changes to DM Media Access +Today, we are implementing some changes to the process where you [retreive attached media from Direct Messages](https://developer.x.com/en/docs/x-api/v1/direct-messages/message-attachments/overview). We will no longer support accessing `media_url` or `media_url_https` via an authenticated www.x.com session. The request to fetch `media_url_https` MUST always be signed with the user’s access token using OAuth 1.0A. - To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/announcing-new-manage-likes-endpoints-for-thetwitter-api-v2/152780).[](https://devcommunity.x.com/t/announcing-new-manage-likes-endpoints-for-thetwitter-api-v2/152780) + You can learn more about this update via our [forum announcement](https://devcommunity.x.com/t/direct-message-api-change-to-how-apps-can-access-images-sent-in-direct-messages/112722). + - ### April 7th, 2021 + +### Retirement of User and Site Streams +We have fully retired [User Streams](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#migration-introduction) and [Site Streams](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#migration-introduction). - #### Manage blocks available in X API v2 + You can learn more about this update via our [forum announcement](https://devcommunity.x.com/t/details-and-what-to-expect-from-the-api-deprecations-this-week-on-august-16-2018/110746). + - `X API v2: Early Access` + +### New Version of Usage API +Today we are launching a new version of the Usage API. With this update, we’re making the API more stable by moving to a new system. - Today, we’re launching the new [manage blocks](/x-api/users/blocks) endpoints to the X API v2. These endpoints enable you to block or unblock accounts on behalf of a user using user IDs. + With the system update, users will experience a data "hole" as developers will only be able to pull data back to May 1, 2018. Therefore for the upcoming year, they will be missing out on a few months of historical data (until June 2019). - To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/announcing-manage-blocks-for-twitter-api-v2/152358/2). + A product name is changing within the Usage API from Historical PowerTrack Subscription to Historical PowerTrack 2.0 which will make the product naming consistent with the rest of our user-facing wording. Customers will receive the exact same data in the same format with the update. You will see this change within the products.type JSON object. - ### March 3rd, 2021 + If you have any questions, please reach out to your account manager. + - #### Removing support for Embedded Like, Collection, and Moment Timelines + +### API Deprecations +The [Account Activity API DM Beta](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#migration-introduction) product was fully retired today. - `X for Websites` + The following services and endpoints will experience degraded service starting today: - Today we’re sharing our plans for the future of [embedded timeline widgets](https://developer.x.com/en/docs/x-for-websites/timelines/overview). On June 23rd 2021, we plan to retire the Likes, Collections, and Moments timelines. We recommended you use the [Profile](https://developer.x.com/en/docs/x-for-websites/timelines/guides/profile-timeline) and [Lists](https://developer.x.com/en/docs/x-for-websites/timelines/guides/list-timeline) timelines, which we’re updating to become faster, easier to use, and more up-to-date with X features and functionality. + * [User Streams](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#migration-introduction) - You can learn more about this change in our [forum announcement](https://devcommunity.x.com/t/removing-support-for-embedded-like-collection-and-moment-timelines/150313). + * [Site Streams](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#migration-introduction) - ### February 10th, 2021 + * [GET direct_messages](https://developer.x.com/en/docs/x-api/v1/direct-messages/sending-and-receiving/api-reference/list-events) - #### Manage follows available in X API v2 + * [GET direct_messages/sent](https://developer.x.com/content/developer-twitter/en/docs/direct-messages/sending-and-receiving/api-reference/get-sent-message) - `X API v2: Early Access` + * [GET direct_messages/show](https://developer.x.com/content/developer-twitter/en/docs/direct-messages/sending-and-receiving/api-reference/get-message) - Today, we’re launching the new [manage follows](/x-api/users/follows) endpoints to the X API v2. These endpoints enable you to follow or unfollow accounts on behalf of a user using their user ID. This launch comes just a few months after the launch of the [follows lookup](/x-api/users/follows) endpoints, which allow you to retrieve an account’s followers and who they are following.  + * [POST direct_messages/new](https://developer.x.com/content/developer-twitter/en/docs/direct-messages/sending-and-receiving/api-reference/new-message) - To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/introducing-the-new-manage-follows-endpoints-to-the-twitter-api-v2/149465). + * [POST direct_messages/destroy](https://developer.x.com/content/developer-twitter/en/docs/direct-messages/sending-and-receiving/api-reference/delete-message) - ### January 26th, 2021 + User Streams and Site Streams will be fully retired on August 23rd. - #### Introducing the X API v2 Academic Research product track + The legacy Direct Messages endpoints will be fully retired on September 17th. - `X API v2: Early Access` + You can learn more about this update via our [forum announcement](https://devcommunity.x.com/t/details-and-what-to-expect-from-the-api-deprecations-this-week-on-august-16-2018/110746). + - Today, we are introducing the new [Academic Research product track](/resources/fundamentals/projects) to [X API v2](/x-api/introduction). This update introduces a new application process for Academic Researchers that will provide those that are approved with an Academic Research [Project](/resources/fundamentals/projects) that will unlock greater access and advanced functionality. + +### Changes to App Creation and Rate Limits +As of today, you will no longer be able to create new [X apps](/resources/fundamentals/developer-apps) via [apps.x.com](https://apps.x.com/). You will now be redirected to either your [developer portal](/resources/fundamentals/developer-portal) account or, if you don't have a developer portal account yet, to the page where [you can apply](https://developer.x.com/content/developer-twitter/en/apply-for-access). - With the new Academic Research product track, you will be able to access the following: + We also announced that we will be implementing new app-level rate limits to the following POST endpoints on September 10th, 2018. - * The new X API v2 [full-archive search endpoint](/x-api/posts/full-archive-search), which is only available to the Academic Research product track at this time.  + * [POST statuses/update](https://developer.x.com/en/docs/x-api/v1/tweets/post-and-engage/api-reference/post-statuses-update) - * An increased [post cap](/x-api/fundamentals/post-cap) of 10 million, up from the 500,000 that is available to the [Standard product track](/resources/fundamentals/projects) at the Basic [access level](https://developer.x.com/en/products/x-api/early-access/guide#na_2).  + * [POST statuses/retweet:id](https://developer.x.com/en/docs/x-api/v1/tweets/post-and-engage/api-reference/post-statuses-retweet-id) - * New filter operators available to [recent search](/x-api/posts/recent-search), [full-archive search](/x-api/posts/full-archive-search), and [filtered stream](/x-api/posts/filtered-stream), including `$` (aka cashtag), `bio` (only available via filtered stream), `bio_name` (only available via filtered stream), `bio_location` (only available via filtered stream), `place`, `place_country`, `point_radius`, `bounding_box`, `-is:nullcast`, `has:cashtags` and `has:geo`. + * [POST friendships/create](https://developer.x.com/en/docs/x-api/v1/accounts-and-users/follow-search-get-users/api-reference/post-friendships-create) - * An increased rule limit for filtered stream of 1,000 concurrent rules, up from the 25 that is available to the Standard product track at the Basic access level.  + * [POST favorites/create](https://developer.x.com/en/docs/x-api/v1/tweets/post-and-engage/api-reference/post-favorites-create) - * An increased query and rule character limit of 1,024 characters long, up from the 512 character limit that is available to the Standard product tack at the Basic access level + * [POST direct_messages/events/new](https://developer.x.com/en/docs/x-api/v1/direct-messages/sending-and-receiving/api-reference/new-event) - To learn more about this launch, please visit our [forum announcement](https://devcommunity.x.com/t/introducing-the-new-academic-research-product-track/148632). + Finally, we are introducing a new option for people to report suspected violations of our platform policies to you for review. - ### December 18th, 2020 + You can learn more about all of these updates via our [blog post](https://cli.re/g32qKr). + - #### Conversation reply settings post field for v2 X API + +### App Management in Developer Portal +If you have a [developer portal](/resources/fundamentals/developer-portal) account, you can now create and manage your [X apps](/resources/fundamentals/developer-apps). Please read our [forum post](https://devcommunity.x.com/t/app-creation-and-management-now-available-in-the-developer-portal/107723) for more details. + - `X API v2: Early Access` + +### Changes to Sign in with X and Account Activity +Today, we started requiring that you register the [callback URLs](/resources/fundamentals/developer-apps#callback-urls) that you use with the Sign in with X process. You can read more about this update [here](https://devcommunity.x.com/t/action-required-sign-in-with-twitter-users-must-whitelist-callback-urls/105342). - Today we are launching a new field in the post object called reply\_settings. This field is available on all X API v2 endpoints that return posts including post lookup, hide replies, recent search, sampled stream, filtered stream, follows lookup, user post timeline, and user mention timeline endpoints or by [expanding](/x-api/fundamentals/expansions) the post object in any endpoint. + We also announced the addition of the tweet_delete_events activity to the Account Activity API. This new activity will be sent for those corresponding deleted events to enable developers to more easily provide a compliant experience for their customers and application users. You can read more about this new activity in our [forum post](https://devcommunity.x.com/t/adding-delete-events-to-the-account-activity-api/106783) or on our [documentation](/x-api/enterprise-gnip-2.0/fundamentals/account-activity). + - This field indicates how the post author has allowed others to reply to their posts, whether it’s everyone, just the people they mention in the post, or those they follow. The field values returned by the `reply_settings` field include `everyone`, `mentionedUsers`, and `following`. If no conversation controls are set for the post, this will still show up in the post object with `everyone` value for the field.  + +### Updates to Terms and Policies +Today, we made some changes to our [Terms of Service](https://x.com/en/tos), [Privacy Policy](https://x.com/en/privacy), and \[X Developer Agreement]https://developer.x.com/en/developer-terms/agreement-and-policy that include privacy, security, and data protection updates. Please read our [forum post](https://devcommunity.x.com/t/upcoming-changes-to-the-developer-platform/104603) for more details. + - ### December 17th, 2020 + +### Timezone Fields Made Private +Today, the timezone values in X user objects became private fields. From here on out, all\* time_zone and utc_offset data objects will return as null. Please read our [forum post](https://devcommunity.x.com/t/upcoming-changes-to-the-developer-platform/104603) for more details. + \* They will continue to be available on the account/settings endpoint, for authenticated users only. + - #### User post timeline and user mention timeline available in X API v2 + +### Removal of Klout Data +Today, we removed all Klout data from post payloads as part of our GDPR updates. + - `X API v2: Early Access` + +### Changes to Profile Background and Account Activity +Today, we are changing all instances of profile_background_image_url and profile_background_image_url_https to their default values. Please read our [forum post](https://devcommunity.x.com/t/upcoming-changes-to-the-developer-platform/104603) for more details. - Today, we’re launching the new [user post timeline and user mention timeline endpoints](/x-api/posts/timelines) to the X API v2. These endpoints enable you to request the posts composed by, or mentioning, a specified account on X. Learn more in the forum post announcement.  + In addition to the above change, we are adding a new field to the [Account Activity API](/x-api/enterprise-gnip-2.0/fundamentals/account-activity) payloads to reference which subscription the activity was delivered for. This JSON object is called for_user_id and will include the subscribed user's ID who produced that activity as its value. You can see some examples of this new JSON object in our [account activity objects](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#account-activity-data-object-structure) page. + - ### December 17th, 2020 + +### Changes to Quote Payload Rendering +Today, we are adding a change to the way that URLs will be rendered in the quote payload. - #### Follows lookup available in the X API v2 + We’re adding a new entity called the "quoted_status_permalink" entity to ensure the quoted post can be referenced and we will be removing the t.co link from the quoted post "text" field. - `X API v2: Early Access` + With the new format, the t.co link is no longer appended to the "text" field of the quoted post in the "quoted_status" object. - Today, we’re launching the new [follows lookup endpoints](/x-api/users/follows) to the X API v2. These endpoints enable you to retrieve an account’s followers and who they are following using their user ID. Learn more in the forum post announcement.  + Further, we will no longer put the quoted post t.co url, expanded_url, and display_url in the ‘urls’ entity. Instead, these will be added to a new "quoted_status_permalink" object with "url", "expanded", and "display" URL attributes. This means that the "quoted_status_permalink" object will be reserved for the t.co link back to the quoted post, whereas the "entities.urls" array can be used to identify any links shared within the original post or quote. - ### November 16th, 2020 + Please read our [forum post](https://devcommunity.x.com/t/updating-how-urls-are-rendered-in-the-quote-tweet-payload/105473) and [updated documentation](https://devcommunity.x.com/t/upcoming-changes-to-the-developer-platform/104603) for more details. + - #### Retiring some Labs v2 endpoints + +### Deprecation of X Kit +The announcement of [X Kit](https://developer.x.com/en/docs/x-for-websites) deprecation, after October 31, 2018 X Kit will no longer be actively maintained. Please read our [blog post](https://blog.x.com/developer/en_us/topics/tools/2018/discontinuing-support-for-twitter-kit-sdk.html) for more details. + - `X Developer Labs` + +### Platform Updates for GDPR +Today we announced several updates to the platform related to GDPR. Please read our [forum post](https://devcommunity.x.com/t/upcoming-changes-to-the-developer-platform/104603) for more details. + - Retired Labs v2 recent search and hide replies endpoints + +### Addition of Additional Media Info Object +The addition of a new object to the post payload – additional_media_info object – and also restricting some video details (video_info) for promoted posts where advertisers have requested we limit video playback to X owned clients. You can find additional information about this change at the following link: [Extended Entities Objects > post with native video](https://developer.x.com/en/docs/x-api/v1/data-dictionary/object-model/extended-entities). + - We have retired the following endpoints. If you were using the Labs versions of these endpoints, you can use the linked migration guides to update your integration to start using the new X API v2 versions: + +### Launch of Premium Full-Archive Search +Launch of the [premium full-archive search endpoint](https://blog.x.com/developer/en_us/topics/tools/2018/access-the-full-history-of-tweets.html). + - * [Recent search v2](/x-api/posts/search/migrate/overview) + +### Launch of Account Activity APIs +Launched both ([All Activities](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#migration-introduction)) and ([Direct Messages](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#migration-introduction)) Standard beta Account Activity APIs, read more about this launch [on our blog](https://blog.x.com/developer/en_us/topics/tools/2017/announcing-more-functionality-to-improve-customer-engagements-on-twitter.html). Announced User streams & Site streams deprecation and sunset date of Tuesday June 19, 2018. + - * [Hide replies v2](/x-api/posts/hide-replies/migrate) + +### Update to twitter-text Library +Version 2.0 of twitter-text is now available [on GitHub](https://github.com/twitter/twitter-text). This update addresses the change in our character limit that was rolled out on November 7th, 2017. To learn more about this update, please [visit our forum](https://devcommunity.x.com/t/shipped-twitter-text-2-0/98577). + - We also have additional details about migration to the new X API v2 via our [migration hub](/x-api/migrate/overview).  + +### Launch of Premium APIs +Launched the Premium APIs. - If you have any questions, please reach out to our [Labs forum category](https://devcommunity.x.com/c/labs/57).  + These new APIs build on the quality and stability of our enterprise data platform, and make it available more widely via a tiered pricing model. For the first time, you can start to search across 30 days of posts (instead of the limited 7 days of data on the standard endpoint), and optionally, you can also access our premium enrichments for profile geo, URL expansion, and poll data. Here’s a taste of some of the new features: - ### October 12th, 2020 + * More posts per request (Sandbox + Premium) - #### Retiring some Labs v1 endpoints + * A far more rich query language enabling more complex queries (Sandbox + Premium) - `X Developer Labs` + * A counts endpoint that returns time-series counts of posts (Premium) - On August 12th, 2020, we launched the new X API v2: Early access. With this release, we graduated several endpoints to X API v2 from the Labs program, and announced that the Labs version of the endpoints would remain in a deprecated state for 60 days before retiring them. + * Metadata enrichments, such as expanded URLs and Profile Geo (Premium) - Today marks 60 days since the launch, meaning that we have retired the following endpoints. If you are using the Labs versions of these endpoints, you can use the linked migration guides to update your integration to start using the new X API v2 versions: + Read more about this launch [on our blog](https://blog.x.com/developer/en_us/topics/tools/2017/introducing-twitter-premium-apis.html). + - * [post metrics v1](https://developer.x.com/en/docs/labs/migrate) + +### Launch of 280 Character Posts +Official launch of 280 character posts in languages where cramming was an issue. Please see our [forum announcement](https://devcommunity.x.com/t/updating-the-character-limit-and-the-twitter-text-library/96425) or official [blog post](https://blog.x.com/official/en_us/topics/product/2017/tweetingmadeeasier.html) for further reference. + - * [Filtered stream v1](/x-api/posts/filtered-stream#comparing-x-apis-filtered-stream-endpoints) + +### Removal of DM Commands in Statuses/Update +The ability to send Direct Messages via the statuses/update API endpoint has been completely removed, and the `enable_dm_commands` and `fail_dm_commands` parameters will no longer have any effect. Read more about this update [on our forum](https://devcommunity.x.com/t/retiring-legacy-dm-commands-on-the-standard-tweet-api/86653 "on our forum"). + - * [Sampled stream v1](https://developer.x.com/en/docs/x-api/posts/sampled-stream/migrate) + +### Changes to OAuth Login Flow +A change was made to X’s backend OAuth API endpoints which altered the behaviour of the /oauth/authenticate endpoint to match that of the /oauth/authorize endpoint. Read more about this update [on our forum](https://devcommunity.x.com/t/recent-changes-to-twitter-s-oauth-login-flow-and-api-endpoints/94943). + - We also have additional details about migration to the new X API v2 via our [migration hub](/x-api/migrate/overview).  + +### Updates to Engagement API Metrics +The Engagement API was updated to use the same metrics aggregation methodology in use by the X analytics dashboard. Read more about this update [on our forum](https://devcommunity.x.com/t/changes-to-the-engagement-api/94523). + - If you have any questions, please reach out to our [Labs forum category](https://devcommunity.x.com/c/labs/57).  + +### Changes to DM Commands Failure +The default value of the `fail_dm_commands` parameter within the DM statuses/update endpoint has been switched to *true*. All status updates intended as Direct Messages will start to return errors (unless `enable_dm_commands` is *false*, in which case the post will be posted). Read more about this update [on our forum](https://devcommunity.x.com/t/retiring-legacy-dm-commands-on-the-standard-tweet-api/86653). + - ### September 3rd, 2020 + +### Treatment of 280 Character Tweets +The response payload for 280 character tweets will be treated the same way as long tweets. Read more about this update [on our forum](https://devcommunity.x.com/t/testing-280-characters-for-certain-languages/94126). + - #### post consumption status bar added to the new developer portal experience + +### Addition of Additional Media Info +Adding new data to the post payload (`additional_media_info object`) and also restricting some video details (`video_info`) for promoted posts where advertisers have requested we limit video playback to X owned clients. You can find additional information about this change at the following link: [Extended Entities Objects > post with native video](https://developer.x.com/en/docs/x-api/v1/data-dictionary/object-model/extended-entities) + - `Developer Portal X API v2: Early Access` + +### End of Support for url_contains Operator in 30-Day Search +30-Day and Full-Archive Search ended support for url_contains: operator. Deprecation of this operator was announced as part of the Gnip 2.0 migration in August 2016. Any Search query using the url_contains: Operator will be rejected as invalid. + - In the [main dashboard page](https://developer.x.com/en/portal/dashboard) of the new developer portal, you can now check your usage towards the [post cap](/x-api/fundamentals/post-cap) of 500,000 posts per month. This cap is applied at the Project level, across the following v2 endpoints in Basic access: filtered stream, and recent search. + +### Upcoming Removal of url_contains Operator in Search APIs +The 30-Day Search API (both 30-Day and Full-Archive) will no longer support the url_contains: operator beginning 30 days from today, or after August 4, 2017 (Support of url_contains: will actually end with the first deploy after that date). Deprecation of this operator was announced as part of the Gnip 2.0 migration in August 2016. When Operator support is ended, any query using the url_contains: will be rejected as invalid. + - In order to see this feature and use the new v2 endpoints, you will need to activate the [new developer portal experience](https://developer.x.com/en/portal/opt-in.html). + +### Retirement of xAuth +The xAuth authentication mechanism has been removed from all X APIs Read more about this update [on our forum](https://devcommunity.x.com/t/retirement-of-xauth/88022). + - ### August 19th, 2020 + +### HTTP Headers Forced to Lowercase +All HTTP headers have been forced into lowercase (`content-type`, `x-rate-limit-remaining`, `x-access-level` etc). Read more about this update [on our forum](https://devcommunity.x.com/t/upcoming-http-header-changes/86715). + - #### Hide replies available in v2 X API + +### Optional Parameters for DM Commands +The optional `enable_dm_commands` parameter to statuses/update will enable applications to remove DM command support early, before the transition period ends. The default value is *true* (i.e. current legacy behavior), but this may be set to *false* to get the new, post-November 1 behavior. The optional fail_dm_commands parameter to statuses/update will make DM commands return HTTP 403 (error code 151) from the API when set to *true*. The default value is *false*. Read more about this update [on our forum](https://devcommunity.x.com/t/retiring-legacy-dm-commands-on-the-standard-tweet-api/86653). + - `X API v2: Early Access X Developer Labs` + +### Support for Emojis in Rules +Rules with emojis are now available in the enterprise Search APIs + - Today, we’re launching the new hide replies endpoint into the v2 X API. This endpoint enables you to hide abusive, distracting, or misleading replies to posts – a crucial piece to improving the health of the public conversation. Learn more in the forum post announcement. + +### Wider Availability of Direct Message APIs +Access to several new Direct Message APIs are now more widely available. Read more about this update [on our blog](https://blog.twitter.com/developer/en_us/topics/tools/2017/new-apis-to-power-the-future-of-customer-engagement-in-direct-me.html). + - The same endpoint in X Developer Labs is now deprecated, and it will be retired in 90 days. Learn how to [migrate to the v2 endpoint.](/x-api/posts/hide-replies#comparing-twitter-apis-hide-replies-endpoints) + +### Retirement of MPEG-DASH Video Support +MPEG-DASH URLs (.mpd) has been removed from the payload of a post that contains video. Read more about this update [on our forum](https://devcommunity.x.com/t/retiring-mpeg-dash-video-support-on-march-9th-2017/82761). + - ### August 12th, 2020 + +### New Enrichments and Payload Changes +New Enrichment! Poll Metadata is now available through our enterprise APIs. See the [documentation](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#migration-introduction) for more details. - #### X API v2: Early Access released + New payload field: Image Alt-Text (decription) field may be present in the entities.media\[] and extended_entities.media\[] section of the payload if a user chooses chooses the "Add description" option when adding a photo to a post. This is available in enriched native format only. - `X API v2: Early Access` + Default payload format: Newly created streams on Gnip products will now default to orriginal format JSON. + - Today we announced [Early Access to the first endpoints of the new X API](https://blog.x.com/developer/en_us/topics/tools/2020/introducing_new_twitter_api.html)! + +### Updates to Historical PowerTrack and Replay API +Historical PowerTrack API & Replay API - The new X API features a new API foundation which will allow us to deliver new functionality faster; an updated data format and new functionality that gives you more control over which fields you receive; new post, user, and media fields; and a set of updated endpoints that enable you to listen to and analyze posts, including the following: + * quote filtering is now supported - * [post lookup](/x-api/posts/post-lookup-by-post-ids) + * Quoted posts are now fully rehydrated within HPT and Replay post payloads + - * [User lookup](/x-api/users/user-lookup-by-id) + +### New Payload Fields for Counts +New payload fields: quote_count and reply_count are now available in native enriched format payloads across Realtime and Historical APIs + - * [Recent search](/x-api/posts/recent-search) + +### Support for Geo Operators in Full-Archive Search +Full-Archive Search API (FAS): - * [Filtered stream](/x-api/posts/filtered-stream) + * Added support for additional geo operators: - * [Sampled stream](/x-api/posts/sample-stream) + * place: - You can find a full list of the new functionality available, and find migration resources on our \[X API v2: Early Access docs page]https://developer.x.com/en/docs/x-api/early-access). + * place_country: - Learn more about what we have planned in our “\[Guide to the future of the X API]https://developer.x.com/en/docs/x-api/early-access)”. + * has:profile_geo: - #### Deprecating certain Labs endpoints + * profile_country: - `X Developer Labs `    + * profile_region: - We are deprecating certain Labs endpoints due to the launch of their X API v2 replacements in this release. + * profile_locality: + - The following Labs v1 endpoints will be retired 60 days from today's release: + +### Rule Management by ID in PowerTrack +Rule management (GET and DELETE) by Rule ID is now available for PowerTrack 2.0 and PowerTrack Replay 2.0 + - * post metrics v1 + +### Support for Geo Operators in 30-Day Search +30-Day Search API: - * Filtered stream v1 + * Added support for additional geo operators: - * Sampled stream v1 + * place: - The following Labs v2 endpoint will be retired 90 days from today’s release: + * place_country: - * Recent search v2 + * has:profile_geo: - ### July 13th, 2020 + * profile_country: - #### Improvements to Hide replies + * profile_region: - `X Developer Labs `    - - We added the ability to unhide a reply. Additionally, previously unhidden replies can now be hidden again via this endpoint. - - Get more details in the [Hide replies documentation](https://developer.x.comhttps://developer.x.com/en/docs/labs). - - ### July 8th, 2020 - - #### Retiring certain Labs v1 endpoints - - `X Developer Labs `    - - Today we are retiring the Labs v1 posts and users, hide replies, and recent search endpoints. - - You can read more about our Labs v1 plan in our [forum announcement](https://devcommunity.x.com/t/update-on-labs-v1-endpoints/138641). - - ### July 7th, 2020 - - #### quotes available for the /totals endpoint - - `X API: Enterprise`     - - Today, the `quote_tweets` metric is now available for 'unowned' posts via the [/totals](/x-api/enterprise-gnip-2.0/fundamentals/engagement-api#post-insights-engagement) endpoint. This means that you can access the quote count for all posts by using app-only authentication.  - - You can read more about this change in our [forum post](https://devcommunity.x.com/t/how-the-new-retweets-and-comments-metric-is-returned-with-the-twitter-api/139131).  - - ### July 1st, 2020 - - #### Adding two new posts metrics - - `X Developer Labs `    - - Today we are adding two new non-public metrics subfields, `user_profile_clicks` and `url_link_clicks`, to the post object in the X Developer Labs post lookup endpoints. They will be returned when using the `tweet.fields` parameter with any of the following values: `non_public_metrics`, `organic_metrics`, or `promoted_metrics`. - - To learn more, please visit the [post lookup API reference](https://developer.x.com/en/docs/labs/tweets-and-users/api-reference/get-tweets-id) - - ### June 15th, 2020 - - #### Changes to X web, iOS and Android repost counts - - `X API: Standard v1.1`     `X API: Premium v1.1`     `X API: Enterprise`     - - `X Ads API`     `X for Websites`         `X Developer Labs `    - - Starting today, X web, iOS and Android will be showing the total 'reposts and comments' count per post. Using the X API, the total 'reposts and comments' number matching the X interface can be calculated by adding the `retweet_count` and `quote_count` when available. Additionally `quote_count` will be the total unique accounts that have quoted the post, rather than the total posts quoting the post. For more details, please see our [forum post](https://devcommunity.x.com/t/how-the-new-retweets-and-comments-metric-is-returned-with-the-twitter-api/139131/2). - - ### May 28th, 2020 - - #### Defining organic and promoted metrics groupings for post and media objects - - `X Developer Labs `    - - We are adding `organic_metrics` and `promoted_metrics` to the post and media objects in the post lookup endpoints. - - ### May 6th, 2020 - - #### Metrics in posts and recent search endpoints - - `X Developer Labs `    - - We are adding metrics to the post and media objects in the post lookup and recent search endpoints. - - You can read more about these changes in our [forum announcement](https://devcommunity.x.com/t/adding-metrics-to-the-tweets-and-recent-search-endpoints-in-labs/135315) - - ### April 29th, 2020 - - #### COVID-19 Stream and Compliance endpoints - - `X Developer Labs `    - - Today we are launching a new COVID-19 stream endpoint and an accompanying compliance endpoint. - - You can read more about these changes in our [forum announcement.](https://devcommunity.x.com/t/new-covid-19-stream-endpoint-available-in-twitter-developer-labs/135540) - - ### March 31st, 2020 - - #### PowerTrack's Replay API now delivers current user profile data - - `X API: Enterprise `    - - Starting today, the Replay API will deliver user profile objects that reflect the referenced user at the time the Replay API is running. This change to deliver current user profile objects is similar to the recent Historical PowerTrack update below from Nov. 25, 2019. - - ### March 23rd, 2020 - - #### post annotations in posts and recent search endpoints - - `X Developer Labs `    - - We are adding annotations to the post object in the posts and recent search endpoints. - - You can read more about this change in our [forum announcement](https://devcommunity.x.com/t/adding-annotations-to-tweets-and-recent-search-endpoints-in-labs/135193). - - ### March 10th, 2020 - - #### Major updates to the X Developer Policy - - X API: Standard v1.1     X API: Premium v1.1     X API: Enterprise     - - X Ads API     X for Websites         `X Developer Labs `    - - Today, we announced a significant [update to the Developer Policy](https://developer.x.com/en/developer-terms/policy). We encourage you to read more about this via our [forum](https://devcommunity.x.com/t/a-new-easier-to-understand-twitter-developer-policy/135038) and [blog](https://blog.x.com/developer/en_us/topics/community/2020/twitter_developer_policy_update.html) posts, and to review the revised policy. The Developer Policy is one of the foundations for your use of the X API and it is important to understand your commitments. - - ### February 26th, 2020 - - #### Introducting the hide replies endpoint - - `X Developer Labs `    - - We want to help people feel safe and comfortable having conversations on X. As part of that, today we’re excited to give post authors more control over the conversations they start by supporting the hide replies feature with a new [endpoint](/x-api/posts/hide-replies). - - You can read more about this new endpoint in our [forum announcement](https://devcommunity.x.com/t/introducing-the-hide-replies-endpoint/134683). - - ### February 25th, 2020 - - #### v2 of Labs endpoints: posts and Users, Recent Search, Hide Replies - - `X Developer Labs `    - - Today, we are bringing our posts and Users, Recent Search and Hide Replies endpoints to v2 of Labs. We are deprecating Labs v1 endpoints and will fully retire them 90 days after this initial release. We will also keep our v1 documentation available for this duration. You can provide us feedback on this versioning strategy via our [feedback channel](https://twitterdevfeedback.uservoice.com/).  - - We're releasing the following changes to posts and Users: - - * Introduce [fields](/x-api/fundamentals/fields) as a query parameter - - * Remove [formats](https://developer.x.com/en/docs/labs#payload) as a query parameter - - * Add path variable for single ID [lookup](https://developer.x.com/en/docs/labs/overview/versioning/migration-guide#id-lookup-path) in posts and Users - - * Adjusting the path and query parameters for single and multi-username [lookup](/x-api/migrate/overview#username-lookup-path) in GET /users - - * Change field name `stats` to `public_metrics` - - Other changes include: - - * Remove the `most_recent_tweet_id` expansion in Users - - * Remove HTML tags from the `source` field in posts to make that field easier to parse - - The core search, pagination and other functionality of Recent Search will stay the same. - - We have put together some [migration materials](/x-api/migrate/overview) for when you update from v1 to v2. - - You can read more about this change in our [forum announcement](https://devcommunity.x.com/t/releasing-a-new-version-of-labs-endpoints/134219). - - ### February 7th, 2020 - - `X API: Enterprise`     - - Today we added new drop/undrop event types to the Compliance Firehose API. You can read more about them in our [documentation.](/x-api/enterprise-gnip-2.0/fundamentals/firehouse)   - - ### January 21st, 2020 - - `X API: Standard v1.1`    ` X API: Premium v1.1`     `X API: Enterprise`     - - `X Ads API`     `X Developer Labs `    - - Today, we're making changes to the way that Access Tokens and Access Token Secrets are presented and managed within the [applications Dashboard on developer.x.com](https://developer.x.com/content/developer-twitter/en/apps).  - - In order to make API integrations more secure, we will no longer show the Access Token and Access Token Secret on the Dashboard beyond the first time that these values are generated. - - After the first time, these credentials can not be retrieved. You will be able to regenerate the tokens on the Dashboard, but this will invalidate your current token and secret. - - You can read more about this change in our [forum announcement](https://devcommunity.x.com/t/upcoming-changes-to-access-token-and-secret-management/130851).   - - ### January 15th, 2020 - - `X API: Standard v1.1`     `X API: Premium v1.1`     `X API: Enterprise`     - - `X Ads API`     `X Developer Labs `    - - Starting January 15, 2020, all connections to the X API (and all other X domains) will no longer support SPDY connections. - - You can read more about this change in our [forum announcement](https://devcommunity.x.com/t/removing-support-for-spdy-protocol-on-twitter/132530).   - - ### January 6th, 2020 - - #### New Recent search endpoint available in Labs - - `X Developer Labs `    - - Today, we are releasing a new endpoint to [search for posts posted in the last 7 days](/x-api/posts/recent-search).  - - Learn more about this launch via our [forum announcement.](https://devcommunity.x.com/t/new-recent-search-endpoint-available-in-labs/133076) - - ### December 29th, 2019 - - `X API: Standard v1.1`     `X API: Premium v1.1`     `X API: Enterprise`     - - `X Ads API`     `X Developer Labs `    - - A new updated major release of our X API CLI, `[twurl](https://github.com/twitter/twurl)`, is now available. This release includes a number of bug fixes and enhancements and introduces Bearer Token support which helps to add functionality around the Premium and X Developer Labs endpoints. Read more in our [forum post](https://devcommunity.x.com/t/twurl-0-9-5-released/132966).   - - ### December 10th, 2019 - - #### post annotations added to the post Object for sampled stream and filtered stream endpoints in Labs - - `X Developer Labs `    - - Today in X Developer Labs, we are releasing new metadata elements to the default post payload. These new fields, rendered as part of the post payload, will provide more contextual information about the post. - - Learn more about this launch via our [forum announcement](https://devcommunity.x.com/t/tweet-annotations-added-to-the-tweet-object-for-the-sampled-stream-and-filtered-stream-endpoints-in-labs/132407). - - ### November 25th, 2019 - - `X API: Enterprise v1.1`     - - Today, we’re updating our "batch historical posts" endpoint (Historical PowerTrack) to provide user profile location, bio description, and display name information that reflects values in place at the of the job processing. When the updated user objects are delivered, there will be a new "updated" string array in the User/Actor object.  - - There are up to three possible values: name, description, location:   - - `"updated": ["name", "description", "location"]` - - See the [documentation on Historical PowerTrack's data format](https://aem-author-production-version-6-3.twitter.biz/content/developer-twitter/en/docs/tweets/batch-historical/guides/powertrack-data-format.html) for more details. - - ### October 29th, 2019 - - `X API: Premium v1.1`     `X API: Enterprise v1.1`     - - Today, we’re releasing a new feature to the Account Activity API that will provide developers with the ability to view whether an account that mentions your subscribed user is blocked. - - You can read more about the `user_has_blocked` [data object structure](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#account-activity-data-object-structure) and check out our [forum announcement](https://devcommunity.x.com/t/new-release-account-activity-api-user-has-blocked-field/131157) for more details. - - ### October 22nd, 2019 - - #### New sampled stream endpoint available in Labs - - `X Developer Labs `    - - Today, we are releasing a new endpoint to [stream a sample of all public posts](/x-api/posts/recent-search) in real-time, as they are posted.  - - Learn more about this launch via our [forum announcement.](https://devcommunity.x.com/t/new-sampled-stream-endpoint-available-in-labs/130958) - - ### September 18th, 2019 - - #### New filtered stream endpoint available in Labs - - `X Developer Labs `    - - Today, we are releasing a [new streaming endpoint](/x-api/posts/filtered-stream) to retrieve posts, and an endpoint to manage your filters in X Developer Labs. With these endpoints, you will be able to retrieve up to 500,000 posts per month (maximum 50 posts per second); you can set up to 10 filter rules on your stream (these can be applied at the same time). - - Learn more about this launch via our [forum announcement](https://devcommunity.x.com/t/new-filtered-stream-endpoints-available-in-labs-and-the-future-of-statuses-filter/129888). - - #### Documentation: improvements to request parameters - - Requests parameters documented in the API reference pages are now clearly marked as either optional or required. Additionally, API reference pages will describe a JSON body payload when this is allowed by a request. - - ### August 27th, 2019 - - #### New post metrics are now available in Labs - - `X Developer Labs `    - - You can now retrieve engagement data for any post or list of posts from owned/authorized accounts. The posts you query must be no older than 30 days and cannot be reposts. - - [GET /tweets/metrics/private](https://developer.x.com/en/docs/labs/tweet-metrics/overview.html) supports the following metrics: - - * `impressions` - - * `reposts` - - * `quotes` - - * `likes` - - * `replies` - - * `video views` - - * `video view quartiles` (where the requester is also the author of the media) - - Learn more about this launch via our [forum announcement](https://devcommunity.x.com/t/new-twitter-developer-labs-release-metrics-endpoint/129122). - - ### August 15th, 2019 - - `X API: Standard v1.1`     - - Starting today, applications that need to create Direct Messages will be required to have "Read, Write, and Direct Messages" app permissions (RW+DM). Applications attempting to create Direct Messages with only the RW app permission will receive the following error: - - `{"code": 93,"message": "This application is not allowed to access or delete your direct messages."}` - - You can learn more about this change via our [forum announcement](https://devcommunity.x.com/t/updates-to-app-permissions-direct-message-write-permission-change/128221). - - ### August 12th, 2019 - - #### New expansion for GET /users: pinned post in X Developer Labs - - `X Developer Labs `    - - `pinned_tweet_id` will expand a user’s pinned post through our user object expansion. - - ### July 31st, 2019 - - #### New metadata available for quote counts: - - `X Developer Labs `    - - Developers can use the new Labs endpoints to pull counts of quotes. - - #### New expansion for GET /users: most recent post - - `most_recent_tweet_id` will expand a user’s most recent post through our user object expansion. - - Learn more about this launch via our [forum announcement](https://devcommunity.x.com/t/update-to-twitter-developer-labs/128060). - - ### July 25th, 2019 - - `X API: Standard v1.1`     `X API: Premium v1.1`     `X API: Enterprise v1.1`     - - `X Ads API`     `X Ads API`     `X Developer Labs `    - - Today, all connections to the X API (and all other X domains) will require TLS 1.2. - - You can read more about this change in our [forum announcement](https://devcommunity.x.com/t/removing-support-for-legacy-tls-versions-1-0-1-1-on-twitter/126648/2). - - ### July 15th, 2019 - - `X API: Premium v1.1`     `X API: Enterprise v1.1`     - - Starting today, we are introducing the new [Account Activity API endpoint](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#api-reference) to deactivate user subscriptions using application-only OAuth. - - This new endpoint offers developers the convenience of only having to provide a bearer token to deactivate a subscription, without requiring the subscribed user’s access token. - - We are immediately marking the existing enterprise Account Activity API endpoint used to deactivate user subscriptions with 3-Legged OAuth as deprecated. The endpoint will be retired and no longer be available starting from January 15, 2020. - - Developers can learn more about this API in our [documentation](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#api-reference). - - ### June 20th, 2019 - - #### New expansions for GET /tweets: referenced author and mentioned user - - `X Developer Labs `    - - We added two new expansions to the \[GET /tweets]https://developer.x.com/en/docs/labs/tweets-and-users/api-reference/get-tweets.html) endpoint: - - entities.mentions.username will expand the username of any recognized user mention in a post into a full user object. - - `referenced_tweets.id.author_id` expands the ID of the author of any referenced post, when one of the posts requested is a repost, Quoted post or Reply. This expansion will also expand the referenced post ID into a full object. - - ### June 11th, 2019 - - #### GET /tweets and GET /users are now supported in Labs - - `X Developer Labs `    - - The first two endpoints are now available via the Labs portal. Make sure you have an approved developer account and have applied for Labs access to get started with these endpoints. - - [Key differences](https://developer.x.com/content/developer-twitter/en/docs/labs/overview/whats-new) from equivalent v1.1 functionality include: - - * Single endpoint for single object "show" function and batch "lookups" - - * \[Expansion parameters]) support the inclusion of additional objects as part of one request (e.g. mentioned users, referenced posts, etc.) - - * \[Format parameters]) support different data projections with more or less verbose payloads - - * Rate limiting is at the app level, regardless of auth method (user context or bearer token) - - Learn more about this launch via our [forum announcement](https://devcommunity.x.com/t/twitter-developer-labs-is-open-to-all-developers/126717). - - ### June 10th, 2019 - - `X API: Standard v1.1`     - - We have fully retired the Terms of Service and Privacy Endpoints. The current status of our [Privacy Policy](https://x.com/en/privacy) and [Terms of Service](https://x.com/en/tos) is best served by our up-to-date web pages. - - You can learn more about this change via our [forum announcement](https://devcommunity.x.com/t/terms-of-service-and-privacy-endpoints-will-no-longer-serve-content-after-june-10/125714).   - - ### May 21st, 2019 - - `X API: Standard v1.1`     `X API: Premium v1.1`     `X API: Enterprise v1.1`     - - Today some user object fields, including user.lang, will start returning 'null' for updated metadata fields previously announced in our [forum post](https://devcommunity.x.com/t/upcoming-changes-to-user-object-and-get-users-suggestions-endpoints/124732). - - Developers can learn about this change through our [documentation.](/x-api/fundamentals/data-dictionary#user)   - - ### May 20th, 2019 - - `X API: Enterprise v1.1`     - - Starting today, we are introducing the [Account Activity Replay API](/x-api/enterprise-gnip-2.0/fundamentals/account-activity), a data recovery tool available with the enterprise tier of the [Account Activity API](/x-api/enterprise-gnip-2.0/fundamentals/account-activity) - - The [Account Activity Replay API](/x-api/enterprise-gnip-2.0/fundamentals/account-activity) allows you to retrieve events from as far back as five days. It should be utilized to recover data in scenarios where your [webhook](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#api-reference) server misses events - - Developers can learn more about this API in our [documentation](/x-api/enterprise-gnip-2.0/fundamentals/account-activity).   - - ### May 6th, 2019 - - `X API: Enterprise v1.1 `    - - Starting today, native media (photos, videos, and GIFs) can be added to quotes on X, which will be shown as additional media metadata in the entities sections of quote payloads.  - - Developers can learn more about this in our [documentation](https://developer.x.com/en/docs/x-api/v1/data-dictionary/object-model/tweet).   - - ### February 13th, 2019 - - `X API: Premium v1.1 `    `X API: Enterprise v1.1 `    - - Today, the operator is:reply becomes available to use with the [enterprise search APIs](/x-api/enterprise-gnip-2.0/fundamentals/search-api) and the paid version of the [premium search endpoints](https://developer.x.com/content/developer-twitter/en/docs/tweets/search/api-reference/premium-search). - - The is:reply Boolean operator can be used to filter all replies to posts, or to filter out explicit replies that match a rule. This operator functions in the same way as the is:quote operator.  - - Remember that, with the Search API, all ‘is:’ and ‘has:’ operators must be used in conjunction with a standalone operator like a keyword or hashtag. - - You can learn more about this operator in the [documentation](/x-api/enterprise-gnip-2.0/fundamentals/rules-filtering).   - - ### February 6th, 2019 - - `X API: Premium v1.1`     `X API: Enterprise v1.1`     - - Starting today, the expanded URL enrichment will no longer contain the unwound URL object and metadata (including the title and description fields) for URLs linking to posts, Moments, or profiles. Please note that other URLs (to websites, etc.) will continue to be enriched with this metadata, and the url, expanded\_url, and `display_url` will still be available. This change applies to [Decahose](/x-api/enterprise-gnip-2.0/fundamentals/decahose-api), [PowerTrack](/x-api/enterprise-gnip-2.0/powertrack-api), [Historical PowerTrack](https://developer.x.com/content/developer-twitter/en/docs/tweets/batch-historical/overview), and the [Search APIs](https://developer.x.com/en/docs/x-api/v1/tweets/search/overview).   - - ### November 29th, 2018 - - `X API: Enterprise v1.1 `    - - Today, we are introducing a new operator, is:reply, to help you narrow conversations to those you care about most. You can now filter out replies from your results (in addition to the pre-existing ability to filter out reposts, is:retweet, and Quoted posts, is:quote). This new operator is available today within [PowerTrack](/x-api/enterprise-gnip-2.0/powertrack-api), [Historical PowerTrack](https://developer.x.com/content/developer-twitter/en/docs/tweets/batch-historical/overview), and [Replay](/x-api/enterprise-gnip-2.0/powertrack-api#replay-api). - - The is:reply Boolean operator can be used to filter all replies to posts, or to filter out explicit replies that match a rule. This operator functions in the same way as the is:quote operator. - - You can learn more about this operator in the [documentation](/x-api/enterprise-gnip-2.0/fundamentals/rules-filtering).   - - ### November 19th, 2018 - - `X API: Standard v1.1 `    `X API: Premium v1.1`     `X API: Enterprise v1.1`     - - `X Ads API`     `X Ads API`     `X Developer Labs `    - - Today, we've added the ability for developers to view and edit their existing [X apps](/resources/fundamentals/developer-apps) via the [X app dashboard](https://developer.x.com/content/developer-twitter/en/apps) on developer.x.com as long as they're logged into their X account. Previously, you could only view and edit your existing X apps on developer.x.com if you had applied or been approved for a [developer account](/resources/fundamentals/developer-portal).  - - You still must have an approved developer account to be able to create new X apps.   - - ### November 7th, 2018 - - `X API: Standard v1.1`     `X Ads API`     - - Today, we are announcing that advertisers and publishers are now able to add subtitle files (SRT) to their videos via ads.x.com, Media Studio and our publisher upload API. Subtitles will be viewable on auto-playing video (when no sound is available) on Android and Web. We will release the functionality for iOS in the coming weeks.  - - To read more about the new subtitles endpoints, please review their respective API reference pages: - - * [POST media/subtitles-create](https://developer.x.com/en/docs/x-api/v1/media/upload-media/api-reference/post-media-subtitles-create) - - * [POST media/subtitles-delete](https://developer.x.com/en/docs/x-api/v1/media/upload-media/api-reference/post-media-subtitles-delete) - - ### November 5th, 2018 - - `X API: Premium v1.1`     `X API: Enterprise v1.1`     - - Today we are announcing an update to the [Account Activity API](/x-api/enterprise-gnip-2.0/fundamentals/account-activity) endpoint, [GET subscriptions/count](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#get-direct-messages-events-list#get-account-activity-subscriptions-count). To enable greater visibility into your billing details and use of the API, beginning today, you can programmatically pull the number of provisioned subscriptions associated with your Account Activity API instance within the JSON.  This means you can now see both what your provisioned number of subscriptions are, and how close you are to hitting that limit via the GET subscriptions/count API endpoint.  - - This update has been documented with the [Account Activity API documentation](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#get-direct-messages-events-list#get-account-activity-subscriptions-count).   - - ### October 22nd, 2018 - - `X API: Standard v1.1`     - - Today we are implementing new app-level rate limits on several of our standard POST endpoints: - - * [POST statuses/update](https://developer.x.com/en/docs/x-api/v1/tweets/post-and-engage/api-reference/post-statuses-update) - - * [POST statuses/retweet/:id](https://developer.x.com/en/docs/x-api/v1/tweets/post-and-engage/api-reference/get-statuses-retweets-id) - - * [POST favorites/create](https://developer.x.com/en/docs/x-api/v1/accounts-and-users/follow-search-get-users/api-reference/post-friendships-create) - - * [POST direct\_messages/events/new](https://developer.x.com/en/docs/x-api/v1/direct-messages/sending-and-receiving/api-reference/new-event) - - * [POST friendships/create](https://developer.x.com/en/docs/x-api/v1/accounts-and-users/follow-search-get-users/api-reference/post-friendships-create) - - You can read more about this change in our [forum announcement](https://devcommunity.x.com/t/new-post-endpoint-rate-limit-enforcement-begins-today/115355).   - - ### October 10th, 2018 - - `X API: Standard v1.1`     `X API: Premium v1.1`     `X API: Enterprise v1.1`     - - `X Ads API`     `X Developer Labs `    - - Today we are announcing an update to the [twitter-text](https://github.com/twitter/twitter-text) library to account for the recent changes to the way that X counts emojis. If an emoji previously counted as more than two characters, its count will now be reduced to just two characters to allow for users to make the most out of their 280 characters. - - You can read more about this change in our [forum announcement](https://devcommunity.x.com/t/new-update-to-the-twitter-text-library-emoji-character-count/114607).   - - ### September 17th, 2018 - - `X API: Standard v1.1`     - - We have fully retired the legacy Direct Message endpoints. You can find a list of the retired DM endpoints, as well as their replacements on \[this page]\(https://developer.x.com/content/developer-twitter/en/docs/direct-messages/sending-and-receiving/api-reference. - - You can learn more about this update via our [forum announcement](https://devcommunity.x.com/t/details-and-what-to-expect-from-the-api-deprecations-this-week-on-august-16-2018/110746).   - - ### September 11th, 2018 - - `X API: Standard v1.1`     - - Today we are implementing some changes to the process where you [retreive attached media from Direct Messages](https://developer.x.com/en/docs/x-api/v1/direct-messages/message-attachments/overview). We will no longer support accessing `media_url` or `media_url_https` via an authenticated www.x.com session. The request to fetch `media_url_https` MUST always be signed with the user’s access token using OAuth 1.0A.  - - You can learn more about this update via our [forum announcement](https://devcommunity.x.com/t/direct-message-api-change-to-how-apps-can-access-images-sent-in-direct-messages/112722). - - ### August 23rd, 2018 - - `X API: Enterprise v1.1`     - - We have fully retired [User Streams](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#migration-introduction) and [Site Streams](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#migration-introduction). - - You can learn more about this update via our [forum announcement](https://devcommunity.x.com/t/details-and-what-to-expect-from-the-api-deprecations-this-week-on-august-16-2018/110746).   - - ### August 20th, 2018 - - `X API: Enterprise v1.1`     - - Today we are launching a new version of the Usage API. With this update, we’re making the API more stable by moving to a new system. - - With the system update, users will experience a data "hole" as developers will only be able to pull data back to May 1, 2018. Therefore for the upcoming year, they will be missing out on a few months of historical data (until June 2019). - - A product name is changing within the Usage API from Historical PowerTrack Subscription to Historical PowerTrack 2.0 which will make the product naming consistent with the rest of our user-facing wording. Customers will receive the exact same data in the same format with the update. You will see this change within the products.type JSON object. - - If you have any questions, please reach out to your account manager.   - - ### August 16th, 2018 - - `X API: Standard v1.1`     `X API: Enterprise v1.1`     - - The [Account Activity API DM Beta](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#migration-introduction) product was fully retired today. - - The following services and endpoints will experience degraded service starting today: - - * [User Streams](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#migration-introduction) - - * [Site Streams](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#migration-introduction) - - * [GET direct\_messages](https://developer.x.com/en/docs/x-api/v1/direct-messages/sending-and-receiving/api-reference/list-events) - - * [GET direct\_messages/sent](https://developer.x.com/content/developer-twitter/en/docs/direct-messages/sending-and-receiving/api-reference/get-sent-message) - - * [GET direct\_messages/show](https://developer.x.com/content/developer-twitter/en/docs/direct-messages/sending-and-receiving/api-reference/get-message) - - * [POST direct\_messages/new](https://developer.x.com/content/developer-twitter/en/docs/direct-messages/sending-and-receiving/api-reference/new-message) - - * [POST direct\_messages/destroy](https://developer.x.com/content/developer-twitter/en/docs/direct-messages/sending-and-receiving/api-reference/delete-message) - - User Streams and Site Streams will be fully retired on August 23rd. - - The legacy Direct Messages endpoints will be fully retired on September 17th. - - You can learn more about this update via our [forum announcement](https://devcommunity.x.com/t/details-and-what-to-expect-from-the-api-deprecations-this-week-on-august-16-2018/110746).   - - ### July 24th, 2018 - - `X API: Standard v1.1`     `X API: Premium v1.1`     `X API: Enterprise v1.1`     - - `X Ads API`     `X Developer Labs `    - - As of today, you will no longer be able to create new [X apps](/resources/fundamentals/developer-apps) via [apps.x.com](https://apps.x.com/). You will now be redirected to either your [developer portal](/resources/fundamentals/developer-portal) account or, if you don't have a developer portal account yet, to the page where [you can apply](https://developer.x.com/content/developer-twitter/en/apply-for-access). - - We also announced that we will be implementing new app-level rate limits to the following POST endpoints on September 10th, 2018.  - - * [POST statuses/update](https://developer.x.com/en/docs/x-api/v1/tweets/post-and-engage/api-reference/post-statuses-update) - - * [POST statuses/retweet:id](https://developer.x.com/en/docs/x-api/v1/tweets/post-and-engage/api-reference/post-statuses-retweet-id) - - * [POST friendships/create](https://developer.x.com/en/docs/x-api/v1/accounts-and-users/follow-search-get-users/api-reference/post-friendships-create) - - * [POST favorites/create](https://developer.x.com/en/docs/x-api/v1/tweets/post-and-engage/api-reference/post-favorites-create) - - * [POST direct\_messages/events/new](https://developer.x.com/en/docs/x-api/v1/direct-messages/sending-and-receiving/api-reference/new-event) - - Finally, we are introducing a new option for people to report suspected violations of our platform policies to you for review. - - You can learn more about all of these updates via our [blog post](https://cli.re/g32qKr).   - - ### June 21st, 2018 - - `X API: Standard v1.1`     `X API: Premium v1.1`     `X API: Enterprise v1.1`     - - `X Ads API`     `X Developer Labs `    - - If you have a [developer portal](/resources/fundamentals/developer-portal) account, you can now create and manage your [X apps](/resources/fundamentals/developer-apps). Please read our [forum post](https://devcommunity.x.com/t/app-creation-and-management-now-available-in-the-developer-portal/107723) for more details.   - - ### June 12th, 2018 - - `X API: Standard v1.1`     `X API: Premium v1.1`     `X API: Enterprise v1.1`     - - `X Ads API`     `X Developer Labs `    - - Today, we started requiring that you register the [callback URLs](/resources/fundamentals/developer-apps#callback-urls) that you use with the Sign in with X process. You can read more about this update [here](https://devcommunity.x.com/t/action-required-sign-in-with-twitter-users-must-whitelist-callback-urls/105342). - - We also announced the addition of the tweet\_delete\_events activity to the Account Activity API. This new activity will be sent for those corresponding deleted events to enable developers to more easily provide a compliant experience for their customers and application users. You can read more about this new activity in our [forum post](https://devcommunity.x.com/t/adding-delete-events-to-the-account-activity-api/106783) or on our [documentation](/x-api/enterprise-gnip-2.0/fundamentals/account-activity).   - - ### May 25th, 2018 - - `X API: Standard v1.1`     `X API: Premium v1.1`     `X API: Enterprise v1.1`     - - `X Ads API`     `X for Websites`         `X Developer Labs `    - - Today, we made some changes to our [Terms of Service](https://x.com/en/tos), [Privacy Policy](https://x.com/en/privacy), and \[X Developer Agreement]https://developer.x.com/en/developer-terms/agreement-and-policy that include privacy, security, and data protection updates. Please read our [forum post](https://devcommunity.x.com/t/upcoming-changes-to-the-developer-platform/104603) for more details. - - ### May 23rd, 2018 - - `X API: Standard v1.1`     `X API: Premium v1.1`     `X API: Enterprise v1.1`     `X Ads API`     - - Today, the timezone values in X user objects became private fields. From here on out, all\* time\_zone and utc\_offset data objects will return as null. Please read our [forum post](https://devcommunity.x.com/t/upcoming-changes-to-the-developer-platform/104603) for more details. - \* They will continue to be available on the account/settings endpoint, for authenticated users only. - - ### May 21st, 2018 - - `X API: Enterprise v1.1`     - - Today, we removed all Klout data from post payloads as part of our GDPR updates. - - ### May 14th, 2018 - - `X API: Standard v1.1`     `X API: Premium v1.1`     `X API: Enterprise v1.1`     - - Today, we are changing all instances of profile\_background\_image\_url and profile\_background\_image\_url\_https to their default values. Please read our [forum post](https://devcommunity.x.com/t/upcoming-changes-to-the-developer-platform/104603) for more details. - - In addition to the above change, we are adding a new field to the [Account Activity API](/x-api/enterprise-gnip-2.0/fundamentals/account-activity) payloads to reference which subscription the activity was delivered for. This JSON object is called for\_user\_id and will include the subscribed user's ID who produced that activity as its value. You can see some examples of this new JSON object in our [account activity objects](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#account-activity-data-object-structure) page.   - - ### May 10th, 2018 - - `X API: Standard v1.1`     `X API: Premium v1.1`     `X API: Enterprise v1.1`     - - Today, we are announcing a change to the way that URLs will be rendered in the quote payload. - - We’re adding a new entity called the "quoted\_status\_permalink" entity to ensure the quoted post can be referenced and we will be removing the t.co link from the quoted post "text" field. - - With the new format, the t.co link is no longer appended to the "text" field of the quoted post in the "quoted\_status" object. - - Further, we will no longer put the quoted post t.co url, expanded\_url, and display\_url in the ‘urls’ entity. Instead, these will be added to a new "quoted\_status\_permalink" object with "url", "expanded", and "display" URL attributes. This means that the "quoted\_status\_permalink" object will be reserved for the t.co link back to the quoted post, whereas the "entities.urls" array can be used to identify any links shared within the original post or quote. - - Please read our [forum post](https://devcommunity.x.com/t/updating-how-urls-are-rendered-in-the-quote-tweet-payload/105473) and [updated documentation](https://devcommunity.x.com/t/upcoming-changes-to-the-developer-platform/104603) for more details.   - - ### April 30th, 2018 - - `X for Websites `        - - The announcement of [X Kit](https://developer.x.com/en/docs/x-for-websites) deprecation, after October 31, 2018 X Kit will no longer be actively maintained.  Please read our [blog post](https://blog.x.com/developer/en_us/topics/tools/2018/discontinuing-support-for-twitter-kit-sdk.html) for more details.   - - ### April 24th, 2018 - - `X API: Standard v1.1`     `X API: Premium v1.1`     `X API: Enterprise v1.1`     - - `X Ads API`     `X for Websites`         `X Developer Labs `    - - Today we announced several updates to the platform related to GDPR. Please read our [forum post](https://devcommunity.x.com/t/upcoming-changes-to-the-developer-platform/104603) for more details.   - - ### March 1, 2018 - - `X API: Enterprise v1.1`     - - The addition of a new object to the post payload – additional\_media\_info object – and also restricting some video details (video\_info) for promoted posts where advertisers have requested we limit video playback to X owned clients. You can find additional information about this change at the following link: [Extended Entities Objects > post with native video](https://developer.x.com/en/docs/x-api/v1/data-dictionary/object-model/extended-entities).   - - ### February 1st, 2018 - - `X API: Premium v1.1`     - - Launch of the [premium full-archive search endpoint](https://blog.x.com/developer/en_us/topics/tools/2018/access-the-full-history-of-tweets.html).   - - ### December 19th, 2017 - - `X API: Premium v1.1 `    - - Launched both ([All Activities](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#migration-introduction)) and ([Direct Messages](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#migration-introduction)) Standard beta Account Activity APIs, read more about this launch [on our blog](https://blog.x.com/developer/en_us/topics/tools/2017/announcing-more-functionality-to-improve-customer-engagements-on-twitter.html).  Announced User streams & Site streams deprecation and sunset date of Tuesday June 19, 2018.   - - ### December 15th, 2017 - - `X API: Standard v1.1`     `X API: Premium v1.1`     `X API: Enterprise v1.1`     - - `X Ads API`     `X Developer Labs `    - - Version 2.0 of twitter-text is now available [on GitHub](https://github.com/twitter/twitter-text). This update addresses the change in our character limit that was rolled out on November 7th, 2017. To learn more about this update, please [visit our forum](https://devcommunity.x.com/t/shipped-twitter-text-2-0/98577).   - - ### November 14th, 2017 - - `X API: Premium v1.1`     - - Launched the Premium APIs. - - These new APIs build on the quality and stability of our enterprise data platform, and make it available more widely via a tiered pricing model. For the first time, you can start to search across 30 days of posts (instead of the limited 7 days of data on the standard endpoint), and optionally, you can also access our premium enrichments for profile geo, URL expansion, and poll data. Here’s a taste of some of the new features: - - * More posts per request (Sandbox + Premium) - - * A far more rich query language enabling more complex queries (Sandbox + Premium) - - * A counts endpoint that returns time-series counts of posts (Premium) - - * Metadata enrichments, such as expanded URLs and Profile Geo (Premium) - - Read more about this launch [on our blog](https://blog.x.com/developer/en_us/topics/tools/2017/introducing-twitter-premium-apis.html).   - - ### November 7th, 2017 - - `X API: Standard v1.1`     `X API: Premium v1.1`     `X API: Enterprise v1.1`     - - `X Ads API`     `X for Websites`         `X Developer Labs `    - - Official launch of 280 character posts in languages where cramming was an issue. Please see our [forum announcement](https://devcommunity.x.com/t/updating-the-character-limit-and-the-twitter-text-library/96425) or official [blog post](https://blog.x.com/official/en_us/topics/product/2017/tweetingmadeeasier.html) for further reference.   - - ### November 1st, 2017 - - `X API: Standard v1.1`     - - The ability to send Direct Messages via the statuses/update API endpoint has been completely removed, and the `enable_dm_commands` and `fail_dm_commands` parameters will no longer have any effect. Read more about this update [on our forum](https://devcommunity.x.com/t/retiring-legacy-dm-commands-on-the-standard-tweet-api/86653 "on our forum").   - - ### October 11th, 2017 - - `X API: Standard v1.1`     `X API: Premium v1.1`     `X API: Enterprise v1.1`     - - `X Ads API`     `X Developer Labs `    - - A change was made to X’s backend OAuth API endpoints which altered the behaviour of the /oauth/authenticate endpoint to match that of the /oauth/authorize endpoint. Read more about this update [on our forum](https://devcommunity.x.com/t/recent-changes-to-twitter-s-oauth-login-flow-and-api-endpoints/94943).   - - ### October 10th, 2017 - - `X API: Enterprise v1.1`     - - The Engagement API was updated to use the same metrics aggregation methodology in use by the X analytics dashboard. Read more about this update [on our forum](https://devcommunity.x.com/t/changes-to-the-engagement-api/94523).   - - ### October 1st, 2017 - - `X API: Standard v1.1 `    - - The default value of the `fail_dm_commands` parameter within the DM statuses/update endpoint has been switched to *true*. All status updates intended as Direct Messages will start to return errors (unless `enable_dm_commands` is *false*, in which case the post will be posted). Read more about this update [on our forum](https://devcommunity.x.com/t/retiring-legacy-dm-commands-on-the-standard-tweet-api/86653).   - - ### September 26th, 2017 - - `X API: Standard v1.1`     `X API: Premium v1.1`     `X API: Enterprise v1.1`     - - X Ads API     `X Developer Labs `    - - The response payload for 280 character tweets will be treated the same way as long tweets. Read more about this update [on our forum](https://devcommunity.x.com/t/testing-280-characters-for-certain-languages/94126).   - - ### September 11th, 2017 - - `X API: Standard v1.1`     `X API: Premium v1.1`     `X API: Enterprise v1.1`     - - Adding new data to the post payload (`additional_media_info object`) and also restricting some video details (`video_info`) for promoted posts where advertisers have requested we limit video playback to X owned clients. You can find additional information about this change at the following link: [Extended Entities Objects > post with native video](https://developer.x.com/en/docs/x-api/v1/data-dictionary/object-model/extended-entities)   - - ### August 7, 2017 - - `X API: Enterprise v1.1 `    - - 30-Day and Full-Archive Search ended support for url\_contains: operator. Deprecation of this operator was announced as part of the Gnip 2.0 migration in August 2016. Any Search query using the url\_contains: Operator will be rejected as invalid. - - ### July 6, 2017 - - `X API: Enterprise v1.1    ` - - The enterprise Search API (both 30-Day and Full-Archive) will no longer support the url\_contains: operator beginning 30 days from today, or after August 4, 2017 (Support of url\_contains: will actually end with the first deploy after that date). Deprecation of this operator was announced as part of the Gnip 2.0 migration in August 2016. When Operator support is ended, any query using the url\_contains: will be rejected as invalid.   - - ### June 2nd, 2017 - - `X API: Standard v1.1`     `X API: Enterprise v1.1 `    `X Ads API `    - - The xAuth authentication mechanism has been removed from all X APIs  Read more about this update [on our forum](https://devcommunity.x.com/t/retirement-of-xauth/88022).   - - ### May 8th, 2017 - - `X API: Standard v1.1`     `X API: Enterprise v1.1`     `X Ads API`     - - All HTTP headers have been forced into lowercase (`content-type`, `x-rate-limit-remaining`, `x-access-level` etc). Read more about this update [on our forum](https://devcommunity.x.com/t/upcoming-http-header-changes/86715).   - - ### May 5th, 2017 - - `X API: Standard v1.1`     - - The optional `enable_dm_commands` parameter to statuses/update will enable applications to remove DM command support early, before the transition period ends. The default value is *true* (i.e. current legacy behavior), but this may be set to *false* to get the new, post-November 1 behavior. The optional fail\_dm\_commands parameter to statuses/update will make DM commands return HTTP 403 (error code 151) from the API when set to *true*. The default value is *false*. Read more about this update [on our forum](https://devcommunity.x.com/t/retiring-legacy-dm-commands-on-the-standard-tweet-api/86653).   - - ### April 25th, 2017 - - `X API: Enterprise v1.1`     - - Rules with emojis are now available in the enterprise Search APIs   - - ### April 6th, 2017 - - `X API: Standard v1.1`     - - Access to several new Direct Message APIs are now more widely available. Read more about this update [on our blog](https://blog.twitter.com/developer/en_us/topics/tools/2017/new-apis-to-power-the-future-of-customer-engagement-in-direct-me.html).   - - ### March 9th, 2017 - - `X API: Standard v1.1`    `X API: Enterprise v1.1`     `X Ads API`     - - MPEG-DASH URLs (.mpd) has been removed from the payload of a post that contains video. Read more about this update [on our forum](https://devcommunity.x.com/t/retiring-mpeg-dash-video-support-on-march-9th-2017/82761).   - - ### February 22nd, 2017 - - `X API: Enterprise v1.1`     - - New Enrichment! Poll Metadata is now available through our enterprise APIs. See the [documentation](/x-api/enterprise-gnip-2.0/fundamentals/account-activity#migration-introduction) for more details. - - New payload field: Image Alt-Text (decription) field may be present in the entities.media\[] and extended\_entities.media\[] section of the payload if a user chooses chooses the "Add description" option when adding a photo to a post. This is available in enriched native format only. - - Default payload format: Newly created streams on Gnip products will now default to orriginal format JSON.   - - ### January 23rd, 2017 - - `X API: Enterprise v1.1`     - - Historical PowerTrack API & Replay API - - * quote filtering is now supported - - * Quoted posts are now fully rehydrated within HPT and Replay post payloads   - - ### January 17th, 2017 - - `X API: Enterprise v1.1`     - - New payload fields: quote\_count and reply\_count are now available in native enriched format payloads across Realtime and Historical APIs   - - ### December 20th, 2016 - - `X API: Enterprise v1.1`     - - Full-Archive Search API (FAS): - - * Added support for additional geo operators: - - * place: - - * place\_country: - - * has:profile\_geo: - - * profile\_country: - - * profile\_region: - - * profile\_locality:   - - ### December 5th, 2016 - - `X API: Enterprise v1.1`     - - Rule management (GET and DELETE) by Rule ID is now available for PowerTrack 2.0 and PowerTrack Replay 2.0 -   - - ### November 10th, 2016 - - `X API: Enterprise v1.1    ` - - 30-Day Search API: - - * Added support for additional geo operators: - - * place: - - * place\_country: - - * has:profile\_geo: - - * profile\_country: - - * profile\_region: - - * profile\_locality: - - \ No newline at end of file + * profile_locality: + \ No newline at end of file diff --git a/docs.json b/docs.json index ce43e4c90..84eccb160 100644 --- a/docs.json +++ b/docs.json @@ -7,45 +7,6 @@ "light": "#B0B0B0", "dark": "#0E0E0E" }, - "redirects": [ - { - "source": "/updates/changelog", - "destination": "/changelog" - }, - { - "source": "/status/status", - "destination": "/status" - }, - { - "source": "/status/incident", - "destination": "/incidents" - }, - { - "source": "/x-api/users/personalized-trends/personalized-trends", - "destination": "/x-api/trends/get-personalized-trends" - }, - { - "source": "/x-api/users/personalized-trends", - "destination": "/x-api/trends/get-personalized-trends" - }, - { - "source": "/x-api/trends/introduction", - "destination": "/x-api/trends/trends-by-woeid/introduction" - }, - - { - "source": "/x-api/media/media-metadata-create", - "destination": "/x-api/media/metadata-create" - }, - { - "source": "/x-api/media/media-subtitles-create", - "destination": "/x-api/media/subtitle-create" - }, - { - "source": "/x-api/media/media-subtitles-delete", - "destination": "/x-api/media/subtitle-delete" - } - ], "favicon": "/favicon.png", "navigation": { "versions": [ @@ -56,85 +17,74 @@ "tab": "Home", "groups": [ { - "group": "Home", + "group": "Getting Started", "pages": [ - "home" - ] - } - ] - }, - { - "tab": "Get started", - "groups": [ - { - "group": "Get Started", - "pages": [ - "resources/platform-overview" + "overview" ] }, { "group": "Fundamentals", "pages": [ - "resources/fundamentals/developer-apps", - "resources/fundamentals/projects", - "resources/fundamentals/developer-portal", + "fundamentals/developer-apps", + "fundamentals/projects", + "fundamentals/developer-portal", { "group": "Authentication", "icon": "key", "pages": [ - "resources/fundamentals/authentication/overview", + "fundamentals/authentication/overview", { "group": "Guides", "pages": [ - "resources/fundamentals/authentication/guides/log-in-with-x", - "resources/fundamentals/authentication/guides/authentication-best-practices", - "resources/fundamentals/authentication/guides/tls", - "resources/fundamentals/authentication/guides/v2-authentication-mapping" + "fundamentals/authentication/guides/log-in-with-x", + "fundamentals/authentication/guides/authentication-best-practices", + "fundamentals/authentication/guides/tls", + "fundamentals/authentication/guides/v2-authentication-mapping" ] }, { "group": "OAuth 1.0a", "pages": [ - "resources/fundamentals/authentication/oauth-1-0a/api-key-and-secret", - "resources/fundamentals/authentication/oauth-1-0a/obtaining-user-access-tokens", - "resources/fundamentals/authentication/oauth-1-0a/authorizing-a-request", - "resources/fundamentals/authentication/oauth-1-0a/oauth-echo", - "resources/fundamentals/authentication/oauth-1-0a/pin-based-oauth", - "resources/fundamentals/authentication/oauth-1-0a/creating-a-signature", - "resources/fundamentals/authentication/oauth-1-0a/percent-encoding-parameters" + "fundamentals/authentication/oauth-1-0a/api-key-and-secret", + "fundamentals/authentication/oauth-1-0a/obtaining-user-access-tokens", + "fundamentals/authentication/oauth-1-0a/authorizing-a-request", + "fundamentals/authentication/oauth-1-0a/oauth-echo", + "fundamentals/authentication/oauth-1-0a/pin-based-oauth", + "fundamentals/authentication/oauth-1-0a/creating-a-signature", + "fundamentals/authentication/oauth-1-0a/percent-encoding-parameters" ] }, { "group": "OAuth 2.0", "pages": [ - "resources/fundamentals/authentication/oauth-2-0/overview", - "resources/fundamentals/authentication/oauth-2-0/application-only", - "resources/fundamentals/authentication/oauth-2-0/bearer-tokens", - "resources/fundamentals/authentication/oauth-2-0/authorization-code", - "resources/fundamentals/authentication/oauth-2-0/user-access-token" + "fundamentals/authentication/oauth-2-0/overview", + "fundamentals/authentication/oauth-2-0/application-only", + "fundamentals/authentication/oauth-2-0/bearer-tokens", + "fundamentals/authentication/oauth-2-0/authorization-code", + "fundamentals/authentication/oauth-2-0/user-access-token" ] }, - "resources/fundamentals/authentication/basic-auth", - "resources/fundamentals/authentication/faq", - "resources/fundamentals/authentication/api-reference" + "fundamentals/authentication/basic-auth", + "fundamentals/authentication/faq", + "fundamentals/authentication/api-reference" ] }, - "resources/fundamentals/counting-characters", - "resources/fundamentals/rate-limits", - "resources/fundamentals/x-ids", - "resources/fundamentals/security" + "fundamentals/counting-characters", + "fundamentals/rate-limits", + "fundamentals/x-ids", + "fundamentals/security" ] }, { "group": "Partners & Customers", "pages": [ - "resources/enterprise/partner-directory", - "resources/enterprise/customer-directory", + "enterprise/partner-directory", + "enterprise/customer-directory", { "group": "Request Access", "pages": [ - "resources/enterprise/forms/enterprise-api-interest", - "resources/enterprise/forms/government-end-user-request" + "enterprise/forms/enterprise-api-interest", + "enterprise/forms/government-end-user-request" ] } ] @@ -142,10 +92,10 @@ { "group": "Resources", "pages": [ - "resources/tools-and-libraries", - "resources/tutorials", - "resources/api-reference-index", - "resources/newsletter" + "tools-and-libraries", + "tutorials", + "api-reference-index", + "newsletter" ] } ] @@ -229,8 +179,8 @@ } ] }, - "x-api/posts/full-archive-search", - "x-api/posts/recent-search" + "x-api/posts/search-all-posts", + "x-api/posts/search-recent-posts" ] }, { @@ -256,8 +206,8 @@ } ] }, - "x-api/posts/full-archive-search-counts", - "x-api/posts/recent-search-counts" + "x-api/posts/get-count-of-all-posts", + "x-api/posts/get-count-of-recent-posts" ] }, { @@ -281,10 +231,10 @@ } ] }, - "x-api/posts/filtered-stream", - "x-api/posts/rules-lookup", - "x-api/posts/rules-count", - "x-api/posts/adddelete-rules" + "x-api/stream/stream-filtered-posts", + "x-api/stream/get-stream-rules", + "x-api/stream/get-stream-rule-counts", + "x-api/stream/update-stream-rules" ] }, { @@ -304,9 +254,9 @@ "x-api/posts/timelines/integrate" ] }, - "x-api/posts/user-posts-timeline-by-user-id", - "x-api/posts/user-mention-timeline-by-user-id", - "x-api/posts/user-home-timeline-by-user-id" + "x-api/posts/get-posts", + "x-api/posts/get-mentions", + "x-api/posts/get-timeline" ] }, { @@ -320,8 +270,8 @@ "x-api/posts/lookup/integrate" ] }, - "x-api/posts/post-lookup-by-post-ids", - "x-api/posts/post-lookup-by-post-id" + "x-api/posts/get-posts-by-ids", + "x-api/posts/get-post-by-id" ] }, { @@ -341,9 +291,16 @@ "x-api/posts/bookmarks/integrate" ] }, - "x-api/bookmarks/bookmarks-by-user", - "x-api/bookmarks/add-post-to-bookmarks", - "x-api/bookmarks/remove-a-bookmarked-post" + { + "group": "Bookmark Folders", + "pages": [ + "x-api/bookmarks/get-bookmark-folders", + "x-api/bookmarks/get-bookmarks-by-folder-id" + ] + }, + "x-api/bookmarks/get-bookmarks", + "x-api/bookmarks/create-bookmark", + "x-api/bookmarks/delete-bookmark" ] }, { @@ -357,8 +314,8 @@ "x-api/posts/manage-tweets/integrate" ] }, - "x-api/posts/creation-of-a-post", - "x-api/posts/post-delete-by-post-id" + "x-api/posts/create-post", + "x-api/posts/delete-post" ] }, { @@ -379,11 +336,11 @@ "x-api/posts/retweets/integrate" ] }, - "x-api/users/returns-user-objects-that-have-retweeted-the-provided-post-id", - "x-api/posts/causes-the-user-in-the-path-to-repost-the-specified-post", - "x-api/posts/causes-the-user-in-the-path-to-unretweet-the-specified-post", - "x-api/posts/retrieve-posts-that-repost-a-post", - "x-api/users/returns-repost-of-user" + "x-api/users/get-reposted-by", + "x-api/posts/repost-post", + "x-api/posts/unrepost-post", + "x-api/posts/get-reposts", + "x-api/users/get-reposts-of-me" ] }, { @@ -396,7 +353,7 @@ "x-api/posts/quote-tweets/quickstart" ] }, - "x-api/posts/retrieve-posts-that-quote-a-post" + "x-api/posts/get-quoted-posts" ] }, { @@ -417,7 +374,7 @@ } ] }, - "x-api/posts/hide-replies" + "x-api/posts/hide-reply" ] } ] @@ -442,18 +399,18 @@ "x-api/users/lookup/integrate" ] }, - "x-api/users/user-lookup-by-id", - "x-api/users/user-lookup-by-ids", - "x-api/users/user-lookup-by-usernames", - "x-api/users/user-lookup-by-username", - "x-api/users/user-lookup-me" + "x-api/users/get-user-by-id", + "x-api/users/get-users-by-ids", + "x-api/users/get-users-by-usernames", + "x-api/users/get-user-by-username", + "x-api/users/get-my-user" ] }, { "group": "Search", "pages": [ "x-api/users/search/introduction", - "x-api/users/user-search" + "x-api/users/search-users" ] }, { @@ -466,8 +423,8 @@ "x-api/users/follows/quickstart" ] }, - "x-api/users/followers-by-user-id", - "x-api/users/following-by-user-id", + "x-api/users/get-followers", + "x-api/users/get-following", "x-api/users/follow-user", "x-api/users/unfollow-user" ] @@ -489,9 +446,9 @@ "x-api/users/mutes/integrate" ] }, - "x-api/users/mute-user-by-user-id", - "x-api/users/unmute-user-by-user-id", - "x-api/users/returns-user-objects-that-are-muted-by-the-provided-user-id" + "x-api/users/mute-user", + "x-api/users/unmute-user", + "x-api/users/get-muting" ] }, { @@ -505,7 +462,7 @@ "x-api/users/blocks/integrate" ] }, - "x-api/users/returns-user-objects-that-are-blocked-by-provided-user-id" + "x-api/users/get-blocking" ] } ] @@ -524,10 +481,10 @@ "x-api/direct-messages/manage/integrate" ] }, - "x-api/direct-messages/create-a-new-dm-conversation", - "x-api/direct-messages/delete-dm", - "x-api/direct-messages/send-a-new-message-to-a-user", - "x-api/direct-messages/send-a-new-message-to-a-dm-conversation" + "x-api/direct-messages/create-dm-conversation", + "x-api/direct-messages/delete-dm-event", + "x-api/direct-messages/create-dm-message-by-participant-id", + "x-api/direct-messages/create-dm-message-by-conversation-id" ] }, { @@ -543,16 +500,16 @@ }, "x-api/direct-messages/get-dm-events-for-a-dm-conversation", "x-api/direct-messages/get-dm-events-for-a-dm-conversation-1", - "x-api/direct-messages/get-recent-dm-events", - "x-api/direct-messages/get-dm-events-by-id" + "x-api/direct-messages/get-dm-events", + "x-api/direct-messages/get-dm-event-by-id" ] }, { "group": "Blocks", "pages": [ "x-api/direct-messages/blocks/introduction", - "x-api/users/causes-dms-tofrom-the-target-user-in-the-path-to-be-blocked-by-the-authenticated-request-user", - "x-api/users/causes-dms-tofrom-the-target-user-in-the-path-to-be-unblocked-by-the-authenticated-request-user" + "x-api/users/block-dms", + "x-api/users/unblock-dms" ] } ] @@ -573,10 +530,10 @@ } ] }, - "x-api/posts/returns-post-objects-liked-by-the-provided-user-id", - "x-api/users/returns-user-objects-that-have-liked-the-provided-post-id", - "x-api/posts/causes-the-user-in-the-path-to-like-the-specified-post", - "x-api/posts/causes-the-user-in-the-path-to-unlike-the-specified-post" + "x-api/posts/get-liked-posts", + "x-api/users/get-liking-users", + "x-api/posts/like-post", + "x-api/posts/unlike-post" ] }, { @@ -593,9 +550,9 @@ "x-api/lists/list-lookup/integrate" ] }, - "x-api/lists/list-lookup-by-list-id", - "x-api/lists/get-users-followed-lists", - "x-api/lists/get-a-users-owned-lists" + "x-api/lists/get-list-by-id", + "x-api/lists/get-followed-lists", + "x-api/lists/get-owned-lists" ] }, { @@ -609,7 +566,7 @@ "x-api/lists/list-tweets/integrate" ] }, - "x-api/posts/list-posts-timeline-by-list-id" + "x-api/posts/get-list-posts" ] }, { @@ -626,8 +583,8 @@ "x-api/lists/create-list", "x-api/lists/update-list", "x-api/lists/delete-list", - "x-api/lists/follow-a-list", - "x-api/lists/unfollow-a-list" + "x-api/lists/follow-list", + "x-api/lists/unfollow-list" ] }, { @@ -651,16 +608,16 @@ { "group": "Manage", "pages": [ - "x-api/lists/add-a-list-member", - "x-api/lists/remove-a-list-member" + "x-api/lists/add-list-member", + "x-api/lists/remove-list-member" ] }, { "group": "Lookup", "pages": [ - "x-api/lists/get-a-users-list-memberships", - "x-api/users/returns-user-objects-that-follow-a-list-by-the-provided-list-id", - "x-api/users/returns-user-objects-that-are-members-of-a-list-by-the-provided-list-id" + "x-api/lists/get-list-memberships", + "x-api/users/get-list-followers", + "x-api/users/get-list-members" ] } ] @@ -683,9 +640,9 @@ "x-api/lists/pinned-lists/integrate" ] }, - "x-api/lists/get-a-users-pinned-lists", - "x-api/lists/pin-a-list", - "x-api/lists/unpin-a-list" + "x-api/lists/get-pinned-lists", + "x-api/lists/pin-list", + "x-api/lists/unpin-list" ] } ] @@ -704,11 +661,11 @@ "x-api/spaces/lookup/quickstart" ] }, - "x-api/spaces/space-lookup-up-space-ids", - "x-api/spaces/space-lookup-by-their-creators", - "x-api/spaces/space-lookup-by-space-id", - "x-api/spaces/retrieve-posts-from-a-space", - "x-api/spaces/retrieve-the-list-of-users-who-purchased-a-ticket-to-the-given-space" + "x-api/spaces/get-spaces-by-ids", + "x-api/spaces/get-spaces-by-creator-ids", + "x-api/spaces/get-space-by-id", + "x-api/spaces/get-space-posts", + "x-api/spaces/get-space-ticket-buyers" ] }, { @@ -721,7 +678,7 @@ "x-api/spaces/search/quickstart" ] }, - "x-api/spaces/search-for-spaces" + "x-api/spaces/search-spaces" ] } ] @@ -733,7 +690,7 @@ "group": "Communities Lookup", "pages": [ "x-api/communities/lookup/introduction", - "x-api/communities/communities-lookup-by-community-id" + "x-api/communities/get-community-by-id" ] }, { @@ -745,6 +702,17 @@ } ] }, + { + "group": "Community Notes", + "pages": [ + "x-api/community-notes/introduction", + "x-api/community-notes/quickstart", + "x-api/community-notes/search-for-posts-eligible-for-community-notes", + "x-api/community-notes/search-for-community-notes-written", + "x-api/community-notes/create-a-community-note", + "x-api/community-notes/delete-a-community-note" + ] + }, { "group": "Trends", "pages": [ @@ -752,7 +720,7 @@ "group": "Trends", "pages": [ "x-api/trends/trends-by-woeid/introduction", - "x-api/trends/trends" + "x-api/trends/get-trends-by-woeid" ] }, { @@ -778,19 +746,19 @@ "x-api/media/quickstart/media-upload-chunked" ] }, - "x-api/media/image-or-subtitle-media-upload", - "x-api/media/media-upload-initialize", - "x-api/media/media-upload-append", - "x-api/media/media-upload-finalize", - "x-api/media/media-upload-status" + "x-api/media/upload-media", + "x-api/media/initialize-media-upload", + "x-api/media/append-media-upload", + "x-api/media/finalize-media-upload", + "x-api/media/get-media-upload-status" ] }, { "group": "Metadata", "pages": [ - "x-api/media/metadata-create", - "x-api/media/subtitle-create", - "x-api/media/subtitle-delete" + "x-api/media/create-media-metadata", + "x-api/media/create-media-subtitles", + "x-api/media/delete-media-subtitles" ] } ] @@ -799,7 +767,7 @@ "group": "Usage", "pages": [ "x-api/usage/introduction", - "x-api/usage/post-usage" + "x-api/usage/get-usage" ] }, { @@ -816,18 +784,18 @@ "x-api/compliance/batch-compliance/integrate" ] }, - "x-api/compliance/list-compliance-jobs", + "x-api/compliance/get-compliance-jobs", "x-api/compliance/create-compliance-job", - "x-api/compliance/get-compliance-job" + "x-api/compliance/get-compliance-job-by-id" ] }, { "group": "Compliance streams", "pages": [ "x-api/compliance/streams/introduction", - "x-api/compliance/likes-compliance-stream", - "x-api/compliance/posts-compliance-stream", - "x-api/compliance/users-compliance-stream" + "x-api/stream/stream-likes-compliance-data", + "x-api/stream/stream-posts-compliance-data", + "x-api/stream/stream-users-compliance-data" ] } @@ -839,7 +807,7 @@ { "group": "Engagement Metrics", "pages": [ - "x-api/posts/get-engagement-analytics", + "x-api/posts/get-post-analytics", "x-api/media/get-media-analytics" ] }, @@ -853,35 +821,35 @@ "x-api/account-activity/migrate/overview" ] }, - "x-api/account-activity/check-if-a-subscription-exists-for-a-given-webhook-and-user", - "x-api/account-activity/deactivates-a-subscription-for-the-specified-webhook-and-user-id", - "x-api/account-activity/get-a-count-of-subscriptions-that-are-currently-active-on-your-account", - "x-api/account-activity/get-a-list-of-the-current-all-activity-type-subscriptions-for-the-specified-webhook", - "x-api/account-activity/request-activity-replay", - "x-api/account-activity/subscribes-the-provided-application-to-all-events-for-the-provided-user-context-for-all-message-types" + "x-api/account-activity/validate-subscription", + "x-api/account-activity/delete-subscription", + "x-api/account-activity/get-subscription-count", + "x-api/account-activity/get-subscriptions", + "x-api/account-activity/create-replay-job", + "x-api/account-activity/create-subscription" ] }, { "group": "Webhooks", "pages": [ "x-api/webhooks/introduction", - "x-api/webhooks/create-webhook-config", - "x-api/webhooks/delete-webhook-config", - "x-api/webhooks/get-a-list-of-webhook-configs-associated-with-a-client-app", - "x-api/webhooks/webhook-crc-check" + "x-api/webhooks/create-webhook", + "x-api/webhooks/delete-webhook", + "x-api/webhooks/get-webhook", + "x-api/webhooks/validate-webhook" ] }, { "group": "Volume Streams", "pages": [ "x-api/posts/volume-streams/introduction", - "x-api/posts/firehose-stream", - "x-api/posts/english-language-firehose-stream", - "x-api/posts/japanese-language-firehose-stream", - "x-api/posts/korean-language-firehose-stream", - "x-api/posts/portuguese-language-firehose-stream", - "x-api/posts/sample-stream", - "x-api/posts/sample-10-stream" + "x-api/stream/stream-all-posts", + "x-api/stream/stream-english-posts", + "x-api/stream/stream-japanese-posts", + "x-api/stream/stream-korean-posts", + "x-api/stream/stream-portuguese-posts", + "x-api/stream/stream-sampled-posts", + "x-api/stream/stream-10-sampled-posts" ] } ] @@ -889,8 +857,8 @@ { "group": "Likes Streams", "pages": [ - "x-api/likes/likes-firehose-stream", - "x-api/likes/likes-sample-10-stream" + "x-api/stream/stream-all-likes", + "x-api/stream/stream-sampled-likes" ] }, { @@ -1089,5 +1057,527 @@ "x": "https://x.com/xdevelopers", "github": "https://github.com/xdevplatform" } - } + }, + "redirects": [ + { + "source": "/updates/changelog", + "destination": "/changelog" + }, + { + "source": "/status/status", + "destination": "/status" + }, + { + "source": "/status/incident", + "destination": "/incidents" + }, + { + "source": "/x-api/users/personalized-trends/personalized-trends", + "destination": "/x-api/trends/get-personalized-trends" + }, + { + "source": "/x-api/users/personalized-trends", + "destination": "/x-api/trends/get-personalized-trends" + }, + { + "source": "/x-api/trends/introduction", + "destination": "/x-api/trends/trends-by-woeid/introduction" + }, + { + "source": "/x-api/media/media-metadata-create", + "destination": "/x-api/media/metadata-create" + }, + { + "source": "/x-api/media/media-subtitles-create", + "destination": "/x-api/media/subtitle-create" + }, + { + "source": "/x-api/media/media-subtitles-delete", + "destination": "/x-api/media/subtitle-delete" + }, + { + "source": "/resources/tutorials", + "destination": "/tutorials" + }, + { + "source": "/resources/tools-and-libraries", + "destination": "/tools-and-libraries" + }, + { + "source": "/platform-overview", + "destination": "/overview" + }, + { + "source": "/home", + "destination": "/overview" + }, + { + "source": "/resources/newsletter", + "destination": "/newsletter" + }, + { + "source": "/resources/api-reference-index", + "destination": "/api-reference-index" + }, + { + "source": "/resources/fundamentals/:slug*", + "destination": "/fundamentals/:slug*" + }, + { + "source": "/resources/enterprise/:slug*", + "destination": "/enterprise/:slug*" + }, + { + "source": "/x-api/account-activity/check-if-a-subscription-exists-for-a-given-webhook-and-user", + "destination": "/x-api/account-activity/validate-subscription" + }, + { + "source": "/x-api/account-activity/deactivates-a-subscription-for-the-specified-webhook-and-user-id", + "destination": "/x-api/account-activity/delete-subscription" + }, + { + "source": "/x-api/account-activity/get-a-count-of-subscriptions-that-are-currently-active-on-your-account", + "destination": "/x-api/account-activity/get-subscription-count" + }, + { + "source": "/x-api/account-activity/get-a-list-of-the-current-all-activity-type-subscriptions-for-the-specified-webhook", + "destination": "/x-api/account-activity/get-subscriptions" + }, + { + "source": "/x-api/account-activity/request-activity-replay", + "destination": "/x-api/account-activity/create-replay-job" + }, + { + "source": "/x-api/account-activity/subscribes-the-provided-application-to-all-events-for-the-provided-user-context-for-all-message-types", + "destination": "/x-api/account-activity/create-subscription" + }, + { + "source": "/x-api/bookmarks/add-post-to-bookmarks", + "destination": "/x-api/bookmarks/create-bookmark" + }, + { + "source": "/x-api/bookmarks/bookmark-folder-posts-by-user-and-folder-id", + "destination": "/x-api/bookmarks/get-bookmarks-by-folder-id" + }, + { + "source": "/x-api/bookmarks/bookmark-folders-by-user", + "destination": "/x-api/bookmarks/get-bookmark-folders" + }, + { + "source": "/x-api/bookmarks/bookmarks-by-user", + "destination": "/x-api/bookmarks/get-bookmarks" + }, + { + "source": "/x-api/bookmarks/remove-a-bookmarked-post", + "destination": "/x-api/bookmarks/delete-bookmark" + }, + { + "source": "/x-api/communities/communities-lookup-by-community-id", + "destination": "/x-api/communities/get-community-by-id" + }, + { + "source": "/x-api/compliance/get-compliance-job", + "destination": "/x-api/compliance/get-compliance-job-by-id" + }, + { + "source": "/x-api/compliance/likes-compliance-stream", + "destination": "/x-api/compliance/stream-likes-compliance-data" + }, + { + "source": "/x-api/compliance/list-compliance-jobs", + "destination": "/x-api/compliance/get-compliance-jobs" + }, + { + "source": "/x-api/compliance/posts-compliance-stream", + "destination": "/x-api/compliance/stream-posts-compliance-data" + }, + { + "source": "/x-api/compliance/users-compliance-stream", + "destination": "/x-api/compliance/stream-users-compliance-data" + }, + { + "source": "/x-api/connection/force-kills-all-streaming-connections-of-the-authenticated-application", + "destination": "/x-api/connection/terminate-all-connections" + }, + { + "source": "/x-api/direct-messages/create-a-new-dm-conversation", + "destination": "/x-api/direct-messages/create-dm-conversation" + }, + { + "source": "/x-api/direct-messages/delete-dm", + "destination": "/x-api/direct-messages/delete-dm-event" + }, + { + "source": "/x-api/direct-messages/get-dm-events-by-id", + "destination": "/x-api/direct-messages/get-dm-event-by-id" + }, + { + "source": "/x-api/direct-messages/get-recent-dm-events", + "destination": "/x-api/direct-messages/get-dm-events" + }, + { + "source": "/x-api/direct-messages/send-a-new-message-to-a-dm-conversation", + "destination": "/x-api/direct-messages/create-dm-message-by-conversation-id" + }, + { + "source": "/x-api/direct-messages/send-a-new-message-to-a-user", + "destination": "/x-api/direct-messages/create-dm-message-by-participant-id" + }, + { + "source": "/x-api/likes/likes-firehose-stream", + "destination": "/x-api/likes/stream-all-likes" + }, + { + "source": "/x-api/likes/likes-sample-10-stream", + "destination": "/x-api/likes/stream-sampled-likes" + }, + { + "source": "/x-api/lists/add-a-list-member", + "destination": "/x-api/lists/add-list-member" + }, + { + "source": "/x-api/lists/follow-a-list", + "destination": "/x-api/lists/follow-list" + }, + { + "source": "/x-api/lists/get-a-users-list-memberships", + "destination": "/x-api/lists/get-list-memberships" + }, + { + "source": "/x-api/lists/get-a-users-owned-lists", + "destination": "/x-api/lists/get-owned-lists" + }, + { + "source": "/x-api/lists/get-a-users-pinned-lists", + "destination": "/x-api/lists/get-pinned-lists" + }, + { + "source": "/x-api/lists/get-users-followed-lists", + "destination": "/x-api/lists/get-followed-lists" + }, + { + "source": "/x-api/lists/list-lookup-by-list-id", + "destination": "/x-api/lists/get-list-by-id" + }, + { + "source": "/x-api/lists/pin-a-list", + "destination": "/x-api/lists/pin-list" + }, + { + "source": "/x-api/lists/remove-a-list-member", + "destination": "/x-api/lists/remove-list-member" + }, + { + "source": "/x-api/lists/unfollow-a-list", + "destination": "/x-api/lists/unfollow-list" + }, + { + "source": "/x-api/lists/unpin-a-list", + "destination": "/x-api/lists/unpin-list" + }, + { + "source": "/x-api/media/media-lookup-by-media-key-1", + "destination": "/x-api/media/get-media-by-media-key" + }, + { + "source": "/x-api/media/media-lookup-by-media-key", + "destination": "/x-api/media/get-media-by-media-keys" + }, + { + "source": "/x-api/media/media-upload-finalize", + "destination": "/x-api/media/finalize-media-upload" + }, + { + "source": "/x-api/media/image-or-subtitle-media-upload", + "destination": "/x-api/media/upload-media" + }, + { + "source": "/x-api/media/media-upload-initialize", + "destination": "/x-api/media/initialize-media-upload" + }, + { + "source": "/x-api/media/media-upload-append", + "destination": "/x-api/media/append-media-upload" + }, + { + "source": "/x-api/media/media-upload-status", + "destination": "/x-api/media/get-media-upload-status" + }, + { + "source": "/x-api/media/metadata-create", + "destination": "/x-api/media/create-media-metadata" + }, + { + "source": "/x-api/media/subtitle-create", + "destination": "/x-api/media/create-media-subtitles" + }, + { + "source": "/x-api/media/subtitle-delete", + "destination": "/x-api/media/delete-media-subtitles" + }, + { + "source": "/x-api/openapi/returns-the-openapi-specification-document", + "destination": "/x-api/openapi/get-openapi-spec" + }, + { + "source": "/x-api/spaces/retrieve-posts-from-a-space", + "destination": "/x-api/spaces/get-space-posts" + }, + { + "source": "/x-api/spaces/retrieve-the-list-of-users-who-purchased-a-ticket-to-the-given-space", + "destination": "/x-api/spaces/get-space-ticket-buyers" + }, + { + "source": "/x-api/spaces/search-for-spaces", + "destination": "/x-api/spaces/search-spaces" + }, + { + "source": "/x-api/spaces/space-lookup-by-space-id", + "destination": "/x-api/spaces/get-space-by-id" + }, + { + "source": "/x-api/spaces/space-lookup-by-their-creators", + "destination": "/x-api/spaces/get-spaces-by-creator-ids" + }, + { + "source": "/x-api/spaces/space-lookup-up-space-ids", + "destination": "/x-api/spaces/get-spaces-by-ids" + }, + { + "source": "/x-api/trends/trends", + "destination": "/x-api/trends/get-trends-by-woeid" + }, + { + "source": "/x-api/posts/adddelete-rules", + "destination": "/x-api/posts/update-stream-rules" + }, + { + "source": "/x-api/posts/get-engagement-analytics", + "destination": "/x-api/posts/get-post-analytics" + }, + { + "source": "/x-api/posts/causes-the-user-in-the-path-to-like-the-specified-post", + "destination": "/x-api/posts/like-post" + }, + { + "source": "/x-api/posts/causes-the-user-in-the-path-to-repost-the-specified-post", + "destination": "/x-api/posts/repost-post" + }, + { + "source": "/x-api/posts/causes-the-user-in-the-path-to-unlike-the-specified-post", + "destination": "/x-api/posts/unlike-post" + }, + { + "source": "/x-api/posts/causes-the-user-in-the-path-to-unretweet-the-specified-post", + "destination": "/x-api/posts/unrepost-post" + }, + { + "source": "/x-api/posts/creation-of-a-post", + "destination": "/x-api/posts/create-post" + }, + { + "source": "/x-api/posts/english-language-firehose-stream", + "destination": "/x-api/posts/stream-english-posts" + }, + { + "source": "/x-api/posts/filtered-stream", + "destination": "/x-api/posts/stream-filtered-posts" + }, + { + "source": "/x-api/posts/firehose-stream", + "destination": "/x-api/posts/stream-all-posts" + }, + { + "source": "/x-api/posts/full-archive-search-counts", + "destination": "/x-api/posts/get-count-of-all-posts" + }, + { + "source": "/x-api/posts/full-archive-search", + "destination": "/x-api/posts/search-all-posts" + }, + { + "source": "/x-api/posts/get-historical-metrics-for-posts", + "destination": "/x-api/posts/get-historical-post-insights" + }, + { + "source": "/x-api/posts/get-last-28hr-metrics-for-posts", + "destination": "/x-api/posts/get-28-hour-post-insights" + }, + { + "source": "/x-api/posts/hide-replies", + "destination": "/x-api/posts/hide-reply" + }, + { + "source": "/x-api/posts/japanese-language-firehose-stream", + "destination": "/x-api/posts/stream-japanese-posts" + }, + { + "source": "/x-api/posts/korean-language-firehose-stream", + "destination": "/x-api/posts/stream-korean-posts" + }, + { + "source": "/x-api/posts/list-posts-timeline-by-list-id", + "destination": "/x-api/posts/get-list-posts" + }, + { + "source": "/x-api/posts/portuguese-language-firehose-stream", + "destination": "/x-api/posts/stream-portuguese-posts" + }, + { + "source": "/x-api/posts/post-delete-by-post-id", + "destination": "/x-api/posts/delete-post" + }, + { + "source": "/x-api/posts/post-lookup-by-post-id", + "destination": "/x-api/posts/get-post-by-id" + }, + { + "source": "/x-api/posts/post-lookup-by-post-ids", + "destination": "/x-api/posts/get-posts-by-ids" + }, + { + "source": "/x-api/posts/recent-search-counts", + "destination": "/x-api/posts/get-count-of-recent-posts" + }, + { + "source": "/x-api/posts/recent-search", + "destination": "/x-api/posts/search-recent-posts" + }, + { + "source": "/x-api/posts/retrieve-posts-that-quote-a-post", + "destination": "/x-api/posts/get-quoted-posts" + }, + { + "source": "/x-api/posts/retrieve-posts-that-repost-a-post", + "destination": "/x-api/posts/get-reposts" + }, + { + "source": "/x-api/posts/returns-post-objects-liked-by-the-provided-user-id", + "destination": "/x-api/posts/get-liked-posts" + }, + { + "source": "/x-api/posts/rules-lookup", + "destination": "/x-api/posts/get-stream-rules" + }, + { + "source": "/x-api/posts/sample-10-stream", + "destination": "/x-api/posts/stream-10-sampled-posts" + }, + { + "source": "/x-api/posts/sample-stream", + "destination": "/x-api/posts/stream-sampled-posts" + }, + { + "source": "/x-api/posts/user-home-timeline-by-user-id", + "destination": "/x-api/posts/get-timeline" + }, + { + "source": "/x-api/posts/user-mention-timeline-by-user-id", + "destination": "/x-api/posts/get-mentions" + }, + { + "source": "/x-api/posts/user-posts-timeline-by-user-id", + "destination": "/x-api/posts/get-posts" + }, + { + "source": "/x-api/posts/rules-count", + "destination": "/x-api/posts/get-stream-rule-counts" + }, + { + "source": "/x-api/usage/post-usage", + "destination": "/x-api/usage/get-usage" + }, + { + "source": "/x-api/users/causes-dms-tofrom-the-target-user-in-the-path-to-be-blocked-by-the-authenticated-request-user", + "destination": "/x-api/users/block-dms" + }, + { + "source": "/x-api/users/causes-dms-tofrom-the-target-user-in-the-path-to-be-unblocked-by-the-authenticated-request-user", + "destination": "/x-api/users/unblock-dms" + }, + { + "source": "/x-api/users/followers-by-user-id", + "destination": "/x-api/users/get-followers" + }, + { + "source": "/x-api/users/following-by-user-id", + "destination": "/x-api/users/get-following" + }, + { + "source": "/x-api/users/mute-user-by-user-id", + "destination": "/x-api/users/mute-user" + }, + { + "source": "/x-api/users/returns-repost-of-user", + "destination": "/x-api/users/get-reposts-of-me" + }, + { + "source": "/x-api/users/returns-user-objects-that-are-blocked-by-provided-user-id", + "destination": "/x-api/users/get-blocking" + }, + { + "source": "/x-api/users/returns-user-objects-that-are-members-of-a-list-by-the-provided-list-id", + "destination": "/x-api/users/get-list-members" + }, + { + "source": "/x-api/users/returns-user-objects-that-are-muted-by-the-provided-user-id", + "destination": "/x-api/users/get-muting" + }, + { + "source": "/x-api/users/returns-user-objects-that-follow-a-list-by-the-provided-list-id", + "destination": "/x-api/users/get-list-followers" + }, + { + "source": "/x-api/users/returns-user-objects-that-have-liked-the-provided-post-id", + "destination": "/x-api/users/get-liking-users" + }, + { + "source": "/x-api/users/returns-user-objects-that-have-retweeted-the-provided-post-id", + "destination": "/x-api/users/get-reposted-by" + }, + { + "source": "/x-api/users/unmute-user-by-user-id", + "destination": "/x-api/users/unmute-user" + }, + { + "source": "/x-api/users/user-lookup-by-id", + "destination": "/x-api/users/get-user-by-id" + }, + { + "source": "/x-api/users/user-lookup-by-ids", + "destination": "/x-api/users/get-users-by-ids" + }, + { + "source": "/x-api/users/user-lookup-by-username", + "destination": "/x-api/users/get-user-by-username" + }, + { + "source": "/x-api/users/user-lookup-by-usernames", + "destination": "/x-api/users/get-users-by-usernames" + }, + { + "source": "/x-api/users/user-lookup-me", + "destination": "/x-api/users/get-my-user" + }, + { + "source": "/x-api/users/user-search", + "destination": "/x-api/users/search-users" + }, + { + "source": "/x-api/webhooks/create-webhook-config", + "destination": "/x-api/webhooks/create-webhook" + }, + { + "source": "/x-api/webhooks/delete-webhook-config", + "destination": "/x-api/webhooks/delete-webhook" + }, + { + "source": "/x-api/webhooks/get-a-list-of-webhook-configs-associated-with-a-client-app", + "destination": "/x-api/webhooks/get-webhook" + }, + { + "source": "/x-api/webhooks/webhook-crc-check", + "destination": "/x-api/webhooks/validate-webhook" + } + ] } diff --git a/resources/enterprise/customer-directory.mdx b/enterprise/customer-directory.mdx similarity index 98% rename from resources/enterprise/customer-directory.mdx rename to enterprise/customer-directory.mdx index 965a76259..0daa9ba45 100644 --- a/resources/enterprise/customer-directory.mdx +++ b/enterprise/customer-directory.mdx @@ -19,8 +19,6 @@ Work with a trusted X Official Partner to expand what's possible for your busine ## Enterprise customers listing -Here's the modified version of your code with all images removed from the LogoCard components: - @@ -312,11 +310,6 @@ Here's the modified version of your code with all images removed from the LogoCa img="/images/customer-directory/keyhole.png" href="https://keyhole.co/" /> - - + href="https://www.o1.exchange/" + backgroundColor="black"/> + + @@ -739,4 +738,4 @@ Here's the modified version of your code with all images removed from the LogoCa href="http://www.zoho.com?utm_source=twitter_data_website&utm_medium=enterprise%20customer%20directory" /> - \ No newline at end of file + diff --git a/resources/enterprise/forms/application-trial.mdx b/enterprise/forms/application-trial.mdx similarity index 100% rename from resources/enterprise/forms/application-trial.mdx rename to enterprise/forms/application-trial.mdx diff --git a/resources/enterprise/forms/enterprise-api-interest.mdx b/enterprise/forms/enterprise-api-interest.mdx similarity index 100% rename from resources/enterprise/forms/enterprise-api-interest.mdx rename to enterprise/forms/enterprise-api-interest.mdx diff --git a/resources/enterprise/forms/government-end-user-request.mdx b/enterprise/forms/government-end-user-request.mdx similarity index 100% rename from resources/enterprise/forms/government-end-user-request.mdx rename to enterprise/forms/government-end-user-request.mdx diff --git a/resources/enterprise/forms/survey.mdx b/enterprise/forms/survey.mdx similarity index 100% rename from resources/enterprise/forms/survey.mdx rename to enterprise/forms/survey.mdx diff --git a/resources/enterprise/forms/use-case/initial.mdx b/enterprise/forms/use-case/initial.mdx similarity index 100% rename from resources/enterprise/forms/use-case/initial.mdx rename to enterprise/forms/use-case/initial.mdx diff --git a/resources/enterprise/forms/use-case/modification.mdx b/enterprise/forms/use-case/modification.mdx similarity index 100% rename from resources/enterprise/forms/use-case/modification.mdx rename to enterprise/forms/use-case/modification.mdx diff --git a/resources/enterprise/forms/use-case/public-sector.mdx b/enterprise/forms/use-case/public-sector.mdx similarity index 100% rename from resources/enterprise/forms/use-case/public-sector.mdx rename to enterprise/forms/use-case/public-sector.mdx diff --git a/resources/enterprise/forms/use-case/upgrade.mdx b/enterprise/forms/use-case/upgrade.mdx similarity index 100% rename from resources/enterprise/forms/use-case/upgrade.mdx rename to enterprise/forms/use-case/upgrade.mdx diff --git a/resources/enterprise/partner-directory.mdx b/enterprise/partner-directory.mdx similarity index 100% rename from resources/enterprise/partner-directory.mdx rename to enterprise/partner-directory.mdx diff --git a/resources/fundamentals/authentication/api-reference.mdx b/fundamentals/authentication/api-reference.mdx similarity index 100% rename from resources/fundamentals/authentication/api-reference.mdx rename to fundamentals/authentication/api-reference.mdx diff --git a/resources/fundamentals/authentication/basic-auth.mdx b/fundamentals/authentication/basic-auth.mdx similarity index 100% rename from resources/fundamentals/authentication/basic-auth.mdx rename to fundamentals/authentication/basic-auth.mdx diff --git a/resources/fundamentals/authentication/faq.mdx b/fundamentals/authentication/faq.mdx similarity index 100% rename from resources/fundamentals/authentication/faq.mdx rename to fundamentals/authentication/faq.mdx diff --git a/resources/fundamentals/authentication/guides/authentication-best-practices.mdx b/fundamentals/authentication/guides/authentication-best-practices.mdx similarity index 100% rename from resources/fundamentals/authentication/guides/authentication-best-practices.mdx rename to fundamentals/authentication/guides/authentication-best-practices.mdx diff --git a/resources/fundamentals/authentication/guides/log-in-with-x.mdx b/fundamentals/authentication/guides/log-in-with-x.mdx similarity index 100% rename from resources/fundamentals/authentication/guides/log-in-with-x.mdx rename to fundamentals/authentication/guides/log-in-with-x.mdx diff --git a/resources/fundamentals/authentication/guides/tls.mdx b/fundamentals/authentication/guides/tls.mdx similarity index 100% rename from resources/fundamentals/authentication/guides/tls.mdx rename to fundamentals/authentication/guides/tls.mdx diff --git a/resources/fundamentals/authentication/guides/v2-authentication-mapping.mdx b/fundamentals/authentication/guides/v2-authentication-mapping.mdx similarity index 100% rename from resources/fundamentals/authentication/guides/v2-authentication-mapping.mdx rename to fundamentals/authentication/guides/v2-authentication-mapping.mdx diff --git a/resources/fundamentals/authentication/oauth-1-0a/api-key-and-secret.mdx b/fundamentals/authentication/oauth-1-0a/api-key-and-secret.mdx similarity index 100% rename from resources/fundamentals/authentication/oauth-1-0a/api-key-and-secret.mdx rename to fundamentals/authentication/oauth-1-0a/api-key-and-secret.mdx diff --git a/resources/fundamentals/authentication/oauth-1-0a/authorizing-a-request.mdx b/fundamentals/authentication/oauth-1-0a/authorizing-a-request.mdx similarity index 100% rename from resources/fundamentals/authentication/oauth-1-0a/authorizing-a-request.mdx rename to fundamentals/authentication/oauth-1-0a/authorizing-a-request.mdx diff --git a/resources/fundamentals/authentication/oauth-1-0a/creating-a-signature.mdx b/fundamentals/authentication/oauth-1-0a/creating-a-signature.mdx similarity index 100% rename from resources/fundamentals/authentication/oauth-1-0a/creating-a-signature.mdx rename to fundamentals/authentication/oauth-1-0a/creating-a-signature.mdx diff --git a/resources/fundamentals/authentication/oauth-1-0a/oauth-echo.mdx b/fundamentals/authentication/oauth-1-0a/oauth-echo.mdx similarity index 100% rename from resources/fundamentals/authentication/oauth-1-0a/oauth-echo.mdx rename to fundamentals/authentication/oauth-1-0a/oauth-echo.mdx diff --git a/resources/fundamentals/authentication/oauth-1-0a/obtaining-user-access-tokens.mdx b/fundamentals/authentication/oauth-1-0a/obtaining-user-access-tokens.mdx similarity index 100% rename from resources/fundamentals/authentication/oauth-1-0a/obtaining-user-access-tokens.mdx rename to fundamentals/authentication/oauth-1-0a/obtaining-user-access-tokens.mdx diff --git a/resources/fundamentals/authentication/oauth-1-0a/overview.mdx b/fundamentals/authentication/oauth-1-0a/overview.mdx similarity index 100% rename from resources/fundamentals/authentication/oauth-1-0a/overview.mdx rename to fundamentals/authentication/oauth-1-0a/overview.mdx diff --git a/resources/fundamentals/authentication/oauth-1-0a/percent-encoding-parameters.mdx b/fundamentals/authentication/oauth-1-0a/percent-encoding-parameters.mdx similarity index 100% rename from resources/fundamentals/authentication/oauth-1-0a/percent-encoding-parameters.mdx rename to fundamentals/authentication/oauth-1-0a/percent-encoding-parameters.mdx diff --git a/resources/fundamentals/authentication/oauth-1-0a/pin-based-oauth.mdx b/fundamentals/authentication/oauth-1-0a/pin-based-oauth.mdx similarity index 100% rename from resources/fundamentals/authentication/oauth-1-0a/pin-based-oauth.mdx rename to fundamentals/authentication/oauth-1-0a/pin-based-oauth.mdx diff --git a/resources/fundamentals/authentication/oauth-2-0/application-only.mdx b/fundamentals/authentication/oauth-2-0/application-only.mdx similarity index 100% rename from resources/fundamentals/authentication/oauth-2-0/application-only.mdx rename to fundamentals/authentication/oauth-2-0/application-only.mdx diff --git a/resources/fundamentals/authentication/oauth-2-0/authorization-code.mdx b/fundamentals/authentication/oauth-2-0/authorization-code.mdx similarity index 100% rename from resources/fundamentals/authentication/oauth-2-0/authorization-code.mdx rename to fundamentals/authentication/oauth-2-0/authorization-code.mdx diff --git a/resources/fundamentals/authentication/oauth-2-0/bearer-tokens.mdx b/fundamentals/authentication/oauth-2-0/bearer-tokens.mdx similarity index 100% rename from resources/fundamentals/authentication/oauth-2-0/bearer-tokens.mdx rename to fundamentals/authentication/oauth-2-0/bearer-tokens.mdx diff --git a/resources/fundamentals/authentication/oauth-2-0/overview.mdx b/fundamentals/authentication/oauth-2-0/overview.mdx similarity index 100% rename from resources/fundamentals/authentication/oauth-2-0/overview.mdx rename to fundamentals/authentication/oauth-2-0/overview.mdx diff --git a/resources/fundamentals/authentication/oauth-2-0/user-access-token.mdx b/fundamentals/authentication/oauth-2-0/user-access-token.mdx similarity index 100% rename from resources/fundamentals/authentication/oauth-2-0/user-access-token.mdx rename to fundamentals/authentication/oauth-2-0/user-access-token.mdx diff --git a/resources/fundamentals/authentication/overview.mdx b/fundamentals/authentication/overview.mdx similarity index 100% rename from resources/fundamentals/authentication/overview.mdx rename to fundamentals/authentication/overview.mdx diff --git a/resources/fundamentals/counting-characters.mdx b/fundamentals/counting-characters.mdx similarity index 100% rename from resources/fundamentals/counting-characters.mdx rename to fundamentals/counting-characters.mdx diff --git a/resources/fundamentals/developer-apps.mdx b/fundamentals/developer-apps.mdx similarity index 100% rename from resources/fundamentals/developer-apps.mdx rename to fundamentals/developer-apps.mdx diff --git a/resources/fundamentals/developer-portal.mdx b/fundamentals/developer-portal.mdx similarity index 100% rename from resources/fundamentals/developer-portal.mdx rename to fundamentals/developer-portal.mdx diff --git a/resources/fundamentals/projects.mdx b/fundamentals/projects.mdx similarity index 100% rename from resources/fundamentals/projects.mdx rename to fundamentals/projects.mdx diff --git a/resources/fundamentals/rate-limits.mdx b/fundamentals/rate-limits.mdx similarity index 100% rename from resources/fundamentals/rate-limits.mdx rename to fundamentals/rate-limits.mdx diff --git a/resources/fundamentals/security.mdx b/fundamentals/security.mdx similarity index 100% rename from resources/fundamentals/security.mdx rename to fundamentals/security.mdx diff --git a/resources/fundamentals/x-ids.mdx b/fundamentals/x-ids.mdx similarity index 100% rename from resources/fundamentals/x-ids.mdx rename to fundamentals/x-ids.mdx diff --git a/home.mdx b/home.mdx deleted file mode 100644 index ccb83e8df..000000000 --- a/home.mdx +++ /dev/null @@ -1,141 +0,0 @@ ---- -mode: 'custom' ---- - -import { IntroCard } from '/snippets/card.mdx'; - -export function openSearch() { - if (typeof window !== 'undefined') { - document.getElementById('search-bar-entry').click(); - } -} - -
-
-
-
- Tap into what's happening to build what's next -
-

- Get immediate access to the X API and unlock the potential of X data -

-
- -
-
- - Get started - - - - -
-
-
- -
-
- Use cases -
-
- - - - - - -
-
- -
-
-
-
- See how others are innovating with the X Developer Platform -
- -

- Businesses, researchers, and developers all over the world have used the X Developer Platform to creatively innovate, gain valuable insights, and shape the future. Explore how they did it and get inspired to use the APIs in your own way. -

- - Browse all success stories - - - - -
-
\ No newline at end of file diff --git a/images/customer-directory/trueanthem.png b/images/customer-directory/trueanthem.png new file mode 100644 index 000000000..749cd8ce6 Binary files /dev/null and b/images/customer-directory/trueanthem.png differ diff --git a/images/o1-logo.png b/images/o1-logo.png deleted file mode 100644 index 6e8464f08..000000000 Binary files a/images/o1-logo.png and /dev/null differ diff --git a/logo/logo.svg b/logo/logo.svg new file mode 100644 index 000000000..437e2bfdd --- /dev/null +++ b/logo/logo.svg @@ -0,0 +1,3 @@ + + + diff --git a/resources/newsletter.mdx b/newsletter.mdx similarity index 100% rename from resources/newsletter.mdx rename to newsletter.mdx diff --git a/openapi.json b/openapi.json index 761a1223e..efece87b6 100644 --- a/openapi.json +++ b/openapi.json @@ -1,17 +1,17 @@ { "openapi" : "3.0.0", "info" : { - "description" : "Twitter API v2 available endpoints", - "version" : "2.142", - "title" : "Twitter API v2", - "termsOfService" : "https://developer.twitter.com/en/developer-terms/agreement-and-policy.html", + "description" : "X API v2 available endpoints", + "version" : "2.146", + "title" : "X API v2", + "termsOfService" : "https://developer.x.com/en/developer-terms/agreement-and-policy.html", "contact" : { - "name" : "Twitter Developers", - "url" : "https://developer.twitter.com/" + "name" : "X Developers", + "url" : "https://developer.x.com/" }, "license" : { - "name" : "Twitter Developer Agreement and Policy", - "url" : "https://developer.twitter.com/en/developer-terms/agreement-and-policy.html" + "name" : "X Developer Agreement and Policy", + "url" : "https://developer.x.com/en/developer-terms/agreement-and-policy.html" } }, "paths" : { @@ -23,14 +23,14 @@ } ], "tags" : [ - "AAASubscriptions" + "Account Activity" ], - "summary" : "Request Activity Replay", - "description" : "Submits a request to retrieve activities from up to the past five days for all subscriptions associated with the specified webhook during the date and time windows provided.", + "summary" : "Create replay job", + "description" : "Creates a replay job to retrieve activities from up to the past 5 days for all subscriptions associated with a given webhook.", "externalDocs" : { "url" : "https://docs.x.com/x-api/account-activity/introduction" }, - "operationId" : "postAccountActivityReplay", + "operationId" : "createAccountActivityReplayJob", "parameters" : [ { "name" : "webhook_id", @@ -104,14 +104,14 @@ } ], "tags" : [ - "AAASubscriptions" + "Account Activity" ], - "summary" : "Get a count of subscriptions that are currently active on your account", - "description" : "Get a count of subscriptions that are currently active on your account.", + "summary" : "Get subscription count", + "description" : "Retrieves a count of currently active Account Activity subscriptions.", "externalDocs" : { "url" : "https://docs.x.com/x-api/account-activity/introduction" }, - "operationId" : "getSubscriptionCount", + "operationId" : "getAccountActivitySubscriptionCount", "parameters" : [ ], "responses" : { "200" : { @@ -158,14 +158,14 @@ } ], "tags" : [ - "AAASubscriptions" + "Account Activity" ], - "summary" : "Check if a subscription exists for a given webhook and user", - "description" : "Check if a subscription exists for a given webhook and user.", + "summary" : "Validate subscription", + "description" : "Checks a user’s Account Activity subscription for a given webhook.", "externalDocs" : { "url" : "https://docs.x.com/x-api/account-activity/introduction" }, - "operationId" : "getSubscription", + "operationId" : "validateAccountActivitySubscription", "parameters" : [ { "name" : "webhook_id", @@ -223,12 +223,12 @@ "tags" : [ "AAASubscriptions" ], - "summary" : "Subscribes the provided application to all events for the provided user context for all message types", - "description" : "Subscribes the provided application to all events for the provided user context for all message types.", + "summary" : "Create subscription", + "description" : "Creates an Account Activity subscription for the user and the given webhook.", "externalDocs" : { "url" : "https://docs.x.com/x-api/account-activity/introduction" }, - "operationId" : "postSubscription", + "operationId" : "createAccountActivitySubscription", "parameters" : [ { "name" : "webhook_id", @@ -287,14 +287,14 @@ } ], "tags" : [ - "AAASubscriptions" + "Account Activity" ], - "summary" : "Get a list of the current All Activity type subscriptions for the specified webhook", - "description" : "Get a list of the current All Activity type subscriptions for the specified webhook.", + "summary" : "Get subscriptions", + "description" : "Retrieves a list of all active subscriptions for a given webhook.", "externalDocs" : { "url" : "https://docs.x.com/x-api/account-activity/introduction" }, - "operationId" : "getSubscriptionList", + "operationId" : "getAccountActivitySubscriptions", "parameters" : [ { "name" : "webhook_id", @@ -344,14 +344,14 @@ } ], "tags" : [ - "AAASubscriptions" + "Account Activity" ], - "summary" : "Deactivates a subscription for the specified webhook and user id", - "description" : "Deactivates a subscription for the specified webhook and user id.", + "summary" : "Delete subscription", + "description" : "Deletes an Account Activity subscription for the given webhook and user ID.", "externalDocs" : { "url" : "https://docs.x.com/x-api/account-activity/introduction" }, - "operationId" : "deleteSubscription", + "operationId" : "deleteAccountActivitySubscription", "parameters" : [ { "name" : "webhook_id", @@ -420,11 +420,11 @@ "Communities" ], "summary" : "Search Communities", - "description" : "Returns Communities that match search query", + "description" : "Retrieves a list of Communities matching the specified search query.", "externalDocs" : { "url" : "https://developer.x.com" }, - "operationId" : "communitiesSearch", + "operationId" : "searchCommunities", "parameters" : [ { "name" : "query", @@ -526,12 +526,12 @@ "tags" : [ "Communities" ], - "summary" : "Communities lookup by Community ID.", - "description" : "Returns a Community.", + "summary" : "Get Community by ID", + "description" : "Retrieves details of a specific Community by its ID.", "externalDocs" : { "url" : "https://developer.x.com/en/docs/x-api/communities/api-reference/get-communities-id" }, - "operationId" : "communityIdGet", + "operationId" : "getCommunitiesById", "parameters" : [ { "name" : "id", @@ -586,12 +586,12 @@ "tags" : [ "Compliance" ], - "summary" : "List Compliance Jobs", - "description" : "Returns recent Compliance Jobs for a given job type and optional job status", + "summary" : "Get Compliance Jobs", + "description" : "Retrieves a list of Compliance Jobs filtered by job type and optional status.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/compliance/batch-compliance/api-reference/get-compliance-jobs" }, - "operationId" : "listBatchComplianceJobs", + "operationId" : "getComplianceJobs", "parameters" : [ { "name" : "type", @@ -664,12 +664,12 @@ "tags" : [ "Compliance" ], - "summary" : "Create compliance job", - "description" : "Creates a compliance for the given job type", + "summary" : "Create Compliance Job", + "description" : "Creates a new Compliance Job for the specified job type.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/compliance/batch-compliance/api-reference/post-compliance-jobs" }, - "operationId" : "createBatchComplianceJob", + "operationId" : "createComplianceJobs", "parameters" : [ ], "requestBody" : { "content" : { @@ -720,12 +720,12 @@ "tags" : [ "Compliance" ], - "summary" : "Get Compliance Job", - "description" : "Returns a single Compliance Job by ID", + "summary" : "Get Compliance Job by ID", + "description" : "Retrieves details of a specific Compliance Job by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/compliance/batch-compliance/api-reference/get-compliance-jobs-id" }, - "operationId" : "getBatchComplianceJob", + "operationId" : "getComplianceJobsById", "parameters" : [ { "name" : "id", @@ -780,12 +780,12 @@ "tags" : [ "Connection" ], - "summary" : "Force kills all streaming connections of the authenticated application.", - "description" : "Force kills all streaming connections of the authenticated application.", + "summary" : "Terminate all connections", + "description" : "Terminates all active streaming connections for the authenticated application.", "externalDocs" : { "url" : "https://developer.x.com" }, - "operationId" : "killAllAppConnections", + "operationId" : "deleteAllConnections", "parameters" : [ ], "responses" : { "200" : { @@ -833,9 +833,9 @@ "tags" : [ "Direct Messages" ], - "summary" : "Create a new DM Conversation", - "description" : "Creates a new DM Conversation.", - "operationId" : "dmConversationIdCreate", + "summary" : "Create DM conversation", + "description" : "Initiates a new direct message conversation with specified participants.", + "operationId" : "createDmConversations", "parameters" : [ ], "requestBody" : { "content" : { @@ -892,8 +892,8 @@ "tags" : [ "Direct Messages" ], - "summary" : "Get DM Events for a DM Conversation", - "description" : "Returns DM Events for a DM Conversation", + "summary" : "Get DM events for a DM conversation", + "description" : "Retrieves direct message events for a specific conversation.", "operationId" : "getDmEventsByParticipantId", "parameters" : [ { @@ -1022,9 +1022,9 @@ "tags" : [ "Direct Messages" ], - "summary" : "Send a new message to a user", - "description" : "Creates a new message for a DM Conversation with a participant user by ID", - "operationId" : "dmConversationWithUserEventIdCreate", + "summary" : "Create DM message by participant ID", + "description" : "Sends a new direct message to a specific participant by their ID.", + "operationId" : "createDmByParticipantId", "parameters" : [ { "name" : "participant_id", @@ -1092,9 +1092,9 @@ "tags" : [ "Direct Messages" ], - "summary" : "Send a new message to a DM Conversation", - "description" : "Creates a new message for a DM Conversation specified by DM Conversation ID", - "operationId" : "dmConversationByIdEventIdCreate", + "summary" : "Create DM message by conversation ID", + "description" : "Sends a new direct message to a specific conversation by its ID.", + "operationId" : "createDmByConversationId", "parameters" : [ { "name" : "dm_conversation_id", @@ -1162,14 +1162,14 @@ "tags" : [ "Direct Messages" ], - "summary" : "Get DM Events for a DM Conversation", - "description" : "Returns DM Events for a DM Conversation", + "summary" : "Get DM events for a DM conversation", + "description" : "Retrieves direct message events for a specific conversation.", "operationId" : "getDmConversationsIdDmEvents", "parameters" : [ { "name" : "id", "in" : "path", - "description" : "The DM Conversation ID.", + "description" : "The DM conversation ID.", "required" : true, "schema" : { "$ref" : "#/components/schemas/DmConversationId" @@ -1292,8 +1292,8 @@ "tags" : [ "Direct Messages" ], - "summary" : "Get recent DM Events", - "description" : "Returns recent DM Events across DM conversations", + "summary" : "Get DM events", + "description" : "Retrieves a list of recent direct message events across all conversations.", "operationId" : "getDmEvents", "parameters" : [ { @@ -1411,9 +1411,9 @@ "tags" : [ "Direct Messages" ], - "summary" : "Delete Dm", - "description" : "Delete a Dm Event that you own.", - "operationId" : "dmEventDelete", + "summary" : "Delete DM event", + "description" : "Deletes a specific direct message event by its ID, if owned by the authenticated user.", + "operationId" : "deleteDmEvents", "parameters" : [ { "name" : "event_id", @@ -1470,8 +1470,8 @@ "tags" : [ "Direct Messages" ], - "summary" : "Get DM Events by id", - "description" : "Returns DM Events by event id.", + "summary" : "Get DM event by ID", + "description" : "Retrieves details of a specific direct message event by its ID.", "operationId" : "getDmEventsById", "parameters" : [ { @@ -1544,9 +1544,9 @@ "tags" : [ "Tweets" ], - "summary" : "Get Last 28hr Metrics for Posts", - "description" : "Get 28hr Metrics for Posts.", - "operationId" : "TwentyEightHoursEngagementApi", + "summary" : "Get 28-hour Post insights", + "description" : "Retrieves engagement metrics for specified Posts over the last 28 hours.", + "operationId" : "getInsights28Hr", "parameters" : [ { "name" : "tweet_ids", @@ -1675,9 +1675,9 @@ "tags" : [ "Tweets" ], - "summary" : "Get Historical Metrics for Posts", - "description" : "Get Historical Metrics for Posts.", - "operationId" : "HistoricalEngagementApi", + "summary" : "Get historical Post insights", + "description" : "Retrieves historical engagement metrics for specified Posts within a defined time range.", + "operationId" : "getInsightsHistorical", "parameters" : [ { "name" : "tweet_ids", @@ -1823,11 +1823,12 @@ } ], "tags" : [ + "Stream", "Compliance" ], - "summary" : "Likes Compliance stream", - "description" : "Streams 100% of compliance data for Users", - "operationId" : "getLikesComplianceStream", + "summary" : "Stream Likes compliance data", + "description" : "Streams all compliance data related to Likes for Users.", + "operationId" : "streamLikesCompliance", "parameters" : [ { "name" : "backfill_minutes", @@ -1905,14 +1906,15 @@ } ], "tags" : [ + "Stream", "Likes" ], - "summary" : "Likes Firehose stream", - "description" : "Streams 100% of public Likes.", + "summary" : "Stream all Likes", + "description" : "Streams all public Likes in real-time.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/filtered-stream/api-reference/get-likes-firehose-stream" }, - "operationId" : "likesFirehoseStream", + "operationId" : "streamLikesFirehose", "parameters" : [ { "name" : "backfill_minutes", @@ -2015,14 +2017,15 @@ } ], "tags" : [ + "Stream", "Likes" ], - "summary" : "Likes Sample 10 stream", - "description" : "Streams 10% of public Likes.", + "summary" : "Stream sampled Likes", + "description" : "Streams a 10% sample of public Likes in real-time.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/likes/firehose/api-reference/get-likes-sample10-stream" }, - "operationId" : "likesSample10Stream", + "operationId" : "streamLikesSample10", "parameters" : [ { "name" : "backfill_minutes", @@ -2136,11 +2139,11 @@ "Lists" ], "summary" : "Create List", - "description" : "Creates a new List.", + "description" : "Creates a new List for the authenticated user.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/manage-lists/api-reference/post-lists" }, - "operationId" : "listIdCreate", + "operationId" : "createLists", "parameters" : [ ], "requestBody" : { "content" : { @@ -2198,11 +2201,11 @@ "Lists" ], "summary" : "Delete List", - "description" : "Delete a List that you own.", + "description" : "Deletes a specific List owned by the authenticated user by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/manage-lists/api-reference/delete-lists-id" }, - "operationId" : "listIdDelete", + "operationId" : "deleteLists", "parameters" : [ { "name" : "id", @@ -2262,12 +2265,12 @@ "tags" : [ "Lists" ], - "summary" : "List lookup by List ID.", - "description" : "Returns a List.", + "summary" : "Get List by ID", + "description" : "Retrieves details of a specific List by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/list-lookup/api-reference/get-lists-id" }, - "operationId" : "listIdGet", + "operationId" : "getListsById", "parameters" : [ { "name" : "id", @@ -2333,12 +2336,12 @@ "tags" : [ "Lists" ], - "summary" : "Update List.", - "description" : "Update a List that you own.", + "summary" : "Update List", + "description" : "Updates the details of a specific List owned by the authenticated user by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/manage-lists/api-reference/put-lists-id" }, - "operationId" : "listIdUpdate", + "operationId" : "updateLists", "parameters" : [ { "name" : "id", @@ -2409,12 +2412,12 @@ "tags" : [ "Users" ], - "summary" : "Returns User objects that follow a List by the provided List ID", - "description" : "Returns a list of Users that follow a List by the provided List ID", + "summary" : "Get List followers", + "description" : "Retrieves a list of Users who follow a specific List by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/follows/api-reference/get-users-id-followers" }, - "operationId" : "listGetFollowers", + "operationId" : "getListsFollowers", "parameters" : [ { "name" : "id", @@ -2509,12 +2512,12 @@ "tags" : [ "Users" ], - "summary" : "Returns User objects that are members of a List by the provided List ID.", - "description" : "Returns a list of Users that are members of a List by the provided List ID.", + "summary" : "Get List members", + "description" : "Retrieves a list of Users who are members of a specific List by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/list-members/api-reference/get-users-id-list_memberships" }, - "operationId" : "listGetMembers", + "operationId" : "getListsMembers", "parameters" : [ { "name" : "id", @@ -2604,12 +2607,12 @@ "tags" : [ "Lists" ], - "summary" : "Add a List member", - "description" : "Causes a User to become a member of a List.", + "summary" : "Add List member", + "description" : "Adds a User to a specific List by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/list-members/api-reference/post-lists-id-members" }, - "operationId" : "listAddMember", + "operationId" : "addListsMember", "parameters" : [ { "name" : "id", @@ -2677,12 +2680,12 @@ "tags" : [ "Lists" ], - "summary" : "Remove a List member", - "description" : "Causes a User to be removed from the members of a List.", + "summary" : "Remove List member", + "description" : "Removes a User from a specific List by its ID and the User’s ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/list-members/api-reference/delete-lists-id-members-user_id" }, - "operationId" : "listRemoveMember", + "operationId" : "removeListsMemberByUserId", "parameters" : [ { "name" : "id", @@ -2754,12 +2757,12 @@ "tags" : [ "Tweets" ], - "summary" : "List Posts timeline by List ID.", - "description" : "Returns a list of Posts associated with the provided List ID.", + "summary" : "Get List Posts", + "description" : "Retrieves a list of Posts associated with a specific List by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/list-tweets/api-reference/get-lists-id-tweets" }, - "operationId" : "listsIdTweets", + "operationId" : "getListsPosts", "parameters" : [ { "name" : "id", @@ -2861,12 +2864,12 @@ "tags" : [ "Media" ], - "summary" : "Media lookup by Media Key", - "description" : "Returns a variety of information about the Media specified by the requested Media Key.", + "summary" : "Get Media by media keys", + "description" : "Retrieves details of Media files by their media keys.", "externalDocs" : { "url" : "https://developer.x.com" }, - "operationId" : "findMediaByMediaKeys", + "operationId" : "getMediaByMediaKeys", "parameters" : [ { "name" : "media_keys", @@ -2932,9 +2935,9 @@ "tags" : [ "Media" ], - "summary" : "Analytics of Media", - "description" : "Returns analytics of Media.", - "operationId" : "MediaAnalytics", + "summary" : "Get Media analytics", + "description" : "Retrieves analytics data for media.", + "operationId" : "getMediaAnalytics", "parameters" : [ { "name" : "media_keys", @@ -3038,14 +3041,14 @@ } ], "tags" : [ - "MediaUpload" + "Media" ], - "summary" : "Metadata Create", - "description" : "MetadataCreate", + "summary" : "Create Media metadata", + "description" : "Creates metadata for a Media file.", "externalDocs" : { "url" : "https://docs.x.com/x-api/media/media-metadata-create#metadata-create" }, - "operationId" : "metadataCreate", + "operationId" : "createMediaMetadata", "parameters" : [ ], "requestBody" : { "content" : { @@ -3098,14 +3101,14 @@ } ], "tags" : [ - "MediaUpload" + "Media" ], - "summary" : "Subtitle Delete", - "description" : "SubtitleDelete", + "summary" : "Delete Media subtitles", + "description" : "Deletes subtitles for a specific Media file.", "externalDocs" : { "url" : "https://docs.x.com/x-api/media/media-subtitles-delete" }, - "operationId" : "deleteSubtitles", + "operationId" : "deleteMediaSubtitles", "parameters" : [ ], "requestBody" : { "content" : { @@ -3156,14 +3159,14 @@ } ], "tags" : [ - "MediaUpload" + "Media" ], - "summary" : "Subtitle Create", - "description" : "SubtitleCreate", + "summary" : "Create Media subtitles", + "description" : "Creates subtitles for a specific Media file.", "externalDocs" : { "url" : "https://docs.x.com/x-api/media/media-subtitles-create" }, - "operationId" : "createSubtitles", + "operationId" : "createMediaSubtitles", "parameters" : [ ], "requestBody" : { "content" : { @@ -3216,14 +3219,14 @@ } ], "tags" : [ - "MediaUpload" + "Media" ], - "summary" : "Media Upload Status", - "description" : "Get MediaUpload Status", + "summary" : "Get Media upload status", + "description" : "Retrieves the status of a Media upload by its ID.", "externalDocs" : { "url" : "https://docs.x.com/x-api/media/media-upload-status#media-upload-status" }, - "operationId" : "uploadMediaStatus", + "operationId" : "getMediaUploadStatus", "parameters" : [ { "name" : "media_id", @@ -3289,14 +3292,14 @@ } ], "tags" : [ - "MediaUpload" + "Media" ], - "summary" : "Image or subtitle media upload", - "description" : "Uploads an image or a subtitle using a single API call.", + "summary" : "Upload media", + "description" : "Uploads a media file for use in posts or other content.", "externalDocs" : { "url" : "https://docs.x.com/x-api/media/media-upload" }, - "operationId" : "uploadMedia", + "operationId" : "mediaUpload", "parameters" : [ ], "requestBody" : { "content" : { @@ -3354,10 +3357,10 @@ } ], "tags" : [ - "MediaUpload" + "Media" ], - "summary" : "Initialize a media upload request.", - "description" : "Initialize a media upload request.", + "summary" : "Initialize media upload", + "description" : "Initializes a media upload.", "externalDocs" : { "url" : "https://docs.x.com/x-api/media/media-upload" }, @@ -3414,10 +3417,10 @@ } ], "tags" : [ - "MediaUpload" + "Media" ], - "summary" : "Media upload resumable upload append endpoint.", - "description" : "MediaUpload", + "summary" : "Append Media upload", + "description" : "Appends data to a Media upload request.", "externalDocs" : { "url" : "https://docs.x.com/x-api/media/media-upload" }, @@ -3490,10 +3493,10 @@ } ], "tags" : [ - "MediaUpload" + "Media" ], - "summary" : "Finalize a media upload request.", - "description" : "Finalize a media upload request.", + "summary" : "Finalize Media upload", + "description" : "Finalizes a Media upload request.", "externalDocs" : { "url" : "https://docs.x.com/x-api/media/media-upload" }, @@ -3557,12 +3560,12 @@ "tags" : [ "Media" ], - "summary" : "Media lookup by Media Key", - "description" : "Returns a variety of information about the Media specified by the requested Media Key.", + "summary" : "Get Media by media key", + "description" : "Retrieves details of a specific Media file by its media key.", "externalDocs" : { "url" : "https://developer.x.com" }, - "operationId" : "findMediaByMediaKey", + "operationId" : "getMediaByMediaKey", "parameters" : [ { "name" : "media_key", @@ -3607,13 +3610,328 @@ } } }, + "/2/notes" : { + "post" : { + "security" : [ + { + "OAuth2UserToken" : [ + "tweet.write" + ] + }, + { + "UserToken" : [ ] + } + ], + "tags" : [ + "Community Notes" + ], + "summary" : "Create a Community Note", + "description" : "Creates a community note endpoint for LLM use case.", + "externalDocs" : { + "url" : "https://communitynotes.x.com/guide/api/overview" + }, + "operationId" : "createNotes", + "parameters" : [ ], + "requestBody" : { + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreateNoteRequest" + } + } + } + }, + "responses" : { + "200" : { + "description" : "The request has succeeded.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/DeleteNoteResponse" + } + } + } + }, + "default" : { + "description" : "The request has failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Error" + } + }, + "application/problem+json" : { + "schema" : { + "$ref" : "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/2/notes/search/notes_written" : { + "get" : { + "security" : [ + { + "OAuth2UserToken" : [ + "tweet.read" + ] + }, + { + "UserToken" : [ ] + } + ], + "tags" : [ + "Community Notes" + ], + "summary" : "Search for Community Notes Written", + "description" : "Returns all the community notes written by the user.", + "externalDocs" : { + "url" : "https://docs.x.com/x-api/community-notes/search-for-community-notes-written" + }, + "operationId" : "searchNotesWritten", + "parameters" : [ + { + "name" : "test_mode", + "in" : "query", + "description" : "If true, return the notes the caller wrote for the test. If false, return the notes the caller wrote on the product.", + "required" : true, + "schema" : { + "type" : "boolean" + }, + "style" : "form" + }, + { + "name" : "pagination_token", + "in" : "query", + "description" : "Pagination token to get next set of posts eligible for notes.", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "form" + }, + { + "name" : "max_results", + "in" : "query", + "description" : "Max results to return.", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1, + "maximum" : 100, + "format" : "int32", + "default" : 10 + }, + "style" : "form" + }, + { + "$ref" : "#/components/parameters/NoteFieldsParameter" + } + ], + "responses" : { + "200" : { + "description" : "The request has succeeded.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Get2NotesSearchNotesWrittenResponse" + } + } + } + }, + "default" : { + "description" : "The request has failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Error" + } + }, + "application/problem+json" : { + "schema" : { + "$ref" : "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/2/notes/search/posts_eligible_for_notes" : { + "get" : { + "security" : [ + { + "OAuth2UserToken" : [ + "tweet.read" + ] + }, + { + "UserToken" : [ ] + } + ], + "tags" : [ + "Community Notes" + ], + "summary" : "Search for Posts Eligible for Community Notes", + "description" : "Returns all the posts that are eligible for community notes.", + "externalDocs" : { + "url" : "https://docs.x.com/x-api/community-notes/search-for-posts-eligible-for-community-notes" + }, + "operationId" : "searchForEligiblePosts", + "parameters" : [ + { + "name" : "test_mode", + "in" : "query", + "description" : "If true, return a list of posts that are for the test. If false, return a list of posts that the bots can write proposed notes on the product.", + "required" : true, + "schema" : { + "type" : "boolean" + }, + "style" : "form" + }, + { + "name" : "pagination_token", + "in" : "query", + "description" : "Pagination token to get next set of posts eligible for notes.", + "required" : false, + "schema" : { + "type" : "string" + }, + "style" : "form" + }, + { + "name" : "max_results", + "in" : "query", + "description" : "Max results to return.", + "required" : false, + "schema" : { + "type" : "integer", + "minimum" : 1, + "maximum" : 100, + "format" : "int32", + "default" : 10 + }, + "style" : "form" + }, + { + "$ref" : "#/components/parameters/TweetFieldsParameter" + }, + { + "$ref" : "#/components/parameters/TweetExpansionsParameter" + }, + { + "$ref" : "#/components/parameters/MediaFieldsParameter" + }, + { + "$ref" : "#/components/parameters/PollFieldsParameter" + }, + { + "$ref" : "#/components/parameters/UserFieldsParameter" + }, + { + "$ref" : "#/components/parameters/PlaceFieldsParameter" + } + ], + "responses" : { + "200" : { + "description" : "The request has succeeded.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Get2NotesSearchPostsEligibleForNotesResponse" + } + } + } + }, + "default" : { + "description" : "The request has failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Error" + } + }, + "application/problem+json" : { + "schema" : { + "$ref" : "#/components/schemas/Problem" + } + } + } + } + } + } + }, + "/2/notes/{id}" : { + "delete" : { + "security" : [ + { + "OAuth2UserToken" : [ + "tweet.write" + ] + }, + { + "UserToken" : [ ] + } + ], + "tags" : [ + "Community Notes" + ], + "summary" : "Delete a Community Note", + "description" : "Deletes a community note.", + "externalDocs" : { + "url" : "https://communitynotes.x.com/guide/api/overview" + }, + "operationId" : "deleteNotes", + "parameters" : [ + { + "name" : "id", + "in" : "path", + "description" : "The community note id to delete.", + "required" : true, + "schema" : { + "$ref" : "#/components/schemas/NoteId" + }, + "style" : "simple" + } + ], + "responses" : { + "200" : { + "description" : "The request has succeeded.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/CreateNoteResponse" + } + } + } + }, + "default" : { + "description" : "The request has failed.", + "content" : { + "application/json" : { + "schema" : { + "$ref" : "#/components/schemas/Error" + } + }, + "application/problem+json" : { + "schema" : { + "$ref" : "#/components/schemas/Problem" + } + } + } + } + } + } + }, "/2/openapi.json" : { "get" : { "tags" : [ "General" ], - "summary" : "Returns the OpenAPI Specification document.", - "description" : "Full OpenAPI Specification in JSON format. (See https://github.com/OAI/OpenAPI-Specification/blob/master/README.md)", + "summary" : "Get OpenAPI Spec.", + "description" : "Retrieves the full OpenAPI Specification in JSON format. (See https://github.com/OAI/OpenAPI-Specification/blob/master/README.md)", "operationId" : "getOpenApiSpec", "parameters" : [ ], "responses" : { @@ -3647,12 +3965,12 @@ "tags" : [ "Spaces" ], - "summary" : "Space lookup up Space IDs", - "description" : "Returns a variety of information about the Spaces specified by the requested IDs", + "summary" : "Get Spaces by IDs", + "description" : "Retrieves details of multiple Spaces by their IDs.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/spaces/lookup/api-reference/get-spaces" }, - "operationId" : "findSpacesByIds", + "operationId" : "getSpacesByIds", "parameters" : [ { "name" : "ids", @@ -3731,12 +4049,12 @@ "tags" : [ "Spaces" ], - "summary" : "Space lookup by their creators", - "description" : "Returns a variety of information about the Spaces created by the provided User IDs", + "summary" : "Get Spaces by creator IDs", + "description" : "Retrieves details of Spaces created by specified User IDs.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/spaces/lookup/api-reference/get-spaces-by-creator-ids" }, - "operationId" : "findSpacesByCreatorIds", + "operationId" : "getSpacesByCreatorIds", "parameters" : [ { "name" : "user_ids", @@ -3812,8 +4130,8 @@ "tags" : [ "Spaces" ], - "summary" : "Search for Spaces", - "description" : "Returns Spaces that match the provided query.", + "summary" : "Search Spaces", + "description" : "Retrieves a list of Spaces matching the specified search query.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/spaces/search/api-reference/get-spaces-search" }, @@ -3922,12 +4240,12 @@ "tags" : [ "Spaces" ], - "summary" : "Space lookup by Space ID", - "description" : "Returns a variety of information about the Space specified by the requested ID", + "summary" : "Get space by ID", + "description" : "Retrieves details of a specific space by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/spaces/lookup/api-reference/get-spaces-id" }, - "operationId" : "findSpaceById", + "operationId" : "getSpacesById", "parameters" : [ { "name" : "id", @@ -4000,12 +4318,12 @@ "Spaces", "Tweets" ], - "summary" : "Retrieve the list of Users who purchased a ticket to the given space", - "description" : "Retrieves the list of Users who purchased a ticket to the given space", + "summary" : "Get Space ticket buyers", + "description" : "Retrieves a list of Users who purchased tickets to a specific Space by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/spaces/lookup/api-reference/get-spaces-id-buyers" }, - "operationId" : "spaceBuyers", + "operationId" : "getSpacesBuyers", "parameters" : [ { "name" : "id", @@ -4102,12 +4420,12 @@ "Spaces", "Tweets" ], - "summary" : "Retrieve Posts from a Space.", - "description" : "Retrieves Posts shared in the specified Space.", + "summary" : "Get Space Posts", + "description" : "Retrieves a list of Posts shared in a specific Space by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/spaces/lookup/api-reference/get-spaces-id-tweets" }, - "operationId" : "spaceTweets", + "operationId" : "getSpacesPosts", "parameters" : [ { "name" : "id", @@ -4196,12 +4514,12 @@ "tags" : [ "Trends" ], - "summary" : "Trends", - "description" : "Returns the Trend associated with the supplied WoeId.", + "summary" : "Get Trends by WOEID", + "description" : "Retrieves trending topics for a specific location identified by its WOEID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/trends/api-reference/get-trends-by-woeid" }, - "operationId" : "getTrends", + "operationId" : "getTrendsByWoeid", "parameters" : [ { "name" : "woeid", @@ -4281,12 +4599,12 @@ "tags" : [ "Tweets" ], - "summary" : "Post lookup by Post IDs", - "description" : "Returns a variety of information about the Post specified by the requested ID.", + "summary" : "Get Posts by IDs", + "description" : "Retrieves details of multiple Posts by their IDs.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/lookup/api-reference/get-tweets" }, - "operationId" : "findTweetsById", + "operationId" : "getPostsByIds", "parameters" : [ { "name" : "ids", @@ -4367,12 +4685,12 @@ "tags" : [ "Tweets" ], - "summary" : "Creation of a Post", - "description" : "Causes the User to create a Post under the authorized account.", + "summary" : "Create Post", + "description" : "Creates a new Post for the authenticated user.", "externalDocs" : { "url" : "https://developer.x.com/en/docs/twitter-api/tweets/manage-tweets/api-reference/post-tweets" }, - "operationId" : "createTweet", + "operationId" : "createPosts", "parameters" : [ ], "requestBody" : { "content" : { @@ -4429,9 +4747,9 @@ "tags" : [ "Tweets" ], - "summary" : "Analytics of posts", - "description" : "Returns analytics of posts.", - "operationId" : "postAnalytics2", + "summary" : "Get Post analytics", + "description" : "Retrieves analytics data for specified Posts within a defined time range.", + "operationId" : "getPostsAnalytics", "parameters" : [ { "name" : "ids", @@ -4531,11 +4849,12 @@ } ], "tags" : [ + "Stream", "Compliance" ], - "summary" : "Posts Compliance stream", - "description" : "Streams 100% of compliance data for Posts", - "operationId" : "getTweetsComplianceStream", + "summary" : "Stream Posts compliance data", + "description" : "Streams all compliance data related to Posts.", + "operationId" : "streamPostsCompliance", "parameters" : [ { "name" : "backfill_minutes", @@ -4628,12 +4947,12 @@ "tags" : [ "Tweets" ], - "summary" : "Full archive search counts", - "description" : "Returns Post Counts that match a search query.", + "summary" : "Get count of all Posts", + "description" : "Retrieves the count of Posts matching a search query from the full archive.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/search/api-reference/get-tweets-search-all" }, - "operationId" : "tweetCountsFullArchiveSearch", + "operationId" : "getPostsCountsAll", "parameters" : [ { "name" : "query", @@ -4769,12 +5088,12 @@ "tags" : [ "Tweets" ], - "summary" : "Recent search counts", - "description" : "Returns Post Counts from the last 7 days that match a search query.", + "summary" : "Get count of recent Posts", + "description" : "Retrieves the count of Posts from the last 7 days matching a search query.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/counts/api-reference/get-tweets-counts-recent" }, - "operationId" : "tweetCountsRecentSearch", + "operationId" : "getPostsCountsRecent", "parameters" : [ { "name" : "query", @@ -4908,11 +5227,12 @@ } ], "tags" : [ + "Stream", "Tweets" ], - "summary" : "Firehose stream", - "description" : "Streams 100% of public Posts.", - "operationId" : "getTweetsFirehoseStream", + "summary" : "Stream all Posts", + "description" : "Streams all public Posts in real-time.", + "operationId" : "streamPostsFirehose", "parameters" : [ { "name" : "backfill_minutes", @@ -5021,11 +5341,12 @@ } ], "tags" : [ + "Stream", "Tweets" ], - "summary" : "English Language Firehose stream", - "description" : "Streams 100% of English Language public Posts.", - "operationId" : "getTweetsFirehoseStreamLangEn", + "summary" : "Stream English Posts", + "description" : "Streams all public English-language Posts in real-time.", + "operationId" : "streamPostsFirehoseEn", "parameters" : [ { "name" : "backfill_minutes", @@ -5134,11 +5455,12 @@ } ], "tags" : [ + "Stream", "Tweets" ], - "summary" : "Japanese Language Firehose stream", - "description" : "Streams 100% of Japanese Language public Posts.", - "operationId" : "getTweetsFirehoseStreamLangJa", + "summary" : "Stream Japanese Posts", + "description" : "Streams all public Japanese-language Posts in real-time.", + "operationId" : "streamPostsFirehoseJa", "parameters" : [ { "name" : "backfill_minutes", @@ -5247,11 +5569,12 @@ } ], "tags" : [ + "Stream", "Tweets" ], - "summary" : "Korean Language Firehose stream", - "description" : "Streams 100% of Korean Language public Posts.", - "operationId" : "getTweetsFirehoseStreamLangKo", + "summary" : "Stream Korean Posts", + "description" : "Streams all public Korean-language Posts in real-time.", + "operationId" : "streamPostsFirehoseKo", "parameters" : [ { "name" : "backfill_minutes", @@ -5360,11 +5683,12 @@ } ], "tags" : [ + "Stream", "Tweets" ], - "summary" : "Portuguese Language Firehose stream", - "description" : "Streams 100% of Portuguese Language public Posts.", - "operationId" : "getTweetsFirehoseStreamLangPt", + "summary" : "Stream Portuguese Posts", + "description" : "Streams all public Portuguese-language Posts in real-time.", + "operationId" : "streamPostsFirehosePt", "parameters" : [ { "name" : "backfill_minutes", @@ -5473,11 +5797,12 @@ } ], "tags" : [ + "Stream", "Compliance" ], - "summary" : "Posts Label stream", - "description" : "Streams 100% of labeling events applied to Posts", - "operationId" : "getTweetsLabelStream", + "summary" : "Stream Post labels", + "description" : "Streams all labeling events applied to Posts.", + "operationId" : "streamLabelsCompliance", "parameters" : [ { "name" : "backfill_minutes", @@ -5555,14 +5880,15 @@ } ], "tags" : [ + "Stream", "Tweets" ], - "summary" : "Sample stream", - "description" : "Streams a deterministic 1% of public Posts.", + "summary" : "Stream sampled Posts", + "description" : "Streams a 1% sample of public Posts in real-time.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/volume-streams/api-reference/get-tweets-sample-stream" }, - "operationId" : "sampleStream", + "operationId" : "streamPostsSample", "parameters" : [ { "name" : "backfill_minutes", @@ -5634,11 +5960,12 @@ } ], "tags" : [ + "Stream", "Tweets" ], - "summary" : "Sample 10% stream", - "description" : "Streams a deterministic 10% of public Posts.", - "operationId" : "getTweetsSample10Stream", + "summary" : "Stream 10% sampled Posts", + "description" : "Streams a 10% sample of public Posts in real-time.", + "operationId" : "streamPostsSample10", "parameters" : [ { "name" : "backfill_minutes", @@ -5749,12 +6076,12 @@ "tags" : [ "Tweets" ], - "summary" : "Full-archive search", - "description" : "Returns Posts that match a search query.", + "summary" : "Search all Posts", + "description" : "Retrieves Posts from the full archive matching a search query.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/search/api-reference/get-tweets-search-all" }, - "operationId" : "tweetsFullarchiveSearch", + "operationId" : "searchPostsAll", "parameters" : [ { "name" : "query", @@ -5926,12 +6253,12 @@ "tags" : [ "Tweets" ], - "summary" : "Recent search", - "description" : "Returns Posts from the last 7 days that match a search query.", + "summary" : "Search recent Posts", + "description" : "Retrieves Posts from the last 7 days matching a search query.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/search/api-reference/get-tweets-search-recent" }, - "operationId" : "tweetsRecentSearch", + "operationId" : "searchPostsRecent", "parameters" : [ { "name" : "query", @@ -6092,14 +6419,15 @@ } ], "tags" : [ + "Stream", "Tweets" ], - "summary" : "Filtered stream", - "description" : "Streams Posts matching the stream's active rule set.", + "summary" : "Stream filtered Posts", + "description" : "Streams Posts in real-time matching the active rule set.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/filtered-stream/api-reference/get-tweets-search-stream" }, - "operationId" : "searchStream", + "operationId" : "streamPosts", "parameters" : [ { "name" : "backfill_minutes", @@ -6195,10 +6523,11 @@ } ], "tags" : [ + "Stream", "Tweets" ], - "summary" : "Rules lookup", - "description" : "Returns rules from a User's active rule set. Users can fetch all of their rules or a subset, specified by the provided rule ids.", + "summary" : "Get stream rules", + "description" : "Retrieves the active rule set or a subset of rules for the filtered stream.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/filtered-stream/api-reference/get-tweets-search-stream-rules" }, @@ -6279,14 +6608,15 @@ } ], "tags" : [ + "Stream", "Tweets" ], - "summary" : "Add/Delete rules", - "description" : "Add or delete rules from a User's active rule set. Users can provide unique, optionally tagged rules to add. Users can delete their entire rule set or a subset specified by rule ids or values.", + "summary" : "Update stream rules", + "description" : "Adds or deletes rules from the active rule set for the filtered stream.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/filtered-stream/api-reference/post-tweets-search-stream-rules" }, - "operationId" : "addOrDeleteRules", + "operationId" : "updateRules", "parameters" : [ { "name" : "dry_run", @@ -6356,14 +6686,15 @@ } ], "tags" : [ - "General" + "Stream", + "Tweets" ], - "summary" : "Rules Count", - "description" : "Returns the counts of rules from a User's active rule set, to reflect usage by project and application.", + "summary" : "Get stream rule counts", + "description" : "Retrieves the count of rules in the active rule set for the filtered stream.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/filtered-stream/api-reference/get-tweets-search-stream-rules-counts" }, - "operationId" : "getRuleCount", + "operationId" : "getRuleCounts", "parameters" : [ { "$ref" : "#/components/parameters/RulesCountFieldsParameter" @@ -6415,12 +6746,12 @@ "tags" : [ "Tweets" ], - "summary" : "Post delete by Post ID", - "description" : "Delete specified Post (in the path) by ID.", + "summary" : "Delete Post", + "description" : "Deletes a specific Post by its ID, if owned by the authenticated user.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/manage-tweets/api-reference/delete-tweets-id" }, - "operationId" : "deleteTweetById", + "operationId" : "deletePosts", "parameters" : [ { "name" : "id", @@ -6479,12 +6810,12 @@ "tags" : [ "Tweets" ], - "summary" : "Post lookup by Post ID", - "description" : "Returns a variety of information about the Post specified by the requested ID.", + "summary" : "Get Post by ID", + "description" : "Retrieves details of a specific Post by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/lookup/api-reference/get-tweets-id" }, - "operationId" : "findTweetById", + "operationId" : "getPostsById", "parameters" : [ { "name" : "id", @@ -6561,12 +6892,12 @@ "tags" : [ "Users" ], - "summary" : "Returns User objects that have liked the provided Post ID", - "description" : "Returns a list of Users that have liked the provided Post ID", + "summary" : "Get Liking Users", + "description" : "Retrieves a list of Users who liked a specific Post by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/likes/api-reference/get-tweets-id-liking_users" }, - "operationId" : "tweetsIdLikingUsers", + "operationId" : "getPostsLikingUsers", "parameters" : [ { "name" : "id", @@ -6660,12 +6991,12 @@ "tags" : [ "Tweets" ], - "summary" : "Retrieve Posts that quote a Post.", - "description" : "Returns a variety of information about each Post that quotes the Post specified by the requested ID.", + "summary" : "Get Quoted Posts", + "description" : "Retrieves a list of Posts that quote a specific Post by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/quote-tweets/api-reference/get-tweets-id-quote_tweets" }, - "operationId" : "findTweetsThatQuoteATweet", + "operationId" : "getPostsQuotedPosts", "parameters" : [ { "name" : "id", @@ -6792,12 +7123,12 @@ "tags" : [ "Users" ], - "summary" : "Returns User objects that have retweeted the provided Post ID", - "description" : "Returns a list of Users that have retweeted the provided Post ID", + "summary" : "Get Reposted by", + "description" : "Retrieves a list of Users who reposted a specific Post by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/retweets/api-reference/get-tweets-id-retweeted_by" }, - "operationId" : "tweetsIdRetweetingUsers", + "operationId" : "getPostsRepostedBy", "parameters" : [ { "name" : "id", @@ -6891,12 +7222,12 @@ "tags" : [ "Tweets" ], - "summary" : "Retrieve Posts that repost a Post.", - "description" : "Returns a variety of information about each Post that has retweeted the Post specified by the requested ID.", + "summary" : "Get Reposts", + "description" : "Retrieves a list of Posts that repost a specific Post by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/retweets/api-reference/get-tweets-id-retweets" }, - "operationId" : "findTweetsThatRetweetATweet", + "operationId" : "getPostsReposts", "parameters" : [ { "name" : "id", @@ -6997,12 +7328,12 @@ "tags" : [ "Tweets" ], - "summary" : "Hide replies", - "description" : "Hides or unhides a reply to an owned conversation.", + "summary" : "Hide reply", + "description" : "Hides or unhides a reply to a conversation owned by the authenticated user.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/hide-replies/api-reference/put-tweets-id-hidden" }, - "operationId" : "hideReplyById", + "operationId" : "hidePostsReply", "parameters" : [ { "name" : "tweet_id", @@ -7063,12 +7394,12 @@ "tags" : [ "Usage" ], - "summary" : "Post Usage", - "description" : "Returns the Post Usage.", + "summary" : "Get usage", + "description" : "Retrieves usage statistics for Posts over a specified number of days.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/usage/tweets/api-reference/get-usage-tweets" }, - "operationId" : "getUsageTweets", + "operationId" : "getUsage", "parameters" : [ { "name" : "days", @@ -7136,12 +7467,12 @@ "tags" : [ "Users" ], - "summary" : "User lookup by IDs", - "description" : "This endpoint returns information about Users. Specify Users by their ID.", + "summary" : "Get Users by IDs", + "description" : "Retrieves details of multiple Users by their IDs.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users" }, - "operationId" : "findUsersById", + "operationId" : "getUsersByIds", "parameters" : [ { "name" : "ids", @@ -7218,12 +7549,12 @@ "tags" : [ "Users" ], - "summary" : "User lookup by usernames", - "description" : "This endpoint returns information about Users. Specify Users by their username.", + "summary" : "Get Users by usernames", + "description" : "Retrieves details of multiple Users by their usernames.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-by" }, - "operationId" : "findUsersByUsername", + "operationId" : "getUsersByUsernames", "parameters" : [ { "name" : "usernames", @@ -7302,12 +7633,12 @@ "tags" : [ "Users" ], - "summary" : "User lookup by username", - "description" : "This endpoint returns information about a User. Specify User by username.", + "summary" : "Get User by username", + "description" : "Retrieves details of a specific User by their username.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-by-username-username" }, - "operationId" : "findUserByUsername", + "operationId" : "getUsersByUsername", "parameters" : [ { "name" : "username", @@ -7368,11 +7699,12 @@ } ], "tags" : [ + "Stream", "Compliance" ], - "summary" : "Users Compliance stream", - "description" : "Streams 100% of compliance data for Users", - "operationId" : "getUsersComplianceStream", + "summary" : "Stream Users compliance data", + "description" : "Streams all compliance data related to Users.", + "operationId" : "streamUsersCompliance", "parameters" : [ { "name" : "backfill_minutes", @@ -7471,12 +7803,12 @@ "tags" : [ "Users" ], - "summary" : "User lookup me", - "description" : "This endpoint returns information about the requesting User.", + "summary" : "Get my User", + "description" : "Retrieves details of the authenticated user.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-me" }, - "operationId" : "findMyUser", + "operationId" : "getMyUser", "parameters" : [ { "$ref" : "#/components/parameters/UserFieldsParameter" @@ -7534,11 +7866,11 @@ "Trends" ], "summary" : "Get personalized Trends", - "description" : "Returns Personalized trends for the authenticated user", + "description" : "Retrieves personalized trending topics for the authenticated user.", "externalDocs" : { "url" : "https://developer.x.com/" }, - "operationId" : "personalizedTrends", + "operationId" : "getUsersPersonalizedTrends", "parameters" : [ { "$ref" : "#/components/parameters/PersonalizedTrendFieldsParameter" @@ -7589,9 +7921,9 @@ "tags" : [ "Users" ], - "summary" : "Returns repost of user", - "description" : "This endpoint returns reposts of the requesting User.", - "operationId" : "listOfRepostOfUser", + "summary" : "Get Reposts of me", + "description" : "Retrieves a list of Posts that repost content from the authenticated user.", + "operationId" : "getUsersRepostsOfMe", "parameters" : [ { "name" : "max_results", @@ -7681,12 +8013,12 @@ "tags" : [ "Users" ], - "summary" : "User search", - "description" : "Returns Users that match a search query.", + "summary" : "Search Users", + "description" : "Retrieves a list of Users matching a search query.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-search" }, - "operationId" : "searchUserByQuery", + "operationId" : "searchUsers", "parameters" : [ { "name" : "query", @@ -7781,12 +8113,12 @@ "tags" : [ "Users" ], - "summary" : "User lookup by ID", - "description" : "This endpoint returns information about a User. Specify User by ID.", + "summary" : "Get User by ID", + "description" : "Retrieves details of a specific User by their ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-id" }, - "operationId" : "findUserById", + "operationId" : "getUsersById", "parameters" : [ { "name" : "id", @@ -7855,12 +8187,12 @@ "tags" : [ "Users" ], - "summary" : "Returns User objects that are blocked by provided User ID", - "description" : "Returns a list of Users that are blocked by the provided User ID", + "summary" : "Get blocking", + "description" : "Retrieves a list of Users blocked by the specified User ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/blocks/api-reference/get-users-blocking" }, - "operationId" : "usersIdBlocking", + "operationId" : "getUsersBlocking", "parameters" : [ { "name" : "id", @@ -7948,12 +8280,12 @@ "tags" : [ "Bookmarks" ], - "summary" : "Bookmarks by User", - "description" : "Returns Post objects that have been bookmarked by the requesting User", + "summary" : "Get Bookmarks", + "description" : "Retrieves a list of Posts bookmarked by the authenticated user.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/bookmarks/api-reference/get-users-id-bookmarks" }, - "operationId" : "getUsersIdBookmarks", + "operationId" : "getUsersBookmarks", "parameters" : [ { "name" : "id", @@ -8048,12 +8380,12 @@ "tags" : [ "Bookmarks" ], - "summary" : "Add Post to Bookmarks", - "description" : "Adds a Post (ID in the body) to the requesting User's (in the path) bookmarks", + "summary" : "Create Bookmark", + "description" : "Adds a post to the authenticated user’s bookmarks.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/bookmarks/api-reference/post-users-id-bookmarks" }, - "operationId" : "postUsersIdBookmarks", + "operationId" : "createUsersBookmark", "parameters" : [ { "name" : "id", @@ -8118,12 +8450,12 @@ "tags" : [ "Bookmarks" ], - "summary" : "Bookmark folders by User", - "description" : "Returns metadata about Bookmark folders that have been created by the requesting User", + "summary" : "Get Bookmark folders", + "description" : "Retrieves a list of Bookmark folders created by the authenticated user.", "externalDocs" : { "url" : "https://developer.x.com" }, - "operationId" : "getUsersIdBookmarkFolders", + "operationId" : "getUsersBookmarkFolders", "parameters" : [ { "name" : "id", @@ -8202,12 +8534,12 @@ "tags" : [ "Bookmarks" ], - "summary" : "Bookmark Folder Posts by User and Folder id", - "description" : "Returns posts belonging to input bookmarks folder id that have been created by the requesting User", + "summary" : "Get Bookmarks by folder ID", + "description" : "Retrieves Posts in a specific Bookmark folder by its ID for the authenticated user.", "externalDocs" : { "url" : "https://developer.x.com" }, - "operationId" : "getUsersIdBookmarkFolderPosts", + "operationId" : "getUsersBookmarksByFolderId", "parameters" : [ { "name" : "id", @@ -8273,12 +8605,12 @@ "tags" : [ "Bookmarks" ], - "summary" : "Remove a bookmarked Post", - "description" : "Removes a Post from the requesting User's bookmarked Posts.", + "summary" : "Delete Bookmark", + "description" : "Removes a Post from the authenticated user’s Bookmarks by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/bookmarks/api-reference/delete-users-id-bookmarks-tweet_id" }, - "operationId" : "usersIdBookmarksDelete", + "operationId" : "deleteUsersBookmark", "parameters" : [ { "name" : "id", @@ -8347,12 +8679,12 @@ "tags" : [ "Users" ], - "summary" : "Causes DMs to/from the target User (in the path) to be blocked by the authenticated request user", - "description" : "Causes DMs to/from the target User (in the path) to be blocked by the authenticated request user", + "summary" : "Block DMs", + "description" : "Blocks direct messages to or from a specific User by their ID for the authenticated user.", "externalDocs" : { "url" : "https://developer.x.com/" }, - "operationId" : "usersIdDMBlock", + "operationId" : "blockUsersDms", "parameters" : [ { "name" : "id", @@ -8411,12 +8743,12 @@ "tags" : [ "Users" ], - "summary" : "Causes DMs to/from the target User (in the path) to be unblocked by the authenticated request user", - "description" : "Causes DMs to/from the target User (in the path) to be unblocked by the authenticated request user", + "summary" : "Unblock DMs", + "description" : "Unblocks direct messages to or from a specific User by their ID for the authenticated user.", "externalDocs" : { "url" : "https://developer.x.com/" }, - "operationId" : "usersIdDMUnBlock", + "operationId" : "unblockUsersDms", "parameters" : [ { "name" : "id", @@ -8478,12 +8810,12 @@ "tags" : [ "Lists" ], - "summary" : "Get User's Followed Lists", - "description" : "Returns a User's followed Lists.", + "summary" : "Get followed Lists", + "description" : "Retrieves a list of Lists followed by a specific User by their ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/list-follows/api-reference/get-users-id-followed_lists" }, - "operationId" : "userFollowedLists", + "operationId" : "getUsersFollowedLists", "parameters" : [ { "name" : "id", @@ -8574,12 +8906,12 @@ "tags" : [ "Lists" ], - "summary" : "Follow a List", - "description" : "Causes a User to follow a List.", + "summary" : "Follow List", + "description" : "Causes the authenticated user to follow a specific List by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/list-follows/api-reference/post-users-id-followed-lists" }, - "operationId" : "listUserFollow", + "operationId" : "followList", "parameters" : [ { "name" : "id", @@ -8647,12 +8979,12 @@ "tags" : [ "Lists" ], - "summary" : "Unfollow a List", - "description" : "Causes a User to unfollow a List.", + "summary" : "Unfollow List", + "description" : "Causes the authenticated user to unfollow a specific List by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/list-follows/api-reference/delete-users-id-followed-lists-list_id" }, - "operationId" : "listUserUnfollow", + "operationId" : "unfollowList", "parameters" : [ { "name" : "id", @@ -8724,12 +9056,12 @@ "tags" : [ "Users" ], - "summary" : "Followers by User ID", - "description" : "Returns a list of Users who are followers of the specified User ID.", + "summary" : "Get followers", + "description" : "Retrieves a list of Users who follow a specific User by their ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/follows/api-reference/get-users-id-followers" }, - "operationId" : "usersIdFollowers", + "operationId" : "getUsersFollowers", "parameters" : [ { "name" : "id", @@ -8824,12 +9156,12 @@ "tags" : [ "Users" ], - "summary" : "Following by User ID", - "description" : "Returns a list of Users that are being followed by the provided User ID", + "summary" : "Get following", + "description" : "Retrieves a list of Users followed by a specific User by their ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/follows/api-reference/get-users-id-following" }, - "operationId" : "usersIdFollowing", + "operationId" : "getUsersFollowing", "parameters" : [ { "name" : "id", @@ -8920,11 +9252,11 @@ "Users" ], "summary" : "Follow User", - "description" : "Causes the User(in the path) to follow, or “request to follow” for protected Users, the target User. The User(in the path) must match the User context authorizing the request", + "description" : "Causes the authenticated user to follow a specific user by their ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/follows/api-reference/post-users-source_user_id-following" }, - "operationId" : "usersIdFollow", + "operationId" : "followUser", "parameters" : [ { "name" : "id", @@ -8992,12 +9324,12 @@ "tags" : [ "Tweets" ], - "summary" : "Returns Post objects liked by the provided User ID", - "description" : "Returns a list of Posts liked by the provided User ID", + "summary" : "Get liked Posts", + "description" : "Retrieves a list of Posts liked by a specific User by their ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/likes/api-reference/get-users-id-liked_tweets" }, - "operationId" : "usersIdLikedTweets", + "operationId" : "getUsersLikedPosts", "parameters" : [ { "name" : "id", @@ -9098,12 +9430,12 @@ "tags" : [ "Tweets" ], - "summary" : "Causes the User (in the path) to like the specified Post", - "description" : "Causes the User (in the path) to like the specified Post. The User in the path must match the User context authorizing the request.", + "summary" : "Like Post", + "description" : "Causes the authenticated user to Like a specific Post by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/likes/api-reference/post-users-id-likes" }, - "operationId" : "usersIdLike", + "operationId" : "likePost", "parameters" : [ { "name" : "id", @@ -9171,12 +9503,12 @@ "tags" : [ "Tweets" ], - "summary" : "Causes the User (in the path) to unlike the specified Post", - "description" : "Causes the User (in the path) to unlike the specified Post. The User must match the User context authorizing the request", + "summary" : "Unlike Post", + "description" : "Causes the authenticated user to Unlike a specific Post by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/likes/api-reference/delete-users-id-likes-tweet_id" }, - "operationId" : "usersIdUnlike", + "operationId" : "unlikePost", "parameters" : [ { "name" : "id", @@ -9248,12 +9580,12 @@ "tags" : [ "Lists" ], - "summary" : "Get a User's List Memberships", - "description" : "Get a User's List Memberships.", + "summary" : "Get List memberships", + "description" : "Retrieves a list of Lists that a specific User is a member of by their ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/list-members/api-reference/get-users-id-list_memberships" }, - "operationId" : "getUserListMemberships", + "operationId" : "getUsersListMemberships", "parameters" : [ { "name" : "id", @@ -9348,12 +9680,12 @@ "tags" : [ "Tweets" ], - "summary" : "User mention timeline by User ID", - "description" : "Returns Post objects that mention username associated to the provided User ID", + "summary" : "Get mentions", + "description" : "Retrieves a list of Posts that mention a specific User by their ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/timelines/api-reference/get-users-id-mentions" }, - "operationId" : "usersIdMentions", + "operationId" : "getUsersMentions", "parameters" : [ { "name" : "id", @@ -9499,12 +9831,12 @@ "tags" : [ "Users" ], - "summary" : "Returns User objects that are muted by the provided User ID", - "description" : "Returns a list of Users that are muted by the provided User ID", + "summary" : "Get muting", + "description" : "Retrieves a list of Users muted by the authenticated user.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/mutes/api-reference/get-users-muting" }, - "operationId" : "usersIdMuting", + "operationId" : "getUsersMuting", "parameters" : [ { "name" : "id", @@ -9594,12 +9926,12 @@ "tags" : [ "Users" ], - "summary" : "Mute User by User ID.", - "description" : "Causes the User (in the path) to mute the target User. The User (in the path) must match the User context authorizing the request.", + "summary" : "Mute User", + "description" : "Causes the authenticated user to mute a specific User by their ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/mutes/api-reference/post-users-user_id-muting" }, - "operationId" : "usersIdMute", + "operationId" : "muteUser", "parameters" : [ { "name" : "id", @@ -9670,12 +10002,12 @@ "tags" : [ "Lists" ], - "summary" : "Get a User's Owned Lists.", - "description" : "Get a User's Owned Lists.", + "summary" : "Get owned Lists", + "description" : "Retrieves a list of Lists owned by a specific User by their ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/list-lookup/api-reference/get-users-id-owned_lists" }, - "operationId" : "listUserOwnedLists", + "operationId" : "getUsersOwnedLists", "parameters" : [ { "name" : "id", @@ -9768,12 +10100,12 @@ "tags" : [ "Lists" ], - "summary" : "Get a User's Pinned Lists", - "description" : "Get a User's Pinned Lists.", + "summary" : "Get pinned Lists", + "description" : "Retrieves a list of Lists pinned by the authenticated user.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/pinned-lists/api-reference/get-users-id-pinned_lists" }, - "operationId" : "listUserPinnedLists", + "operationId" : "getUsersPinnedLists", "parameters" : [ { "name" : "id", @@ -9839,12 +10171,12 @@ "tags" : [ "Lists" ], - "summary" : "Pin a List", - "description" : "Causes a User to pin a List.", + "summary" : "Pin List", + "description" : "Causes the authenticated user to pin a specific List by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/pinned-lists/api-reference/post-users-id-pinned-lists" }, - "operationId" : "listUserPin", + "operationId" : "pinList", "parameters" : [ { "name" : "id", @@ -9913,12 +10245,12 @@ "tags" : [ "Lists" ], - "summary" : "Unpin a List", - "description" : "Causes a User to remove a pinned List.", + "summary" : "Unpin List", + "description" : "Causes the authenticated user to unpin a specific List by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/lists/pinned-lists/api-reference/delete-users-id-pinned-lists-list_id" }, - "operationId" : "listUserUnpin", + "operationId" : "unpinList", "parameters" : [ { "name" : "id", @@ -9987,12 +10319,12 @@ "tags" : [ "Tweets" ], - "summary" : "Causes the User (in the path) to repost the specified Post.", - "description" : "Causes the User (in the path) to repost the specified Post. The User in the path must match the User context authorizing the request.", + "summary" : "Repost Post", + "description" : "Causes the authenticated user to repost a specific Post by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/retweets/api-reference/post-users-id-retweets" }, - "operationId" : "usersIdRetweets", + "operationId" : "repostPost", "parameters" : [ { "name" : "id", @@ -10060,12 +10392,12 @@ "tags" : [ "Tweets" ], - "summary" : "Causes the User (in the path) to unretweet the specified Post", - "description" : "Causes the User (in the path) to unretweet the specified Post. The User must match the User context authorizing the request", + "summary" : "Unrepost Post", + "description" : "Causes the authenticated user to unrepost a specific Post by its ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/retweets/api-reference/delete-users-id-retweets-tweet_id" }, - "operationId" : "usersIdUnretweets", + "operationId" : "unrepostPost", "parameters" : [ { "name" : "id", @@ -10133,12 +10465,12 @@ "tags" : [ "Tweets" ], - "summary" : "User home timeline by User ID", - "description" : "Returns Post objects that appears in the provided User ID's home timeline", + "summary" : "Get Timeline", + "description" : "Retrieves a reverse chronological list of Posts in the authenticated User’s Timeline.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/timelines/api-reference/get-users-id-reverse-chronological" }, - "operationId" : "usersIdTimeline", + "operationId" : "getUsersTimeline", "parameters" : [ { "name" : "id", @@ -10309,12 +10641,12 @@ "tags" : [ "Tweets" ], - "summary" : "User Posts timeline by User ID", - "description" : "Returns a list of Posts authored by the provided User ID", + "summary" : "Get Posts", + "description" : "Retrieves a list of posts authored by a specific User by their ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/tweets/timelines/api-reference/get-users-id-tweets" }, - "operationId" : "usersIdTweets", + "operationId" : "getUsersPosts", "parameters" : [ { "name" : "id", @@ -10486,11 +10818,11 @@ "Users" ], "summary" : "Unfollow User", - "description" : "Causes the source User to unfollow the target User. The source User must match the User context authorizing the request", + "description" : "Causes the authenticated user to unfollow a specific user by their ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/follows/api-reference/delete-users-source_id-following" }, - "operationId" : "usersIdUnfollow", + "operationId" : "unfollowUser", "parameters" : [ { "name" : "source_user_id", @@ -10559,12 +10891,12 @@ "tags" : [ "Users" ], - "summary" : "Unmute User by User ID", - "description" : "Causes the source User to unmute the target User. The source User must match the User context authorizing the request", + "summary" : "Unmute User", + "description" : "Causes the authenticated user to unmute a specific user by their ID.", "externalDocs" : { "url" : "https://developer.twitter.com/en/docs/twitter-api/users/mutes/api-reference/delete-users-user_id-muting" }, - "operationId" : "usersIdUnmute", + "operationId" : "unmuteUser", "parameters" : [ { "name" : "source_user_id", @@ -10626,12 +10958,12 @@ "tags" : [ "Webhooks" ], - "summary" : "Get a list of webhook configs associated with a client app", + "summary" : "Get webhook", "description" : "Get a list of webhook configs associated with a client app.", "externalDocs" : { "url" : "https://docs.x.com/x-api/webhooks/introduction" }, - "operationId" : "getWebhooksConfig", + "operationId" : "getWebhooks", "parameters" : [ { "$ref" : "#/components/parameters/WebhookConfigFieldsParameter" @@ -10677,12 +11009,12 @@ "tags" : [ "Webhooks" ], - "summary" : "Create Webhook Config", - "description" : "Creates a new webhook config.", + "summary" : "Create webhook", + "description" : "Creates a new webhook configuration.", "externalDocs" : { "url" : "https://docs.x.com/x-api/webhooks/introduction" }, - "operationId" : "createWebhooksConfig", + "operationId" : "createWebhooks", "parameters" : [ ], "requestBody" : { "content" : { @@ -10735,12 +11067,12 @@ "tags" : [ "Webhooks" ], - "summary" : "Delete Webhook Config", - "description" : "Deletes a webhook config.", + "summary" : "Delete webhook", + "description" : "Deletes an existing webhook configuration.", "externalDocs" : { "url" : "https://docs.x.com/x-api/webhooks/introduction" }, - "operationId" : "deleteWebhooksConfig", + "operationId" : "deleteWebhooks", "parameters" : [ { "name" : "webhook_id", @@ -10793,12 +11125,12 @@ "tags" : [ "Webhooks" ], - "summary" : "Webhook CRC Check", - "description" : "Manually trigger a CRC check for a webhook.", + "summary" : "Validate webhook", + "description" : "Triggers a CRC check for a given webhook.", "externalDocs" : { "url" : "https://docs.x.com/x-api/webhooks/introduction" }, - "operationId" : "putWebhooksConfig", + "operationId" : "validateWebhooks", "parameters" : [ { "name" : "webhook_id", @@ -10843,11 +11175,19 @@ }, "servers" : [ { - "description" : "Twitter API", - "url" : "https://api.twitter.com" + "description" : "X API", + "url" : "https://api.x.com" } ], "tags" : [ + { + "name" : "Account Activity", + "description" : "Endpoints relating to retrieving, managing AAA subscriptions", + "externalDocs" : { + "description" : "Find out more", + "url" : "https://docs.x.com/x-api/enterprise-gnip-2.0/fundamentals/account-activity" + } + }, { "name" : "Bookmarks", "description" : "Endpoints related to retrieving, managing bookmarks of a user", @@ -10912,6 +11252,14 @@ "url" : "https://developer.twitter.com/en/docs/twitter-api/spaces" } }, + { + "name" : "Stream", + "description" : "Endpoints related to streaming", + "externalDocs" : { + "description" : "Find out more", + "url" : "https://developer.x.com" + } + }, { "name" : "Tweets", "description" : "Endpoints related to retrieving, searching, and modifying Tweets", @@ -10939,30 +11287,30 @@ "type" : "oauth2", "flows" : { "authorizationCode" : { - "authorizationUrl" : "https://api.twitter.com/2/oauth2/authorize", - "tokenUrl" : "https://api.twitter.com/2/oauth2/token", + "authorizationUrl" : "https://api.x.com/2/oauth2/authorize", + "tokenUrl" : "https://api.x.com/2/oauth2/token", "scopes" : { - "block.read" : "Accounts you’ve blocked.", - "bookmark.read" : "Allows an app to read bookmarked Tweets", - "bookmark.write" : "Allows an app to create and delete bookmarks", - "dm.read" : "All your Direct Messages", - "dm.write" : "Send and manage Direct Messages for you", - "follows.read" : "People who follow you and people who you follow.", - "follows.write" : "Follow and unfollow people for you.", - "like.read" : "Tweets you’ve liked and likes you can view.", - "like.write" : "Like and un-like Tweets for you.", - "list.read" : "Lists, list members, and list followers of lists you’ve created or are a member of, including private lists.", - "list.write" : "Create and manage Lists for you.", - "media.write" : "Upload media like photos and videos for you.", - "mute.read" : "Accounts you’ve muted.", - "mute.write" : "Mute and unmute accounts for you.", - "offline.access" : "App can request refresh token.", - "space.read" : "Access all of the Spaces you can see.", - "timeline.read" : "All the Custom Timelines you can see, including public Custom Timelines from other developers.", - "tweet.moderate.write" : "Hide and unhide replies to your Tweets.", - "tweet.read" : "All the Tweets you can see, including Tweets from protected accounts.", - "tweet.write" : "Tweet and retweet for you.", - "users.read" : "Any account you can see, including protected accounts. Any account you can see, including protected accounts." + "block.read" : "View accounts you have blocked.", + "bookmark.read" : "Read your bookmarked Posts.", + "bookmark.write" : "Create and delete your bookmarks.", + "dm.read" : "Read all your Direct Messages.", + "dm.write" : "Send and manage your Direct Messages.", + "follows.read" : "View accounts you follow and accounts following you.", + "follows.write" : "Follow and unfollow accounts on your behalf.", + "like.read" : "View Posts you have liked and likes you can see.", + "like.write" : "Like and unlike Posts on your behalf.", + "list.read" : "View Lists, members, and followers of Lists you created or are a member of, including private Lists.", + "list.write" : "Create and manage Lists on your behalf.", + "media.write" : "Upload media, such as photos and videos, on your behalf.", + "mute.read" : "View accounts you have muted.", + "mute.write" : "Mute and unmute accounts on your behalf.", + "offline.access" : "Request a refresh token for the app.", + "space.read" : "View all Spaces you have access to.", + "timeline.read" : "View all Custom Timelines you can see, including public Custom Timelines from other developers.", + "tweet.moderate.write" : "Hide and unhide replies to your Posts.", + "tweet.read" : "View all Posts you can see, including those from protected accounts.", + "tweet.write" : "Post and repost on your behalf.", + "users.read" : "View any account you can see, including protected accounts." } } } @@ -11047,6 +11395,9 @@ }, "AltText" : { "type" : "object", + "required" : [ + "text" + ], "properties" : { "text" : { "type" : "string", @@ -11417,6 +11768,9 @@ }, "ContentExpiration" : { "type" : "object", + "required" : [ + "timestamp_sec" + ], "properties" : { "timestamp_sec" : { "type" : "number", @@ -11608,6 +11962,48 @@ } ] }, + "CreateNoteRequest" : { + "type" : "object", + "title" : "Note", + "required" : [ + "test_mode", + "post_id", + "info" + ], + "properties" : { + "info" : { + "$ref" : "#/components/schemas/NoteInfo" + }, + "post_id" : { + "$ref" : "#/components/schemas/TweetId" + }, + "test_mode" : { + "type" : "boolean", + "description" : "If true, the note being submitted is only for testing the capability of the bot, and won't be publicly visible. If false, the note being submitted will be a new proposed note on the product." + } + }, + "additionalProperties" : false + }, + "CreateNoteResponse" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "properties" : { + "id" : { + "$ref" : "#/components/schemas/NoteId" + } + } + }, + "errors" : { + "type" : "array", + "minItems" : 1, + "items" : { + "$ref" : "#/components/schemas/Problem" + } + } + } + }, "CreateTextMessageRequest" : { "type" : "object", "required" : [ @@ -11650,6 +12046,29 @@ } } }, + "DeleteNoteResponse" : { + "type" : "object", + "properties" : { + "data" : { + "type" : "object", + "required" : [ + "deleted" + ], + "properties" : { + "deleted" : { + "type" : "boolean" + } + } + }, + "errors" : { + "type" : "array", + "minItems" : 1, + "items" : { + "$ref" : "#/components/schemas/Problem" + } + } + } + }, "DeleteRulesRequest" : { "type" : "object", "description" : "A response from deleting user-specified stream filtering rules.", @@ -11871,6 +12290,9 @@ }, "DomainRestrictions" : { "type" : "object", + "required" : [ + "whitelist" + ], "properties" : { "whitelist" : { "type" : "array", @@ -12195,6 +12617,10 @@ }, "FoundMediaOrigin" : { "type" : "object", + "required" : [ + "provider", + "id" + ], "properties" : { "id" : { "type" : "string", @@ -14839,6 +15265,9 @@ }, "ManagementInfo" : { "type" : "object", + "required" : [ + "managed" + ], "properties" : { "managed" : { "type" : "boolean", @@ -15581,8 +16010,7 @@ "$ref" : "#/components/schemas/NoteRatingStatus" }, "test_result" : { - "type" : "boolean", - "description" : "Test result information. Only returned when test result is true." + "$ref" : "#/components/schemas/NoteTestResult" } } }, @@ -15644,6 +16072,21 @@ "needs_your_help" ] }, + "NoteTestResult" : { + "type" : "object", + "description" : "The test result of a community note.", + "properties" : { + "evaluator_score" : { + "type" : "number", + "description" : "The score given to a written test note.", + "format" : "double" + }, + "evaluator_type" : { + "type" : "string", + "description" : "The type of evaluator response." + } + } + }, "NoteTweetText" : { "type" : "string", "description" : "The note content of the Tweet.", @@ -16183,6 +16626,9 @@ }, "PreviewImage" : { "type" : "object", + "required" : [ + "media_key" + ], "properties" : { "media_key" : { "type" : "object", @@ -16676,6 +17122,9 @@ }, "SharedInfo" : { "type" : "object", + "required" : [ + "shared" + ], "properties" : { "shared" : { "type" : "boolean", @@ -16896,6 +17345,9 @@ }, "StickerInfo" : { "type" : "object", + "required" : [ + "stickers" + ], "properties" : { "stickers" : { "type" : "array", @@ -17810,6 +18262,11 @@ "verified" ] }, + "share_with_followers" : { + "type" : "boolean", + "description" : "Share community post with followers too.", + "default" : false + }, "text" : { "$ref" : "#/components/schemas/TweetText" } @@ -18267,6 +18724,9 @@ }, "UploadSource" : { "type" : "object", + "required" : [ + "upload_source" + ], "properties" : { "upload_source" : { "type" : "string", @@ -19997,12 +20457,14 @@ "type" : "string", "enum" : [ "id", + "info", "status", "test_result" ] }, "example" : [ "id", + "info", "status", "test_result" ] diff --git a/overview.mdx b/overview.mdx new file mode 100644 index 000000000..226754f9b --- /dev/null +++ b/overview.mdx @@ -0,0 +1,109 @@ +--- +title: Welcome to the X Developer Platform +sidebarTitle: Overview +mode: wide +icon: hand-wave +--- + +import { Button } from '/snippets/button.mdx'; + +Build, analyze, and innovate with X's real-time, global data and APIs. Whether you're creating new apps, integrating with X, or analyzing trends, our platform gives you the tools to get started quickly. + + +
+
+ X logo +
+
+ Get real-time events for X accounts—post creation, @mentions, replies, follows, DMs, and more—delivered to your webhook. +

+ +
+
+
+ +--- + +## Jump right in + +Get started quickly with these popular resources and guides. + +
+ +
+
+ Create an API key and make your first request to the X API in minutes. +
+
+ +
+
+
+ +
+
+ Step-by-step guides for common use cases and integrations. +
+
+ +
+
+
+ +
+
+ Official and community libraries to speed up your development. +
+
+ +
+
+
+
+ +--- + +## Products + +Explore the main products of the X Developer Platform. Each product is designed to help you build, analyze, and integrate with X in different ways. + + + + Programmatic access to X's core data: posts, users, spaces, DMs, lists, trends, media, and more. + + + Automate and manage ad campaigns, targeting, creatives, and analytics on the X Ads platform. + + + Embed X content, timelines, and engagement tools directly into your website or app. + + + +--- + +## Support & Community + +- [Support hub](https://developer.x.com/en/support) — Troubleshooting, FAQs, and contact info +- [Developer forum](https://devcommunity.x.com) — Join the conversation +- [Newsletter](https://docs.x.com/resources/newsletter) - Get monthly updates + +--- + +## Stay informed + +- [API status](https://docs.x.com/status) +- [Changelog](https://docs.x.com/changelog) \ No newline at end of file diff --git a/resources/platform-overview.mdx b/resources/platform-overview.mdx deleted file mode 100644 index e0f67c882..000000000 --- a/resources/platform-overview.mdx +++ /dev/null @@ -1,184 +0,0 @@ ---- -title: Platform overview -icon: hand-wave ---- - -import { Button } from '/snippets/button.mdx'; - -## Get started with the X Developer Platform - -X Developer Platform enables you to harness the power of X's open, global, real-time and historical platform within your own applications. The platform provides tools, resources, data and API products for you to integrate, and expand X's impact through research, solutions and more. - -This section can help you get acquainted with the platform’s organization. - -### How the platform is organized - -The X developer platform is organized into three different products. - -We have put together a different getting started section for each of these product pages since they have different requirements.  -  - -#### X API - -The X API is a set of programmatic endpoints that can be used to understand or build the conversation on X.  - -This API allows you to find and retrieve, engage with, or create a variety of different resources including the following: - -* Tweets - -* Users - -* Spaces - -* Direct Messages - -* Lists - -* Trends - -* Media - -* Places - -
- - - -
- -#### X Ads API - -The X Ads API is the direct connection to the X Ads platform. - -Integrate with the X Ads API to enhance the X Ads experience with additional innovation and efficiencies for your business. - -* Create, schedule, and manage ad campaigns - -* Create targeting criteria and custom audiences - -* Plan and create ad creatives - -* Pull ad analytics - -
- - - -
- -#### X for Websites - -X for Websites allows you to embed X's live content into your product, direct from the source. Make the most out of X on your website to increase followers, drive engagement, and grow your business - -Bring your pick of content from X into your website or app. Use our tools to embed Tweets in your stories and articles on the web. - -Include a stream of Tweets in your website or app in a compact, linear view. Configure Tweet timelines to automatically display live updates from people, trends, and places right in your app. - -Allow people who visit your website or app to engage with your X account and share content with their followers. Enhance links to your website shared on X with Cards and X buttons. - - - -### Documentation organization - -Our technical documentation has separate sections to help you work with each of these different products. In each section, you will find guides, libraries, API references, and other resources to help you get started. - -The [X API](/x-api/introduction) and [X Ads API](/x-ads-api/introduction) products share similar fundamentals, and even include some common endpoint functionality. These shared concepts are discussed in the platform fundamentals section, including the following: - - - - - - - - - - - - - - - -For content display and X actions on websites, the X for Websites product consists of web embeds and tools to optimize X links. You can learn more about the fundamentals of this product by navigating to the [X for Websites](https://developer.x.com/en/docs/twitter-for-websites) section of the docs. - -The documentation also includes tutorials, integration guides, developer tools, and use case examples to help you as you integrate with the platform. We welcome you to utilize these resources and engage with the developer community to get inspired and build something new. -  - -### Tools and libraries - -Find both X-maintained and open-source community client libraries and other developer tools that can help you integrate X into your system more quickly. - -
- - - -
- -### Tutorials - -Learn how to use X’s developer tools to build a solution around a use case with one of our tutorials: - - - -### Troubleshooting and support - -Debugging an error? Have a question? Head over to our support section to find troubleshooting tips, contact details, live API status monitor, and other helpful information. - - - -### Community - -* Join the X Developer Community online through our [forum](https://devcommunity.x.com) - -* Subscribe to the [X Developer Newsletter](https://docs.x.com/resources/newsletter) for monthly developer community updates - -### How to stay informed - -The following pages and resources can help provide you with important details on API outages, updates, and other news relevant to developers on the platform. - -* Review our [API status page](https://docs.x.com/status#x-developer-platform-status) to receive updates on known platform inconsistencies that could affect your integration. - -* Check out our [changelog](https://docs.x.com/changelog) to see the recent changes that we've made to the platform, as well as a list of important upcoming dates. - -All of these resources and more are listed on our [stay informed](https://developer.x.com/en/updates/stay-informed) page.  - -*** - -For more information on how to get started, please visit the specific getting started page for the product that matches your use case. - - - -
- - [Learn more](/x-api/getting-started/about-x-api) -
- - -
- - [Learn more](/x-ads-api/getting-started/step-by-step-guide) -
- - -
- - [Learn more](https://developer.x.com/en/docs/twitter-for-websites.html) -
-
\ No newline at end of file diff --git a/snippets/logo_card.mdx b/snippets/logo_card.mdx index 2fca88641..706fa7c11 100644 --- a/snippets/logo_card.mdx +++ b/snippets/logo_card.mdx @@ -1,11 +1,14 @@ -export const LogoCard = ({ img, href, title, description }) => { +export const LogoCard = ({ img, href, title, description, backgroundColor = 'white' }) => { return (
-
+
{`${title} { + const isLink = Boolean(href); + const CardWrapper = isLink ? 'a' : 'div'; + + return ( + +
+ {popular && ( +
+ + Popular + +
+ )} + +
+

+ {title} +

+ +
+ + {price} + + {price !== 'Contact us' && ( + /month + )} +
+ +

+ {description} +

+
+ + {features.length > 0 && ( + <> +
+
+

+ What's included: +

+
+ {features.map((feature, index) => ( +
+ + + +
+ {feature} +
+
+ ))} +
+
+ + )} +
+
+ ); +}; \ No newline at end of file diff --git a/snippets/story-card.mdx b/snippets/story-card.mdx index bae15eec7..513da7590 100644 --- a/snippets/story-card.mdx +++ b/snippets/story-card.mdx @@ -7,7 +7,7 @@ export const StoryCard = ({ img, href, title }) => { {title} diff --git a/snippets/success-story-card.mdx b/snippets/success-story-card.mdx index 73e94b905..2fceb6cd7 100644 --- a/snippets/success-story-card.mdx +++ b/snippets/success-story-card.mdx @@ -18,7 +18,7 @@ export const SuccessStoryCard = ({ img, href, title }) => { {title} diff --git a/style.css b/style.css index 909d1322b..ccb111cf8 100644 --- a/style.css +++ b/style.css @@ -89,4 +89,23 @@ td[data-label="Free Limit"] strong { } .dark .chat-assistant-sheet-header .flex.items-center.gap-2::before { background-image: url("data:image/svg+xml,%3Csvg fill='%23ffffff' fill-rule='evenodd' height='1em' style='flex:none;line-height:1' viewBox='0 0 24 24' width='1em' xmlns='http://www.w3.org/2000/svg'%3E%3Ctitle%3EGrok%3C/title%3E%3Cpath d='M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815'/%3E%3C/svg%3E"); +} + +[data-component-part="update-label"] { + background-color: white; + color: black !important; +} + +#navbar > *:nth-child(2) { + max-width: none !important; + margin-left: 0 !important; + margin-right: 0 !important; +} + +#sidebar { + left: 0 !important; +} + +#sidebar-content { + padding-left: 2rem; } \ No newline at end of file diff --git a/resources/tools-and-libraries.mdx b/tools-and-libraries.mdx similarity index 100% rename from resources/tools-and-libraries.mdx rename to tools-and-libraries.mdx diff --git a/resources/tutorials.mdx b/tutorials.mdx similarity index 100% rename from resources/tutorials.mdx rename to tutorials.mdx diff --git a/x-api/account-activity/request-activity-replay.mdx b/x-api/account-activity/create-replay-job.mdx similarity index 100% rename from x-api/account-activity/request-activity-replay.mdx rename to x-api/account-activity/create-replay-job.mdx diff --git a/x-api/account-activity/subscribes-the-provided-application-to-all-events-for-the-provided-user-context-for-all-message-types.mdx b/x-api/account-activity/create-subscription.mdx similarity index 100% rename from x-api/account-activity/subscribes-the-provided-application-to-all-events-for-the-provided-user-context-for-all-message-types.mdx rename to x-api/account-activity/create-subscription.mdx diff --git a/x-api/account-activity/deactivates-a-subscription-for-the-specified-webhook-and-user-id.mdx b/x-api/account-activity/delete-subscription.mdx similarity index 100% rename from x-api/account-activity/deactivates-a-subscription-for-the-specified-webhook-and-user-id.mdx rename to x-api/account-activity/delete-subscription.mdx diff --git a/x-api/account-activity/get-a-count-of-subscriptions-that-are-currently-active-on-your-account.mdx b/x-api/account-activity/get-subscription-count.mdx similarity index 100% rename from x-api/account-activity/get-a-count-of-subscriptions-that-are-currently-active-on-your-account.mdx rename to x-api/account-activity/get-subscription-count.mdx diff --git a/x-api/account-activity/get-a-list-of-the-current-all-activity-type-subscriptions-for-the-specified-webhook.mdx b/x-api/account-activity/get-subscriptions.mdx similarity index 100% rename from x-api/account-activity/get-a-list-of-the-current-all-activity-type-subscriptions-for-the-specified-webhook.mdx rename to x-api/account-activity/get-subscriptions.mdx diff --git a/x-api/account-activity/introduction.mdx b/x-api/account-activity/introduction.mdx index 194370e30..773da6262 100644 --- a/x-api/account-activity/introduction.mdx +++ b/x-api/account-activity/introduction.mdx @@ -35,7 +35,6 @@ The returned Posts from Account Activity API count towards the monthly [Post cap | Tier | Pricing | Number of Unique Subscriptions | Number of Webhooks | | ----- | ----- | ----- | ----- | -| Self-Serve Pro | $5000/mo | 1 | 1 | | Enterprise | Contact sales | 5000+ | 5+ | This document focuses on managing user subscriptions associated with your webhooks using v2 Account Activity API endpoints. diff --git a/x-api/account-activity/check-if-a-subscription-exists-for-a-given-webhook-and-user.mdx b/x-api/account-activity/validate-subscription.mdx similarity index 100% rename from x-api/account-activity/check-if-a-subscription-exists-for-a-given-webhook-and-user.mdx rename to x-api/account-activity/validate-subscription.mdx diff --git a/x-api/bookmarks/add-post-to-bookmarks.mdx b/x-api/bookmarks/create-bookmark.mdx similarity index 100% rename from x-api/bookmarks/add-post-to-bookmarks.mdx rename to x-api/bookmarks/create-bookmark.mdx diff --git a/x-api/bookmarks/remove-a-bookmarked-post.mdx b/x-api/bookmarks/delete-bookmark.mdx similarity index 100% rename from x-api/bookmarks/remove-a-bookmarked-post.mdx rename to x-api/bookmarks/delete-bookmark.mdx diff --git a/x-api/bookmarks/bookmark-folders-by-user.mdx b/x-api/bookmarks/get-bookmark-folders.mdx similarity index 100% rename from x-api/bookmarks/bookmark-folders-by-user.mdx rename to x-api/bookmarks/get-bookmark-folders.mdx diff --git a/x-api/bookmarks/bookmark-folder-posts-by-user-and-folder-id.mdx b/x-api/bookmarks/get-bookmarks-by-folder-id.mdx similarity index 100% rename from x-api/bookmarks/bookmark-folder-posts-by-user-and-folder-id.mdx rename to x-api/bookmarks/get-bookmarks-by-folder-id.mdx diff --git a/x-api/bookmarks/bookmarks-by-user.mdx b/x-api/bookmarks/get-bookmarks.mdx similarity index 100% rename from x-api/bookmarks/bookmarks-by-user.mdx rename to x-api/bookmarks/get-bookmarks.mdx diff --git a/x-api/communities/communities-lookup-by-community-id.mdx b/x-api/communities/get-community-by-id.mdx similarity index 100% rename from x-api/communities/communities-lookup-by-community-id.mdx rename to x-api/communities/get-community-by-id.mdx diff --git a/x-api/community-notes/community-note-lookup-by-post-id.mdx b/x-api/community-notes/community-note-lookup-by-post-id.mdx deleted file mode 100644 index 321be4a5f..000000000 --- a/x-api/community-notes/community-note-lookup-by-post-id.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /2/notes ---- \ No newline at end of file diff --git a/x-api/community-notes/create-a-community-note.mdx b/x-api/community-notes/create-a-community-note.mdx new file mode 100644 index 000000000..09a19080d --- /dev/null +++ b/x-api/community-notes/create-a-community-note.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /2/notes +--- \ No newline at end of file diff --git a/x-api/community-notes/delete-a-community-note.mdx b/x-api/community-notes/delete-a-community-note.mdx new file mode 100644 index 000000000..847876e9f --- /dev/null +++ b/x-api/community-notes/delete-a-community-note.mdx @@ -0,0 +1,3 @@ +--- +openapi: delete /2/notes/{id} +--- \ No newline at end of file diff --git a/x-api/community-notes/introduction.mdx b/x-api/community-notes/introduction.mdx new file mode 100644 index 000000000..67a751b0f --- /dev/null +++ b/x-api/community-notes/introduction.mdx @@ -0,0 +1,23 @@ +The Community Notes Endpoints in the X API v2 allow developers to search for and propose Community Notes on X programmatically. Use of the API requires your account being signed up for X Developer AI access and enrolled in Community Notes as an AI Note Writer. You can [enroll and learn more about AI Note Writers](https://communitynotes.x.com/guide/en/api/overview) in the Community Notes Guide. + +Currently, the API supports two endpoint categories: + +## Search + +### Search for X Posts that are eligible to receive a Community Note + +Developers can retrieve a list of X Posts that are eligible to receive a Community Note using the `GET https://api.x.com/2/notes/search/posts_eligible_for_notes` endpoint. + +### Search for Community Notes that have been written by the user on X Posts + +Developers can retrieve a list of Community Notes that have been written by the authenticating user on X Posts using the `GET https://api.x.com/2/notes/search/notes_written` endpoint. + +## Manage Community Notes + +Developers can submit Community Notes on X Posts using the `POST https://api.x.com/2/notes` endpoint. + +## Rate Limits + +The current rate limits are 90 request per 15 minutes for all Community Notes endpoints and an additional 250 requests per day limit for the Manage Community Notes endpoint. + +**Note:** These endpoints are currently in a pilot test. Please check out our [Quick Start Guide](https://docs.x.com/x-api/community-notes/quickstart) for details on using these endpoints \ No newline at end of file diff --git a/x-api/community-notes/quickstart.mdx b/x-api/community-notes/quickstart.mdx new file mode 100644 index 000000000..bfee4058f --- /dev/null +++ b/x-api/community-notes/quickstart.mdx @@ -0,0 +1,338 @@ +In this guide, we will walk you through using the new Community Notes endpoints using Python. + +In order to use the Community Notes endpoints, please ensure you have a [valid X Developers Account](https://developer.x.com/) and are enrolled as a [Community Notes AI Note Writer](https://communitynotes.x.com/guide/en/api/overview) in the Community Notes Guide). Once approved, please ensure you have the correct API keys and tokens to use in the examples listed below. Check out [this fundamentals section](https://docs.x.com/resources/fundamentals/developer-apps#keys-and-tokens) for instructions on obtaining your keys and tokens - please save your API key, API secret, access token and token secret as we will be using it in the examples in this guide. The Community Notes endpoints support OAuth 1.0 and 2.0 authentication. In this guide, we will be using OAuth 1.0. + +## Search for X Posts that are eligible to receive a Community Note + +Developers can retrieve a list of X Posts that are eligible to receive a Community Note using the `GET https://api.x.com/2/notes/search/posts_eligible_for_notes` endpoint. The endpoint requires you to specify a test_mode parameter and set it to true in order to use these endpoints. + +**Note:** For now, test_mode can only be set to true, otherwise these endpoints will return an error like: + +```json +{ + "errors": [ + { + "message": "The `test_mode` query parameter is invalid." + } + ], + "title": "Invalid Request", + "detail": "One or more parameters to your request was invalid.", + "type": "https://api.twitter.com/2/problems/invalid-request" +} +``` + +You can specify the maximum number of Posts you want returned per request using the max_results parameter. By default, 10 Posts are returned and a maximum of 100 Posts can be retrieved per request. If you want additional results, pass in the pagination_token. + +The code below will call the search endpoint that returns Posts that are eligible for Community Notes: + +```python +from requests_oauthlib import OAuth1Session +import json + +# API endpoint and parameters +url = "https://api.x.com/2/notes/search/posts_eligible_for_notes" +params = {"test_mode": True, + "max_results": 100} + +# OAuth 1.0 credentials +oauth = OAuth1Session( + client_key='REPLACE_ME', + client_secret='REPLACE_ME', + resource_owner_key='REPLACE_ME', + resource_owner_secret='REPLACE_ME', +) + +# Make the request +try: + response = oauth.get(url, params=params) + response.raise_for_status() # Raises an HTTPError for bad responses + + print("Response code: {}".format(response.status_code)) + json_response = response.json() + print(json.dumps(json_response, indent=4, sort_keys=True)) + +except Exception as e: + print(f"Request failed: {e}") +``` + +The response will be something like: + +```json +{ + "data": [ + { + "text": "Join us to learn more about our new analytics endpoints available in the X API v2 📊 https://t.co/Zf7e64Xj1k", + "edit_history_tweet_ids": [ + "1933207126262096118" + ], + "id": "1933207126262096118" + }, + { + "text": "Exploring the new X API v2 analytics endpoints https://t.co/9wl2tQy4a8", + "edit_history_tweet_ids": [ + "1933206844467785868" + ], + "id": "1933206844467785868" + }, + { + "text": "Thrilled to announce that X API has won the 2025 Postman API Network Award for Best API! Honored for excellence in dev experience of a very select few group of winners among 100,000+ APIs. Thank you, @getpostman, and our amazing dev community! https://t.co/BjMZrfAoQo", + "edit_history_tweet_ids": [ + "1930672414444372186" + ], + "id": "1930672414444372186" + } + ], + "meta": { + "newest_id": "1933207126262096118", + "oldest_id": "1930672414444372186", + "result_count": 3 + } +} +``` + +You can use the Post ID from the response above to write a Community Note. + +By default, you get Post id, text and edit history. If you want additional fields, you can use [fields](https://docs.x.com/x-api/fundamentals/fields) and [expansions](https://docs.x.com/x-api/fundamentals/expansions) + +## Search for Community Notes that have been written on X Posts + +Similarly, a developer can retrieve a list of Community Notes that have been written by the authenticating user using the GET https://api.x.com/2/notes/search/notes_written. This endpoint also requires the test_mode parameter. When test_mode is set to true: all test notes written by the user are returned. + +**Note:** For now, test_mode can only be set to true, otherwise these endpoints will return an error like: + +```json +{ + "errors":[ + { + "message":"The `test_mode` query parameter is invalid." + } + ], + "title":"Invalid Request", + "detail":"One or more parameters to your request was invalid.", + "type":"https://api.twitter.com/2/problems/invalid-request" +} +``` + +You can specify the maximum number of Notes you want returned per request using the max_results parameter. By default, 10 Notes are returned and a maximum of 100 Notes can be retrieved per request. If you want additional results, pass in the pagination_token. + +The code below will call the search endpoint that returns Notes that are written on X Posts: + +```python +from requests_oauthlib import OAuth1Session +import json + + +# API endpoint and parameters +url = "https://api.x.com/2/notes/search/notes_written" +params = {"test_mode": True, + "max_results": 100, } + +# OAuth 1.0 credentials +oauth = OAuth1Session( + client_key='REPLACE_ME', + client_secret='REPLACE_ME', + resource_owner_key='REPLACE_ME', + resource_owner_secret='REPLACE_ME', +) + +# Make the request +try: + response = oauth.get(url, params=params) + response.raise_for_status() # Raises an HTTPError for bad responses + + print("Response code: {}".format(response.status_code)) + json_response = response.json() + print(json.dumps(json_response, indent=4, sort_keys=True)) + +except Exception as e: + print(f"Request failed: {e}") +``` + +The response will be something like: + +```json +{ + "data": [ + { + "id": "1939827717186494817", + "info": { + "text": "test note text. http://source.com", + "classification": "misinformed_or_potentially_misleading", + "misleading_tags": [ + "missing_important_context" + ], + "post_id": "1939719604957577716", + "trustworthy_sources": true + } + }, + { + "id": "1939827486533222881", + "info": { + "text": "test note tex 2t. http://source.com", + "classification": "misinformed_or_potentially_misleading", + "misleading_tags": [ + "missing_important_context" + ], + "post_id": "1939769235158237565", + "trustworthy_sources": true + } + } + ], + "meta": { + "result_count": 2, + "next_token": "[token]" + } +} +``` + +## Manage Community Notes + +Developers can submit Community Notes on X Posts using the POST https://api.x.com/2/notes endpoint. Similar to the previous endpoints, this endpoint also supports the test_mode query parameter. When test_mode is set to true, the note being submitted is only for testing, and won't be publicly visible. + +**Note:** For now, test_mode can only be set to true, otherwise these endpoints will return an error like: + +```json +{ + "errors": [ + { + "message": "The `test_mode` query parameter is invalid." + } + ], + "title": "Invalid Request", + "detail": "One or more parameters to your request was invalid.", + "type": "https://api.twitter.com/2/problems/invalid-request" +} +``` + + +In order to do so, you will need to provide the *post_id* for which you want to submit the Community Note in the request body for this endpoint, along with the required information to create a note including: +* *text*: the text for the note, which should contain at least 1 and at most 280 characters (urls count as a single character) and must contain a source url +* *classification*: which can be either misinformed_or_potentially_misleading or not_misleading +* *misleading_tags*: which is a non-empty list of tags that is either "disputed_claim_as_fact", "factual_error", "manipulated_media", "misinterpreted_satire", "missing_important_context", "outdated_information" or "other". This field is only needed when the classification is of type misinformed_or_potentially_misleading. +* *trustworthy_sources*: which is a boolean value to indicate whether a trustworthy source is provided in “text”. + +Below is an example request to this endpoint + +```python +from requests_oauthlib import OAuth1Session +import json + + +# Replace with your Note information +payload = {"test_mode": True, + "post_id": "1939667242318541239" + , + "info": { + "text": "test note text. http://source.com", + "classification": "misinformed_or_potentially_misleading", + "misleading_tags": ["missing_important_context"], + "trustworthy_sources": True, + }} + + +# Make the request +oauth = OAuth1Session( + client_key='REPLACE_ME', + client_secret='REPLACE_ME', + resource_owner_key='REPLACE_ME', + resource_owner_secret='REPLACE_ME', +) + + +# Making the request +response = oauth.post( + "https://api.twitter.com/2/notes", + json=payload, +) + + +if response.status_code != 201: + raise Exception( + "Request returned an error: {} {}".format(response.status_code, response.text) + ) + + +print("Response code: {}".format(response.status_code)) + + +# Saving the response as JSON +json_response = response.json() +print(json.dumps(json_response, indent=4, sort_keys=True)) +``` + +If the request is successful, the response will look like this: + +```json +{ + "data": { + "note_id": "1938678124100886981" + } +} +``` + +## Error Troubleshooting + +Below is a list of common error messages and resolutions when working with the Community Notes endpoints: + +### 401 Unauthorized + +```json +{ + "title": "Unauthorized", + "type": "about:blank", + "status": 401, + "detail": "Unauthorized" +} +``` + +**Explanation**: This error is returned with the request is not properly authenticated + +### 403 Forbidden + +```json +{ + "detail": "User: [userId] must be an API Note Writer to access this endpoint.", + "type": "about:blank", + "title": "Forbidden", + "status": 403 +} +``` +**Explanation**: This error is returned when a user is not enrolled to use this endpoint + +### 400 Invalid Request (test_mode) + +```json +{ + "errors": [ + { + "message": "The `test_mode` query parameter is invalid." + } + ], + "title": "Invalid Request", + "detail": "One or more parameters to your request was invalid.", + "type": "https://api.twitter.com/2/problems/invalid-request" +} +``` + +**Explanation**: This endpoint is returned when a user tries to make request with test_mode set to false + +### 400 Invalid Request (Duplicate Note) + +```json +{ + "errors": [ + { + "message": "User already created a note: [noteId] for this post." + } + ], + "title": "Invalid Request", + "detail": "One or more parameters to your request was invalid.", + "type": "https://api.twitter.com/2/problems/invalid-request" +} +``` + +**Explanation**: This error is returned when a user tries to make duplicate Community Notes + +## Resources + +You can find code samples in other programming languages on our [Github page](https://github.com/xdevplatform/Twitter-API-v2-sample-code). You can also get started with these API endpoints using our [Postman collection](https://www.postman.com/xapidevelopers). If you have any technical questions about these endpoints, please feel free to reach out to us on the [X Developer Community support forums](https://devcommunity.x.com/). diff --git a/x-api/community-notes/search-for-community-notes-written.mdx b/x-api/community-notes/search-for-community-notes-written.mdx new file mode 100644 index 000000000..3a8680ef8 --- /dev/null +++ b/x-api/community-notes/search-for-community-notes-written.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /2/notes/search/notes_written +--- \ No newline at end of file diff --git a/x-api/community-notes/search-for-posts-eligible-for-community-notes.mdx b/x-api/community-notes/search-for-posts-eligible-for-community-notes.mdx new file mode 100644 index 000000000..d94faf9fa --- /dev/null +++ b/x-api/community-notes/search-for-posts-eligible-for-community-notes.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /2/notes/search/posts_eligible_for_notes +--- \ No newline at end of file diff --git a/x-api/compliance/get-compliance-job.mdx b/x-api/compliance/get-compliance-job-by-id.mdx similarity index 100% rename from x-api/compliance/get-compliance-job.mdx rename to x-api/compliance/get-compliance-job-by-id.mdx diff --git a/x-api/compliance/list-compliance-jobs.mdx b/x-api/compliance/get-compliance-jobs.mdx similarity index 100% rename from x-api/compliance/list-compliance-jobs.mdx rename to x-api/compliance/get-compliance-jobs.mdx diff --git a/x-api/connection/force-kills-all-streaming-connections-of-the-authenticated-application.mdx b/x-api/connection/terminate-all-connections.mdx similarity index 100% rename from x-api/connection/force-kills-all-streaming-connections-of-the-authenticated-application.mdx rename to x-api/connection/terminate-all-connections.mdx diff --git a/x-api/direct-messages/create-dm-conversation.mdx b/x-api/direct-messages/create-dm-conversation.mdx new file mode 100644 index 000000000..d6c7dbf87 --- /dev/null +++ b/x-api/direct-messages/create-dm-conversation.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /2/dm_conversations +--- \ No newline at end of file diff --git a/x-api/direct-messages/create-dm-message-by-conversation-id.mdx b/x-api/direct-messages/create-dm-message-by-conversation-id.mdx new file mode 100644 index 000000000..956387ec1 --- /dev/null +++ b/x-api/direct-messages/create-dm-message-by-conversation-id.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /2/dm_conversations/{dm_conversation_id}/messages +--- \ No newline at end of file diff --git a/x-api/direct-messages/create-dm-message-by-participant-id.mdx b/x-api/direct-messages/create-dm-message-by-participant-id.mdx new file mode 100644 index 000000000..4e9eb0f24 --- /dev/null +++ b/x-api/direct-messages/create-dm-message-by-participant-id.mdx @@ -0,0 +1,3 @@ +--- +openapi: post /2/dm_conversations/with/{participant_id}/messages +--- \ No newline at end of file diff --git a/x-api/direct-messages/delete-dm-event.mdx b/x-api/direct-messages/delete-dm-event.mdx new file mode 100644 index 000000000..14a42696f --- /dev/null +++ b/x-api/direct-messages/delete-dm-event.mdx @@ -0,0 +1,3 @@ +--- +openapi: delete /2/dm_events/{event_id} +--- \ No newline at end of file diff --git a/x-api/direct-messages/get-dm-event-by-id.mdx b/x-api/direct-messages/get-dm-event-by-id.mdx new file mode 100644 index 000000000..03b648cf1 --- /dev/null +++ b/x-api/direct-messages/get-dm-event-by-id.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /2/dm_events/{event_id} +--- \ No newline at end of file diff --git a/x-api/direct-messages/get-dm-events.mdx b/x-api/direct-messages/get-dm-events.mdx new file mode 100644 index 000000000..89969dc9b --- /dev/null +++ b/x-api/direct-messages/get-dm-events.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /2/dm_events +--- \ No newline at end of file diff --git a/x-api/introduction.mdx b/x-api/introduction.mdx index ac6b259d7..f30c5952b 100644 --- a/x-api/introduction.mdx +++ b/x-api/introduction.mdx @@ -1,164 +1,129 @@ --- -title: "Introduction" +title: X API v2 +sidebarTitle: "Introduction" +mode: wide --- import { Button } from "/snippets/button.mdx" +import { PricingCard } from "/snippets/pricing-card.mdx" -The X API enables programmatic access to X in unique and advanced ways. Tap into core elements of X like: Posts, Direct Messages, Spaces, Lists, users, and more. - -
- - - - -
+X API v2 gives you programmatic access to X's global conversation—posts, users, spaces, DMs, lists, trends, media, and more. Build apps, analyze data, and create new experiences with powerful, modern endpoints. --- -## X API v2 +## Key Features -X API v2 is ready for prime time\! We recommend that the majority of developers start to think about migrating to v2 of the API, and for any new users to get started with v2. Why migrate? - - - - - - - - - - + + + Access detailed, structured data for posts, users, media, and more with comprehensive field selection. - - + + Get engagement analytics, real-time metrics, and detailed insights for your data. - - - - - + + Subscribe to filtered or sampled streams for live updates and real-time data processing. -## Access Levels - -### Free - -- For write-only use cases and testing the X API -- Low rate-limit access to v2 posts and media upload endpoints -- 500 Posts per month - posting limit at the app level -- 1 Project, 1 App per Project, 1 Environment -- Login with X, Access to Ads API -- Cost: Free - -### Basic - -- For hobbyists or prototypes -- Low-rate limit access to suite of v2 endpoints -- 3,000 Posts per month (user level), 50,000 Posts per month (app level) -- 10,000/month Posts read-limit rate cap -- 1 Project, 2 Apps per Project -- Login with X, Access to Ads API -- Cost: $200 per month - -### Pro - -- For startups scaling their business -- Rate-limited access to suite of v2 endpoints, including search and filtered stream -- 1,000,000 Posts per month - GET at the app level -- 300,000 Posts per month - posting limit at the app level -- 1 Project, 3 Apps per Project -- Login with X, Access to Ads API -- Cost: $5,000 per month - -### Enterprise - -- For businesses and scaled commercial projects -- Commercial-level access that meets your and your customer's specific needs -- Managed services by a dedicated account team -- Complete streams: replay, engagement metrics, backfill, and more features -- Cost: Monthly subscription tiers - - - -## Migrate to X API v2 - -Interested in migrating your current integration to X API v2? Check out our migration hub for resources that will help you understand what is different between v2 and previous versions, including the data formats. You can also access migration guides for each endpoint listed in the new v2 endpoint sections. - -
- +--- - +## API Tiers & Pricing + +
+ Ads API access, + Login with X access, + "Basic v2 endpoints access" + ]} + /> + + + + Full-archive search access, + Filtered stream access, + "Priority support" + ]} + /> +
+
+

+ Need Enterprise-level access? +

+

+ For businesses and scaled commercial projects, we offer custom solutions with dedicated support, + complete streams, backfill capabilities, and custom integrations. +

+
+ +
--- -## What to build - -Check out our 'what to build" page to learn more about: - -- Moderate conversations for health and safety -- Enable creation and personal expression -- Measure and analyze "what's happening" -- Improve community experiences -- Curate and recommend content -- Impact the greater good - - - -## Tools to get you started - -Go from zero to "Hello World" with the help of these resources, tools, and libraries. - - - - Check out our curated selection of all X-built and community-supported client libraries. - -
+## Get Started Tools + + + Official and community SDKs for fast integration. Support for TypeScript, Java, Python, and more. +

[Browse libraries](/x-api/tools-and-libraries/overview)
- - We have built out a Postman collection for our v2 endpoints to help you explore the API using their visual client\! - -
- + + Explore endpoints visually and test requests with our comprehensive Postman collection. +

[Get started with Postman](https://app.getpostman.com/run-collection/9956214-784efcda-ed4c-4491-a4c0-a26470a67400)
- - Looking to get started building with the X API. We have sample code, clients, and other example apps available. Check out the @XDevelopers GitHub\! - -
- + + Example apps, code samples, and tutorials on GitHub to help you get started quickly. +

[Get started with our sample code](https://github.com/xdevplatform)
-## Need help? +--- -Visit our support section for troubleshooting tips, FAQs, live API status monitor, and other helpful information. +## Support & Community +
- -## Join the conversation - -Explore our forum created for developers building and innovating on the X Developer Platform. - \ No newline at end of file + Join the forum + +
\ No newline at end of file diff --git a/x-api/lists/add-a-list-member.mdx b/x-api/lists/add-list-member.mdx similarity index 100% rename from x-api/lists/add-a-list-member.mdx rename to x-api/lists/add-list-member.mdx diff --git a/x-api/lists/follow-a-list.mdx b/x-api/lists/follow-list.mdx similarity index 100% rename from x-api/lists/follow-a-list.mdx rename to x-api/lists/follow-list.mdx diff --git a/x-api/lists/get-users-followed-lists.mdx b/x-api/lists/get-followed-lists.mdx similarity index 100% rename from x-api/lists/get-users-followed-lists.mdx rename to x-api/lists/get-followed-lists.mdx diff --git a/x-api/lists/list-lookup-by-list-id.mdx b/x-api/lists/get-list-by-id.mdx similarity index 100% rename from x-api/lists/list-lookup-by-list-id.mdx rename to x-api/lists/get-list-by-id.mdx diff --git a/x-api/lists/get-a-users-list-memberships.mdx b/x-api/lists/get-list-memberships.mdx similarity index 100% rename from x-api/lists/get-a-users-list-memberships.mdx rename to x-api/lists/get-list-memberships.mdx diff --git a/x-api/lists/get-a-users-owned-lists.mdx b/x-api/lists/get-owned-lists.mdx similarity index 100% rename from x-api/lists/get-a-users-owned-lists.mdx rename to x-api/lists/get-owned-lists.mdx diff --git a/x-api/lists/get-a-users-pinned-lists.mdx b/x-api/lists/get-pinned-lists.mdx similarity index 100% rename from x-api/lists/get-a-users-pinned-lists.mdx rename to x-api/lists/get-pinned-lists.mdx diff --git a/x-api/lists/pin-a-list.mdx b/x-api/lists/pin-list.mdx similarity index 100% rename from x-api/lists/pin-a-list.mdx rename to x-api/lists/pin-list.mdx diff --git a/x-api/lists/remove-a-list-member.mdx b/x-api/lists/remove-list-member.mdx similarity index 100% rename from x-api/lists/remove-a-list-member.mdx rename to x-api/lists/remove-list-member.mdx diff --git a/x-api/lists/unfollow-a-list.mdx b/x-api/lists/unfollow-list.mdx similarity index 100% rename from x-api/lists/unfollow-a-list.mdx rename to x-api/lists/unfollow-list.mdx diff --git a/x-api/lists/unpin-a-list.mdx b/x-api/lists/unpin-list.mdx similarity index 100% rename from x-api/lists/unpin-a-list.mdx rename to x-api/lists/unpin-list.mdx diff --git a/x-api/media/media-upload-append.mdx b/x-api/media/append-media-upload.mdx similarity index 100% rename from x-api/media/media-upload-append.mdx rename to x-api/media/append-media-upload.mdx diff --git a/x-api/media/metadata-create.mdx b/x-api/media/create-media-metadata.mdx similarity index 100% rename from x-api/media/metadata-create.mdx rename to x-api/media/create-media-metadata.mdx diff --git a/x-api/media/subtitle-create.mdx b/x-api/media/create-media-subtitles.mdx similarity index 100% rename from x-api/media/subtitle-create.mdx rename to x-api/media/create-media-subtitles.mdx diff --git a/x-api/media/subtitle-delete.mdx b/x-api/media/delete-media-subtitles.mdx similarity index 100% rename from x-api/media/subtitle-delete.mdx rename to x-api/media/delete-media-subtitles.mdx diff --git a/x-api/media/media-upload-finalize.mdx b/x-api/media/finalize-media-upload.mdx similarity index 100% rename from x-api/media/media-upload-finalize.mdx rename to x-api/media/finalize-media-upload.mdx diff --git a/x-api/media/media-lookup-by-media-key-1.mdx b/x-api/media/get-media-by-media-key.mdx similarity index 100% rename from x-api/media/media-lookup-by-media-key-1.mdx rename to x-api/media/get-media-by-media-key.mdx diff --git a/x-api/media/media-lookup-by-media-key.mdx b/x-api/media/get-media-by-media-keys.mdx similarity index 100% rename from x-api/media/media-lookup-by-media-key.mdx rename to x-api/media/get-media-by-media-keys.mdx diff --git a/x-api/media/media-upload-status.mdx b/x-api/media/get-media-upload-status.mdx similarity index 100% rename from x-api/media/media-upload-status.mdx rename to x-api/media/get-media-upload-status.mdx diff --git a/x-api/media/media-upload-initialize.mdx b/x-api/media/initialize-media-upload.mdx similarity index 100% rename from x-api/media/media-upload-initialize.mdx rename to x-api/media/initialize-media-upload.mdx diff --git a/x-api/media/image-or-subtitle-media-upload.mdx b/x-api/media/upload-media.mdx similarity index 100% rename from x-api/media/image-or-subtitle-media-upload.mdx rename to x-api/media/upload-media.mdx diff --git a/x-api/openapi/returns-the-openapi-specification-document.mdx b/x-api/openapi/get-openapi-spec.mdx similarity index 100% rename from x-api/openapi/returns-the-openapi-specification-document.mdx rename to x-api/openapi/get-openapi-spec.mdx diff --git a/x-api/posts/creation-of-a-post.mdx b/x-api/posts/create-post.mdx similarity index 100% rename from x-api/posts/creation-of-a-post.mdx rename to x-api/posts/create-post.mdx diff --git a/x-api/posts/post-delete-by-post-id.mdx b/x-api/posts/delete-post.mdx similarity index 100% rename from x-api/posts/post-delete-by-post-id.mdx rename to x-api/posts/delete-post.mdx diff --git a/x-api/posts/filtered-stream/integrate/build-a-rule.mdx b/x-api/posts/filtered-stream/integrate/build-a-rule.mdx index 4633dfe58..43961d681 100644 --- a/x-api/posts/filtered-stream/integrate/build-a-rule.mdx +++ b/x-api/posts/filtered-stream/integrate/build-a-rule.mdx @@ -1,307 +1,307 @@ ---- -title: Build a rule -sidebarTitle: Build a rule ---- - -## Building rules for filtered stream - -The filtered stream endpoints deliver filtered Posts to you in real-time that match on a set of rules that are applied to the stream. Rules are made up of operators that are used to match on a variety of Post attributes. - -Multiple rules can be applied to a stream using the [POST /tweets/search/stream/rules](/x-api/posts/filtered-stream#post-2-tweets-search-stream-rules) endpoint. Once you’ve added rules and connect to your stream using the [GET /tweets/search/stream](/x-api/posts/filtered-stream#get-2-tweets-search-stream) endpoint, only those Posts that match your rules will be delivered in real-time through a persistent streaming connection. You do not need to disconnect from your stream to add or remove rules.  - -### Table of contents - -* [Building a rule](#building-a-rule) - * [Rule limitations](#rule-limitations) - * [Operator availability](#operator-availability) - * [Operator types: standalone and conjunction-required](#operator-types-standalone-and-conjunction-required) - * [Boolean operators and grouping](#boolean-operators-and-grouping) - * [Order of operations](#order-of-operations) - * [Punctuation, diacritics, and case sensitivity](#punctuation-diacritics-and-case-sensitivity) - * [Specificity and efficiency](#specificity-and-efficiency) - * [Iteratively building a rule](#iteratively-building-a-rule) - * [Adding and removing rules](#adding-and-removing-rules) - * [Rule examples](#rule-examples) -* [List of operators](#operators) - -### Building a rule - -#### Rule limitations - -Limits on the number of rules will depend on which [access level](/x-api/getting-started/about-x-api) is applied to your [Project](/resources/fundamentals/projects). - -You can see how these limits apply via the [filtered stream introduction](/x-api/posts/filtered-stream) page. - -#### Operator types: standalone and conjunction-required - -**Standalone operators** can be used alone or together with any other operators (including those that require conjunction). - -For example, the following rule will work because it uses the `#hashtag` operator, which is standalone: - -`#xapiv2` - -**Conjunction required** operators cannot be used by themselves in a rule; they can only be used when at least one standalone operator is included in the rule. This is because using these operators alone would be far too general, and would match on an extremely high volume of Posts. - -For example, the following rules are not supported since they contain only conjunction required operators: - -`has:media` - -`has:links OR is:retweet` - -If we add in a standalone operator, such as the phrase `"X data"`, the rule would then work properly.  - -`"X data" has:mentions (has:media OR has:links)` - -#### Boolean operators and grouping - -If you would like to string together multiple operators in a single rule, you have the following tools at your disposal: - -| | | -| :--- | :--- | -| **AND logic** | Successive operators **with a space between them** will result in boolean "AND" logic, meaning that Posts will match only if both conditions are met. For example, `snow day #NoSchool` will match Posts containing the terms snow and day and the hashtag #NoSchool. | -| **OR logic** | Successive operators with OR between them will result in OR logic, meaning that Posts will match if either condition is met. For example, specifying `grumpy OR cat OR #meme` will match any Posts containing at least the terms grumpy or cat, or the hashtag #meme. | -| **NOT logic, negation** | Prepend a dash (-) to a keyword (or any operator) to negate it (NOT). For example, `cat #meme -grumpy` will match Posts containing the hashtag #meme and the term cat, but only if they do not contain the term grumpy. One common rule clause is `-is:retweet`, which will not match on Retweets, thus matching only on original Posts, Quote Tweets, and replies. All operators can be negated, but negated operators cannot be used alone. | -| **Grouping** | You can use parentheses to group operators together. For example, `(grumpy cat) OR (#meme has:images)` will return either Posts containing the terms grumpy and cat, or Posts with images containing the hashtag #meme. Note that ANDs are applied first, then ORs are applied. | - - -**A note on negations** - -All operators can be negated except for `sample:`, and `-is:nullcast` must always be negated. Negated operators cannot be used alone. - -Do not negate a set of operators grouped together in a set of parentheses. Instead, negate each individual operator. - -For example, instead of using `skiing -(snow OR day OR noschool)`, we suggest that you use `skiing -snow -day -noschool`.  - - -#### Order of operations - -When combining AND and OR functionality, the following order of operations will dictate how your rule is evaluated. - -1. Operators connected by AND logic are combined first -2. Then, operators connected with OR logic are applied - - - -For example: - -* `apple OR iphone ipad` would be evaluated as `apple OR (iphone ipad)` -* `ipad iphone OR android` would be evaluated as `(iphone ipad) OR android` - - - -To eliminate uncertainty and ensure that your rule is evaluated as intended, group terms together with parentheses where appropriate.  - -For example: - -* `(apple OR iphone) ipad` -* `iphone (ipad OR android)` - -#### Punctuation, diacritics, and case sensitivity - -If you specify a keyword or hashtag rule with character accents or diacritics, it will match Posts that contain the exact word with proper accents or diacritics, but not those that have the proper letters, but without the accent or diacritic.  - -For example, rules with the keyword `diacrítica` or hashtag `#cumpleaños` will match Posts that contain _diacrítica_ or _#cumpleaños_ because they include the accent or diacritic. However, these rules will not match Posts that contain _Diacritica_ or _#cumpleanos_ without the tilde í or eñe. - - -Characters with accents or diacritics are treated the same as normal characters and are not treated as word boundaries. For example, a rule with the keyword _cumpleaños_ would only match Posts containing the word _cumpleaños_ and would not match Posts containing _cumplea_, _cumplean_, or _os_. - -All operators are evaluated in a case-insensitive manner. For example, the rule cat will match all of the following: _cat_, _CAT_, _Cat_. - - -The [Search Posts](/x-api/posts/search/introduction) matching behavior acts differently from filtered stream. When [building a Search Posts query](/x-api/posts/search/integrate/build-a-query), know that keywords and hashtags that include accents or diacritics will match both the term with the accents and diacritics, as well as with normal characters.  - -For example, Search Posts queries that include a keyword `Diacrítica` or hashtag `#cumpleaños` will match both _Diacrítica_ and _#cumpleaños_, as well as _Diacritica_ or _#cumpleanos_ without the tilde í or eñe. - - -#### Specificity and efficiency - -When you start to build your rule, it is important to keep a few things in mind. - -* Using broad, standalone operators for your rule such as a single keyword or #hashtag is generally not recommended since it will likely match on a massive volume of Posts. Creating a more robust rule will result in a more specific set of matching Posts, and will hopefully reduce the amount of noise in the payload that you will need to sift through to find valuable insights.  - * For example, if your rule was just the keyword `happy` you will likely get anywhere from 200,000 - 300,000 Posts per day. - * Adding more conditional operators narrows your search results, for example `(happy OR happiness) place_country:GB -birthday -is:retweet` -* Writing efficient rules is also beneficial for staying within the characters rule length restriction. The character count includes the entire rule string including spaces and operators. - * For example, the following rule is 59 characters long: `(happy OR happiness) place_country:GB -birthday -is:retweet` - -#### Quote Tweet matching behavior - -When using the filtered stream endpoints, operators will match on both the content from the original Post that was quoted, as well as the content included in the Quote Tweet. - -However, please note that the [Search Posts](/x-api/posts/search/introduction) endpoints will not match on the content from the original Post that was quoted, but will match on the Quote Tweet's content. - -#### Iteratively building a rule - -##### Test your rule early and often - -Getting a rule to return the "right" results the first time is rare. There is so much on X that may or may not be obvious at first and the rule syntax described above may be hard to match to your desired search. As you build a rule, it is important for you to periodically test it out with the stream endpoint to see what data it returns. You can also test with one of the [Search Post](/x-api/posts/search/introduction) endpoints, assuming the operators that you are using are also available via that endpoint.  - -For this section, we are going to start with the following rule and adjust it based on the results that we receive during our test:  - -`happy OR happiness` - -##### Use results to narrow the rule - -As you test the rule, you should scan the returned Posts to see if they include the data that you are expecting and hoping to receive. Starting with a broad rule and a superset of Post matches allows you to review the result and narrow the rule to filter out undesired results.   - -When we tested the example rule, we noticed that we were getting Posts in a variety of different languages. In this situation, we want to only receive Posts that are in english, so we’re going to add the `lang:` operator: - -`(happy OR happiness) lang:en` - -The test delivered a number of Posts wishing people a happy birthday, so we are going to add `-birthday` as a negated keyword operator. We also want to only receive original Posts, so we’ve added the negated `-is:retweet` operator: - -`(happy OR happiness) lang:en -birthday -is:retweet` - -##### Adjust for inclusion where needed - -If you notice that you are not receiving data that you expect and know that there are existing Posts that should return, you may need to broaden your rule by removing operators that may be filtering out the desired data.  - -For our example, we noticed that there were other Posts in our personal timeline that expressed the emotion that we are looking for and weren’t included in the test results. To ensure we have greater coverage, we are going to add the keywords, `excited` and `elated`. - -`(happy OR happiness OR excited OR elated) lang:en -birthday -is:retweet` - -##### Adjust for popular trends/bursts over the time period - -Trends come and go on X quickly. Maintaining your rule should be an active process. If you plan to use a single rule for a while, we suggest that you periodically check in on the data that you are receiving to see if you need to make any adjustments. - -In our example, we notice that we started to receive some Posts that are wishing people a “happy holidays”. Since we don’t want these Posts included in our results, we are going to add a negated `-holidays` keyword. - -`(happy OR happiness OR excited OR elated) lang:en -birthday -is:retweet -holidays` - -#### Adding and removing rules - -You will be using the [POST /2/tweets/search/stream/rules](/x-api/posts/filtered-stream#post-2-tweets-search-stream-rules) endpoint when both adding and deleting rules from your stream. - -To add one or more rule to your stream, submit an `add` JSON body with an array that contains the value parameter including the rule, and the optional `tag` parameter including free-form text that you can use to [identify which returned Posts match this rule](/x-api/posts/filtered-stream#matching-returned-posts-to-their-associated-rule).  - -For example, if you were trying to add a set of rules to your stream, your cURL command might look like this: - -```bash -curl -X POST 'https://api.x.com/2/tweets/search/stream/rules' \ --H "Content-type: application/json" \ --H "Authorization: Bearer $ACCESS_TOKEN" -d \ -'{ - "add": [ - {"value": "cat has:media", "tag": "cats with media"}, - {"value": "cat has:media -grumpy", "tag": "happy cats with media"}, - {"value": "meme", "tag": "funny things"}, - {"value": "meme has:images"} - ] -}' -``` - -Similarly, to remove one or more rules from your stream, submit a `delete` JSON body with the array of that contains the `id` parameter including the rule IDs that you would like to delete. - -For example, if you were trying to remove a set of rules from your stream, your cURL command might look like this: - -```bash -curl -X POST 'https://api.x.com/2/tweets/search/stream/rules' \ - -H "Content-type: application/json" \ - -H "Authorization: Bearer $ACCESS_TOKEN" -d \ - '{ - "delete": { - "ids": [ - "1165037377523306498", - "1165037377523306499" - ] - } - }' -``` - -We have sample code in different languages available via our [Github](https://github.com/xdevplatform/Twitter-API-v2-sample-code/tree/master/Filtered-Stream).  - -#### Rule examples - -##### Tracking a natural disaster - -The following rule matched on Posts coming from weather agencies and gauges that discuss Hurricane Harvey, which hit Houston in 2017. Notice the use of the [matching rules](/x-api/posts/filtered-stream#matching-returned-posts-to-their-associated-rule) tag, and the JSON format that you will need to use when submitting the rule to the [POST /2/tweets/search/stream/rules endpoint](/x-api/posts/filtered-stream#post-2-tweets-search-stream-rules). - -```json -{ - "value": "-is:retweet has:geo (from:NWSNHC OR from:NHC_Atlantic OR from:NWSHouston OR from:NWSSanAntonio OR from:USGS_TexasRain OR from:USGS_TexasFlood OR from:JeffLindner1)", - "tag": "theme:info has:geo original from weather agencies and gauges" -} -``` - -##### Reviewing the sentiment of a conversation - -The next rule could be used to better understand the sentiment of the conversation developing around the hashtag, _#nowplaying_, but only from Posts published within North America. - -```json -{ - "value": "#nowplaying (happy OR exciting OR excited OR favorite OR fav OR amazing OR lovely OR incredible) (place_country:US OR place_country:MX OR place_country:CA) -horrible -worst -sucks -bad -disappointing", - "tag": "#nowplaying positive" -}, -{ - "value": "#nowplaying (horrible OR worst OR sucks OR bad OR disappointing) (place_country:US OR place_country:MX OR place_country:CA) -happy -exciting -excited -favorite -fav -amazing -lovely -incredible", - "tag": "#nowplaying negative" -} -``` - -##### Find Posts that relate to a specific Post annotation - -This rule was built to search for original Posts that included an image of a pet that is not a cat, where the language identified in the Post is Japanese. To do this, we used the `context:` operator to take advantage of the [Post annotation](/x-api/fundamentals/post-annotations) functionality. We first used the [Post lookup](/x-api/posts/lookup/introduction) endpoint and the `tweet.fields=context_annotations` fields parameter to identify which domain.entity IDs we need to use in our query: - -* Posts that relate to cats return `domain` 66 (Interests and Hobbies category) with `entity` 852262932607926273 (Cats).  -* Posts that relate to pets return `domain` 65 (Interests and Hobbies Vertical) with `entity` 852262932607926273 (Pets).  -   - -Here is what the rule would look like: - -```json -{ - "value": "context:65.852262932607926273 -context:66.852262932607926273 -is:retweet has:images lang:ja", - "tag": "Japanese pets with images - no cats" -} -``` - -### Operators - -**Note:** For some operators, an alternate name, or alias, is available. - -| **Operator** | **Type** | **Description** | -|:------------------------------|:-------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `keyword` | Standalone | Matches a keyword within the body of a Post. This is a tokenized match, meaning that your keyword string will be matched against the tokenized text of the Post body. Tokenization splits words based on punctuation, symbols, and Unicode basic plane separator characters.
For example, a Post with the text “I like coca-cola” would be split into the following tokens: I, like, coca, cola. These tokens would then be compared to the keyword string used in your rule. To match strings containing punctuation (for example, coca-cola), symbol, or separator characters, you must wrap your keyword in double-quotes.

Example: `pepsi OR cola OR "coca cola"` | -| `emoji` | Standalone | Matches an emoji within the body of a Post. Similar to a keyword, emojis are a tokenized match, meaning that your emoji will be matched against the tokenized text of the Post body.

Note that if an emoji has a variant, you must wrap it in double quotes to add to a rule.

Example: `(😃 OR 😡) 😬` | -| `"exact phrase match"` | Standalone | Matches the exact phrase within the body of a Post.

Example: `("X API" OR #v2) -"filtered stream"` | -| `#` | Standalone | Matches any Post containing a recognized hashtag, if the hashtag is a recognized entity in a Post.

This operator performs an exact match, NOT a tokenized match, meaning the rule `#thanku` will match posts with the exact hashtag #thanku, but not those with the hashtag #thankunext.

Example: `#thankunext #fanart OR @arianagrande` | -| `@` | Standalone | Matches any Post that mentions the given username, if the username is a recognized entity (including the @ character).

Example: `(@XDevelopers OR @api) -@x` | -| `$` | Standalone | Matches any Post that contains the specified 'cashtag' (where the leading character of the token is the $ character).

Note that the cashtag operator relies on X's 'symbols' entity extraction to match cashtags, rather than trying to extract the cashtag from the body itself.

Example: `$twtr OR @XDevelopers -$fb` | -| `from:` | Standalone | Matches any Post from a specific user.
The value can be either the username (excluding the @ character) or the user's numeric user ID.

You can only pass a single username/ID `from:` operator.

Example: `from:XDevelopers OR from:api -from:X` | -| `to:` | Standalone | Matches any Post that is in reply to a particular user.
The value can be either the username (excluding the @ character) or the user's numeric user ID.

You can only pass a single username/ID per `to:` operator.

Example: `to:XDevelopers OR to:api -to:x` | -| `url:` | Standalone | Performs a tokenized match on any validly-formatted URL of a Post.

This operator can match on the contents of both the `url` or `expanded_url` fields. For example, a Post containing "You should check out X Developer Labs: https://t.co/c0A36SWil4" (with the short URL redirecting to https://developer.x.com) will match both the following rules:

`from:XDevelopers url:"https://developer.x.com"`
(because it will match the contents of `entities.urls.expanded_url`)

`from:XDevelopers url:"https://t.co"`
(because it will match the contents of `entities.urls.url`)

Tokens and phrases containing punctuation or special characters should be double-quoted (for example, `url:"/developer"`). Similarly, to match on a specific protocol, enclose in double-quotes (for example, `url:"https://developer.x.com"`).

You can only pass a single URL per `url:` operator. | -| `retweets_of:` | Standalone | *Available alias:* `retweets_of_user:`
Matches Posts that are Retweets of the specified user. The value can be either the username (excluding the @ character) or the user's numeric user ID.

You can only pass a single username/ID per `retweets_of:` operator.

Example: `retweets_of:XDevelopers OR retweets_of:twitterapi`
See [HERE](/x-api/users/lookup/introduction) for methods for looking up numeric X Account IDs. | -| `context:` | Standalone | Matches Posts with a specific domain id and/or domain id, entity id pair where * represents a wildcard. To learn more about this operator, please visit our page on [Post annotations](/x-api/fundamentals/post-annotations).

You can only pass a single domain/entity per `context:` operator.

`context:domain_id.entity_id`
`context:domain_id.*`
`context:*.entity_id`

Examples:
`context:10.799022225751871488`
(`domain_id.entity_id` returns Posts matching that specific domain-entity pair)

`context:47.*`
(`domain_id.*` returns Posts matching that domain ID, with any domain-entity pair)

`context:*.799022225751871488`
(`*.entity_id` returns Posts matching that entity ID, with any domain-entity pair) | -| `entity:` | Standalone | Matches Posts with a specific entity string value. To learn more about this operator, please visit our page on [annotations](/x-api/fundamentals/post-annotations).

You can only pass a single entity per `entity:` operator.

`entity:"string declaration of entity/place"`

Examples: `entity:"Michael Jordan" OR entity:"Barcelona"` | -| `conversation_id:` | Standalone | Matches Posts that share a common conversation ID. A conversation ID is set to the Post ID of a Post that started a conversation. As Replies to a Post are posted, even Replies to Replies, the `conversation_id` is added to its JSON payload.

You can only pass a single conversation ID per `conversation_id:` operator.

Example: `conversation_id:1334987486343299072 (from:XDevelopers OR from:api)` | -| `bio:` | Standalone | *Available alias:* `user_bio:`
Matches a keyword or phrase within the Post publisher's bio. This is a tokenized match within the contents of the `description` field within the [User object](/x-api/fundamentals/data-dictionary#user).

Example: `bio:developer OR bio:"data engineer" OR bio:academic` | -| `bio_name:` | Standalone | Matches a keyword within the Post publisher's user bio name. This is a tokenized match within the contents of a user's "name" field within the [User object](/x-api/fundamentals/data-dictionary#user).

Example: `bio_name:phd OR bio_name:md` | -| `bio_location:` | Standalone | *Available alias:* `user_bio_location:`
Matches Posts that are published by users whose location contains the specified keyword or phrase. This operator performs a tokenized match, similar to the normal keyword rules on the message body.

This location is part of the [User object](/x-api/fundamentals/data-dictionary#user), matches on the 'location' field, and is a non-normalized, user-generated, free-form string. It is also different from a Post's location (see `place:`).

Example: `bio_location:"big apple" OR bio_location:nyc OR bio_location:manhattan` | -| `place:` | Standalone | Matches Posts tagged with the specified location or X place ID. Multi-word place names (“New York City”, “Palo Alto”) should be enclosed in quotes.

You can only pass a single place per `place:` operator.

Note: See the [GET geo/search](https://developer.x.com/content/developer-twitter/en/docs/geo/places-near-location/api-reference/get-geo-search) standard v1.1 endpoint for how to obtain X place IDs.

Note: This operator will not match on Retweets, since Retweet's places are attached to the original Post. It will also not match on places attached to the original Post of a Quote Tweet.

Example: `place:"new york city" OR place:seattle OR place:fd70c22040963ac7` | -| `place_country:` | Standalone | Matches Posts where the country code associated with a tagged place/location matches the given ISO alpha-2 character code.

You can find a list of valid ISO codes on [Wikipedia](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).

You can only pass a single ISO code per `place_country:` operator.

Note: This operator will not match on Retweets, since Retweet's places are attached to the original Post. It will also not match on places attached to the original Post of a Quote Tweet.

Example: `place_country:US OR place_country:MX OR place_country:CA` | -| `point_radius:` | Standalone | Matches against the `place.geo.coordinates` object of the Post when present, and in X, against a place geo polygon, where the Place polygon is fully contained within the defined region.

`point_radius:[longitude latitude radius]`

- Units of radius supported are miles (mi) and kilometers (km)
- Radius must be less than 25mi
- Longitude is in the range of ±180
- Latitude is in the range of ±90
- All coordinates are in decimal degrees
- Rule arguments are contained within brackets, space delimited

You can only pass a single geo polygon per `point_radius:` operator.

Note: This operator will not match on Retweets, since Retweet's places are attached to the original Post. It will also not match on places attached to the original Post of a Quote Tweet.

Example: `point_radius:[2.355128 48.861118 16km] OR point_radius:[-41.287336 174.761070 20mi]` | -| `bounding_box:` | Standalone | *Available alias:* `geo_bounding_box:`
Matches against the place.geo.coordinates object of the Post when present, and in X, against a place geo polygon, where the place polygon is fully contained within the defined region.

`bounding_box:[west_long south_lat east_long north_lat]`

- `west_long south_lat` represent the southwest corner of the bounding box where `west_long` is the longitude of that point, and `south_lat` is the latitude.
- `east_long north_lat` represent the northeast corner of the bounding box, where `east_long` is the longitude of that point, and `north_lat` is the latitude.
- Width and height of the bounding box must be less than 25mi
- Longitude is in the range of ±180
- Latitude is in the range of ±90
- All coordinates are in decimal degrees.
- Rule arguments are contained within brackets, space delimited.

You can only pass a single geo polygon per `bounding_box:` operator.

Note: This operator will not match on Retweets, since Retweet's places are attached to the original Post. It will also not match on places attached to the original Post of a Quote Tweet.

Example: `bounding_box:[-105.301758 39.964069 -105.178505 40.09455]` | -| `is:retweet` | Conjunction required | Matches on Retweets that match the rest of the specified rule. This operator looks only for true Retweets (for example, those generated using the Retweet button). Quote Tweets will not be matched by this operator.

Example: `data @XDevelopers -is:retweet` | -| `is:reply` | Conjunction required | Deliver only explicit replies that match a rule. Can also be negated to exclude replies that match a rule from delivery.

When used with the filtered stream, this operator matches on replies to an original Post, replies in quoted Posts, and replies in Retweets.

Example: `from:XDevelopers is:reply` | -| `is:quote` | Conjunction required | Returns all Quote Tweets, also known as Posts with comments.

Example: `"sentiment analysis" is:quote` | -| `is:verified` | Conjunction required | Deliver only Posts whose authors are verified by X.

Example: `#nowplaying is:verified` | -| `-is:nullcast` | Conjunction required | Removes Posts created for promotion only on ads.twitter.com that have a `source:"Twitter for Advertisers (legacy)"` or `source:"Twitter for Advertisers".`
This operator must be negated.

For more info on Nullcasted Posts, see our page on [Post availability](https://developer.x.com/content/developer-twitter/en/docs/twitter-api/v1/tweets/post-and-engage/guides/tweet-availability).

Example: `"mobile games" -is:nullcast` | -| `has:hashtags` | Conjunction required | Matches Posts that contain at least one hashtag.

Example: `from:XDevelopers -has:hashtags` | -| `has:cashtags` | Conjunction required | Matches Posts that contain a cashtag symbol (with a leading '$' character. For example, `$tag`).

Example: `#stonks has:cashtags` | -| `has:links` | Conjunction required | This operator matches Posts which contain links and media in the Post body.

Example: `from:XDevelopers announcement has:links` | -| `has:mentions` | Conjunction required | Matches Posts that mention another X user.

Example: `#nowplaying has:mentions` | -| `has:media` | Conjunction required | *Available alias:* `has:media_link`
Matches Posts that contain a media object, such as a photo, GIF, or video, as determined by X. This will not match on media created with Periscope, or Posts with links to other media hosting sites.

Example: `(kittens OR puppies) has:media` | -| `has:images` | Conjunction required | Matches Posts that contain a recognized URL to an image.

Example: `#meme has:images` | -| `has:video_link` | Conjunction required | *Available alias:* `has:videos`
Matches Posts that contain native X videos, uploaded directly to X. This will not match on videos created with Periscope, or Posts with links to other video hosting sites.

Example: `#icebucketchallenge has:video_link` | -| `has:geo` | Conjunction required | Matches Posts that have Post-specific geolocation data provided by the X user. This can be either a location in the form of a X place, with the corresponding display name, geo polygon, and other fields, or in rare cases, a geo lat-long coordinate.

Note: Operators matching on place (Post geo) will only include matches from original posts. Retweets do not contain any place data.

Example: `recommend #paris has:geo -bakery` | -| `sample:` | Conjunction required | Returns a random percent sample of Posts that match a rule rather than the entire set of Posts. The percent value must be represented by an integer between 1 and 100 (for example, `sample:10` will return a random 10% sample).

This operator first reduces the scope of the stream to the percentage you specified, then the rule/filter is applied to that sampled subset. In other words, if you are using, for example, `sample:10`, each Post will have a 10% chance of being in the sample.

This operator applies to the entire rule and requires all OR'd terms to be grouped.

Example: `#nowplaying @spotify sample:15` | -| `lang:` | Conjunction required | Matches Posts that have been classified by X as being of a particular language (if, and only if, the post has been classified). It is important to note that each Post is currently only classified as being of one language, so AND’ing together multiple languages will yield no results.

You can only pass a single BCP 47 language identifier per `lang:` operator.

Note: if no language classification can be made the provided result is 'und' (for undefined).

Example: `recommend #paris lang:en`

The list below represents the currently supported languages and their corresponding BCP 47 language identifier:

| Language | BCP 47 |
|-|-|
| Amharic | `am` |
| Arabic | `ar` |
| Armenian | `hy` |
| Basque | `eu` |
| Bengali | `bn` |
| Bosnian | `bs` |
| Bulgarian | `bg` |
| Burmese | `my` |
| Croatian | `hr` |
| Catalan | `ca` |
| Czech | `cs` |
| Danish | `da` |
| Dutch | `nl` |
| English | `en` |
| Estonian | `et` |
| Finnish | `fi` |
| French | `fr` |
| Georgian | `ka` |
| German | `de` |
| Greek | `el` |
| Gujarati | `gu` |
| Haitian Creole | `ht` |
| Hebrew | `iw` |
| Hindi | `hi` |
| Latinized Hindi | `hi-Latn` |
| Hungarian | `hu` |
| Icelandic | `is` |
| Indonesian | `in` |
| Italian | `it` |
| Japanese | `ja` |
| Kannada | `kn` |
| Khmer | `km` |
| Korean | `ko` |
| Lao | `lo` |
| Latvian | `lv` |
| Lithuanian | `lt` |
| Malayalam | `ml` |
| Maldivian | `dv` |
| Marathi | `mr` |
| Nepali | `ne` |
| Norwegian | `no` |
| Oriya | `or` |
| Panjabi | `pa` |
| Pashto | `ps` |
| Persian | `fa` |
| Polish | `pl` |
| Portuguese | `pt` |
| Romanian | `ro` |
| Russian | `ru` |
| Serbian | `sr` |
| Simplified Chinese | `zh-CN` |
| Sindhi | `sd` |
| Sinhala | `si` |
| Slovak | `sk` |
| Slovenian | `sl` |
| Sorani Kurdish | `ckb` |
| Spanish | `es` |
| Swedish | `sv` |
| Tagalog | `tl` |
| Tamil | `ta` |
| Telugu | `te` |
| Thai | `th` |
| Tibetan | `bo` |
| Traditional Chinese | `zh-TW` |
| Turkish | `tr` |
| Ukrainian | `uk` |
| Urdu | `ur` |
| Uyghur | `ug` |
| Vietnamese | `vi` |
| Welsh | `cy` | | -| `followers_count:` | | Matches Posts when the author has a followers count within the given range.
If a single number is specified, any number equal to or higher will match.

Example: `followers_count:500`

Additionally, a range can be specified to match any number in the given range.

Example: `followers_count:1000..10000` | -| `tweets_count:` | | *Available alias:* `statuses_count:`
Matches Posts when the author has posted a number of Posts that falls within the given range.
If a single number is specified, any number equal to or higher will match.

Example: `tweets_count:1000`

Additionally, a range can be specified to match any number in the given range.

Example: `tweets_count:1000..10000` | -| `following_count:` | | *Available alias:* `friends_count:`
Matches Posts when the author has a friends count (the number of users they follow) that falls within the given range.
If a single number is specified, any number equal to or higher will match.

Example: `following_count:500`

Additionally, a range can be specified to match any number in the given range.

Example: `following_count:1000..10000` | -| `listed_count:` | | *Available alias:* `user_in_lists_count:`
Matches Posts when the author is included in the specified number of Lists.
If a single number is specified, any number equal to or higher will match.

Example: `listed_count:10`

Additionally, a range can be specified to match any number in the given range.

Example: `listed_count:10..100` | -| `url_title:` | | *Available alias:* `within_url_title:`
Performs a keyword/phrase match on the expanded URL HTML title metadata.

Example: `url_title:snow` | -| `url_description:` | | *Available alias:* `within_url_description:`
Performs a keyword/phrase match on the expanded page description metadata.

Example: `url_description:weather` | -| `url_contains:` | | Matches Posts with URLs that literally contain the given phrase or keyword. To search for patterns with punctuation in them (i.e., google.com) enclose the search term in quotes.
NOTE: This will match against the expanded URL as well.

Example: `url_contains:photos` | -| `source:` | | Matches any Post generated by the given source application. The value must be either the name of the application or the application's URL. Cannot be used alone.

Example: `source:"X for iPhone"`

Note: As an X app developer, Posts created programmatically by your application will have the source of your application Name and Website URL set in your [app settings](/resources/fundamentals/developer-apps#app-management). | -| `in_reply_to_tweet_id:` | | *Available alias:* `in_reply_to_status_id:`
Deliver only explicit Replies to the specified Post.

Example: `in_reply_to_tweet_id:1539382664746020864` | +--- +title: Build a rule +sidebarTitle: Build a rule +--- + +## Building rules for filtered stream + +The filtered stream endpoints deliver filtered Posts to you that match on a set of rules that are applied to the stream. Rules are made up of operators that are used to match on a variety of Post attributes. + +Multiple rules can be applied to a stream using the [POST /tweets/search/stream/rules](/x-api/posts/filtered-stream#post-2-tweets-search-stream-rules) endpoint. Once you’ve added rules and connect to your stream using the [GET /tweets/search/stream](/x-api/posts/filtered-stream#get-2-tweets-search-stream) endpoint, only those Posts that match your rules will be delivered through a persistent streaming connection. You do not need to disconnect from your stream to add or remove rules.  + +### Table of contents + +* [Building a rule](#building-a-rule) + * [Rule limitations](#rule-limitations) + * [Operator availability](#operator-availability) + * [Operator types: standalone and conjunction-required](#operator-types-standalone-and-conjunction-required) + * [Boolean operators and grouping](#boolean-operators-and-grouping) + * [Order of operations](#order-of-operations) + * [Punctuation, diacritics, and case sensitivity](#punctuation-diacritics-and-case-sensitivity) + * [Specificity and efficiency](#specificity-and-efficiency) + * [Iteratively building a rule](#iteratively-building-a-rule) + * [Adding and removing rules](#adding-and-removing-rules) + * [Rule examples](#rule-examples) +* [List of operators](#operators) + +### Building a rule + +#### Rule limitations + +Limits on the number of rules will depend on which [access level](/x-api/getting-started/about-x-api) is applied to your [Project](/resources/fundamentals/projects). + +You can see how these limits apply via the [filtered stream introduction](/x-api/posts/filtered-stream) page. + +#### Operator types: standalone and conjunction-required + +**Standalone operators** can be used alone or together with any other operators (including those that require conjunction). + +For example, the following rule will work because it uses the `#hashtag` operator, which is standalone: + +`#xapiv2` + +**Conjunction required** operators cannot be used by themselves in a rule; they can only be used when at least one standalone operator is included in the rule. This is because using these operators alone would be far too general, and would match on an extremely high volume of Posts. + +For example, the following rules are not supported since they contain only conjunction required operators: + +`has:media` + +`has:links OR is:retweet` + +If we add in a standalone operator, such as the phrase `"X data"`, the rule would then work properly.  + +`"X data" has:mentions (has:media OR has:links)` + +#### Boolean operators and grouping + +If you would like to string together multiple operators in a single rule, you have the following tools at your disposal: + +| | | +| :--- | :--- | +| **AND logic** | Successive operators **with a space between them** will result in boolean "AND" logic, meaning that Posts will match only if both conditions are met. For example, `snow day #NoSchool` will match Posts containing the terms snow and day and the hashtag #NoSchool. | +| **OR logic** | Successive operators with OR between them will result in OR logic, meaning that Posts will match if either condition is met. For example, specifying `grumpy OR cat OR #meme` will match any Posts containing at least the terms grumpy or cat, or the hashtag #meme. | +| **NOT logic, negation** | Prepend a dash (-) to a keyword (or any operator) to negate it (NOT). For example, `cat #meme -grumpy` will match Posts containing the hashtag #meme and the term cat, but only if they do not contain the term grumpy. One common rule clause is `-is:retweet`, which will not match on Retweets, thus matching only on original Posts, Quote Tweets, and replies. All operators can be negated, but negated operators cannot be used alone. | +| **Grouping** | You can use parentheses to group operators together. For example, `(grumpy cat) OR (#meme has:images)` will return either Posts containing the terms grumpy and cat, or Posts with images containing the hashtag #meme. Note that ANDs are applied first, then ORs are applied. | + + +**A note on negations** + +All operators can be negated except for `sample:`, and `-is:nullcast` must always be negated. Negated operators cannot be used alone. + +Do not negate a set of operators grouped together in a set of parentheses. Instead, negate each individual operator. + +For example, instead of using `skiing -(snow OR day OR noschool)`, we suggest that you use `skiing -snow -day -noschool`.  + + +#### Order of operations + +When combining AND and OR functionality, the following order of operations will dictate how your rule is evaluated. + +1. Operators connected by AND logic are combined first +2. Then, operators connected with OR logic are applied + + + +For example: + +* `apple OR iphone ipad` would be evaluated as `apple OR (iphone ipad)` +* `ipad iphone OR android` would be evaluated as `(iphone ipad) OR android` + + + +To eliminate uncertainty and ensure that your rule is evaluated as intended, group terms together with parentheses where appropriate.  + +For example: + +* `(apple OR iphone) ipad` +* `iphone (ipad OR android)` + +#### Punctuation, diacritics, and case sensitivity + +If you specify a keyword or hashtag rule with character accents or diacritics, it will match Posts that contain the exact word with proper accents or diacritics, but not those that have the proper letters, but without the accent or diacritic.  + +For example, rules with the keyword `diacrítica` or hashtag `#cumpleaños` will match Posts that contain _diacrítica_ or _#cumpleaños_ because they include the accent or diacritic. However, these rules will not match Posts that contain _Diacritica_ or _#cumpleanos_ without the tilde í or eñe. + + +Characters with accents or diacritics are treated the same as normal characters and are not treated as word boundaries. For example, a rule with the keyword _cumpleaños_ would only match Posts containing the word _cumpleaños_ and would not match Posts containing _cumplea_, _cumplean_, or _os_. + +All operators are evaluated in a case-insensitive manner. For example, the rule cat will match all of the following: _cat_, _CAT_, _Cat_. + + +The [Search Posts](/x-api/posts/search/introduction) matching behavior acts differently from filtered stream. When [building a Search Posts query](/x-api/posts/search/integrate/build-a-query), know that keywords and hashtags that include accents or diacritics will match both the term with the accents and diacritics, as well as with normal characters.  + +For example, Search Posts queries that include a keyword `Diacrítica` or hashtag `#cumpleaños` will match both _Diacrítica_ and _#cumpleaños_, as well as _Diacritica_ or _#cumpleanos_ without the tilde í or eñe. + + +#### Specificity and efficiency + +When you start to build your rule, it is important to keep a few things in mind. + +* Using broad, standalone operators for your rule such as a single keyword or #hashtag is generally not recommended since it will likely match on a massive volume of Posts. Creating a more robust rule will result in a more specific set of matching Posts, and will hopefully reduce the amount of noise in the payload that you will need to sift through to find valuable insights.  + * For example, if your rule was just the keyword `happy` you will likely get anywhere from 200,000 - 300,000 Posts per day. + * Adding more conditional operators narrows your search results, for example `(happy OR happiness) place_country:GB -birthday -is:retweet` +* Writing efficient rules is also beneficial for staying within the characters rule length restriction. The character count includes the entire rule string including spaces and operators. + * For example, the following rule is 59 characters long: `(happy OR happiness) place_country:GB -birthday -is:retweet` + +#### Quote Tweet matching behavior + +When using the filtered stream endpoints, operators will match on both the content from the original Post that was quoted, as well as the content included in the Quote Tweet. + +However, please note that the [Search Posts](/x-api/posts/search/introduction) endpoints will not match on the content from the original Post that was quoted, but will match on the Quote Tweet's content. + +#### Iteratively building a rule + +##### Test your rule early and often + +Getting a rule to return the "right" results the first time is rare. There is so much on X that may or may not be obvious at first and the rule syntax described above may be hard to match to your desired search. As you build a rule, it is important for you to periodically test it out with the stream endpoint to see what data it returns. You can also test with one of the [Search Post](/x-api/posts/search/introduction) endpoints, assuming the operators that you are using are also available via that endpoint.  + +For this section, we are going to start with the following rule and adjust it based on the results that we receive during our test:  + +`happy OR happiness` + +##### Use results to narrow the rule + +As you test the rule, you should scan the returned Posts to see if they include the data that you are expecting and hoping to receive. Starting with a broad rule and a superset of Post matches allows you to review the result and narrow the rule to filter out undesired results.   + +When we tested the example rule, we noticed that we were getting Posts in a variety of different languages. In this situation, we want to only receive Posts that are in english, so we’re going to add the `lang:` operator: + +`(happy OR happiness) lang:en` + +The test delivered a number of Posts wishing people a happy birthday, so we are going to add `-birthday` as a negated keyword operator. We also want to only receive original Posts, so we’ve added the negated `-is:retweet` operator: + +`(happy OR happiness) lang:en -birthday -is:retweet` + +##### Adjust for inclusion where needed + +If you notice that you are not receiving data that you expect and know that there are existing Posts that should return, you may need to broaden your rule by removing operators that may be filtering out the desired data.  + +For our example, we noticed that there were other Posts in our personal timeline that expressed the emotion that we are looking for and weren’t included in the test results. To ensure we have greater coverage, we are going to add the keywords, `excited` and `elated`. + +`(happy OR happiness OR excited OR elated) lang:en -birthday -is:retweet` + +##### Adjust for popular trends/bursts over the time period + +Trends come and go on X quickly. Maintaining your rule should be an active process. If you plan to use a single rule for a while, we suggest that you periodically check in on the data that you are receiving to see if you need to make any adjustments. + +In our example, we notice that we started to receive some Posts that are wishing people a “happy holidays”. Since we don’t want these Posts included in our results, we are going to add a negated `-holidays` keyword. + +`(happy OR happiness OR excited OR elated) lang:en -birthday -is:retweet -holidays` + +#### Adding and removing rules + +You will be using the [POST /2/tweets/search/stream/rules](/x-api/posts/filtered-stream#post-2-tweets-search-stream-rules) endpoint when both adding and deleting rules from your stream. + +To add one or more rule to your stream, submit an `add` JSON body with an array that contains the value parameter including the rule, and the optional `tag` parameter including free-form text that you can use to [identify which returned Posts match this rule](/x-api/posts/filtered-stream#matching-returned-posts-to-their-associated-rule).  + +For example, if you were trying to add a set of rules to your stream, your cURL command might look like this: + +```bash +curl -X POST 'https://api.x.com/2/tweets/search/stream/rules' \ +-H "Content-type: application/json" \ +-H "Authorization: Bearer $ACCESS_TOKEN" -d \ +'{ + "add": [ + {"value": "cat has:media", "tag": "cats with media"}, + {"value": "cat has:media -grumpy", "tag": "happy cats with media"}, + {"value": "meme", "tag": "funny things"}, + {"value": "meme has:images"} + ] +}' +``` + +Similarly, to remove one or more rules from your stream, submit a `delete` JSON body with the array of that contains the `id` parameter including the rule IDs that you would like to delete. + +For example, if you were trying to remove a set of rules from your stream, your cURL command might look like this: + +```bash +curl -X POST 'https://api.x.com/2/tweets/search/stream/rules' \ + -H "Content-type: application/json" \ + -H "Authorization: Bearer $ACCESS_TOKEN" -d \ + '{ + "delete": { + "ids": [ + "1165037377523306498", + "1165037377523306499" + ] + } + }' +``` + +We have sample code in different languages available via our [Github](https://github.com/xdevplatform/Twitter-API-v2-sample-code/tree/master/Filtered-Stream).  + +#### Rule examples + +##### Tracking a natural disaster + +The following rule matched on Posts coming from weather agencies and gauges that discuss Hurricane Harvey, which hit Houston in 2017. Notice the use of the [matching rules](/x-api/posts/filtered-stream#matching-returned-posts-to-their-associated-rule) tag, and the JSON format that you will need to use when submitting the rule to the [POST /2/tweets/search/stream/rules endpoint](/x-api/posts/filtered-stream#post-2-tweets-search-stream-rules). + +```json +{ + "value": "-is:retweet has:geo (from:NWSNHC OR from:NHC_Atlantic OR from:NWSHouston OR from:NWSSanAntonio OR from:USGS_TexasRain OR from:USGS_TexasFlood OR from:JeffLindner1)", + "tag": "theme:info has:geo original from weather agencies and gauges" +} +``` + +##### Reviewing the sentiment of a conversation + +The next rule could be used to better understand the sentiment of the conversation developing around the hashtag, _#nowplaying_, but only from Posts published within North America. + +```json +{ + "value": "#nowplaying (happy OR exciting OR excited OR favorite OR fav OR amazing OR lovely OR incredible) (place_country:US OR place_country:MX OR place_country:CA) -horrible -worst -sucks -bad -disappointing", + "tag": "#nowplaying positive" +}, +{ + "value": "#nowplaying (horrible OR worst OR sucks OR bad OR disappointing) (place_country:US OR place_country:MX OR place_country:CA) -happy -exciting -excited -favorite -fav -amazing -lovely -incredible", + "tag": "#nowplaying negative" +} +``` + +##### Find Posts that relate to a specific Post annotation + +This rule was built to search for original Posts that included an image of a pet that is not a cat, where the language identified in the Post is Japanese. To do this, we used the `context:` operator to take advantage of the [Post annotation](/x-api/fundamentals/post-annotations) functionality. We first used the [Post lookup](/x-api/posts/lookup/introduction) endpoint and the `tweet.fields=context_annotations` fields parameter to identify which domain.entity IDs we need to use in our query: + +* Posts that relate to cats return `domain` 66 (Interests and Hobbies category) with `entity` 852262932607926273 (Cats).  +* Posts that relate to pets return `domain` 65 (Interests and Hobbies Vertical) with `entity` 852262932607926273 (Pets).  +   + +Here is what the rule would look like: + +```json +{ + "value": "context:65.852262932607926273 -context:66.852262932607926273 -is:retweet has:images lang:ja", + "tag": "Japanese pets with images - no cats" +} +``` + +### Operators + +**Note:** For some operators, an alternate name, or alias, is available. + +| **Operator** | **Type** | **Description** | +|:------------------------------|:-------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `keyword` | Standalone | Matches a keyword within the body of a Post. This is a tokenized match, meaning that your keyword string will be matched against the tokenized text of the Post body. Tokenization splits words based on punctuation, symbols, and Unicode basic plane separator characters.
For example, a Post with the text “I like coca-cola” would be split into the following tokens: I, like, coca, cola. These tokens would then be compared to the keyword string used in your rule. To match strings containing punctuation (for example, coca-cola), symbol, or separator characters, you must wrap your keyword in double-quotes.

Example: `pepsi OR cola OR "coca cola"` | +| `emoji` | Standalone | Matches an emoji within the body of a Post. Similar to a keyword, emojis are a tokenized match, meaning that your emoji will be matched against the tokenized text of the Post body.

Note that if an emoji has a variant, you must wrap it in double quotes to add to a rule.

Example: `(😃 OR 😡) 😬` | +| `"exact phrase match"` | Standalone | Matches the exact phrase within the body of a Post.

Example: `("X API" OR #v2) -"filtered stream"` | +| `#` | Standalone | Matches any Post containing a recognized hashtag, if the hashtag is a recognized entity in a Post.

This operator performs an exact match, NOT a tokenized match, meaning the rule `#thanku` will match posts with the exact hashtag #thanku, but not those with the hashtag #thankunext.

Example: `#thankunext #fanart OR @arianagrande` | +| `@` | Standalone | Matches any Post that mentions the given username, if the username is a recognized entity (including the @ character).

Example: `(@XDevelopers OR @api) -@x` | +| `$` | Standalone | Matches any Post that contains the specified 'cashtag' (where the leading character of the token is the $ character).

Note that the cashtag operator relies on X's 'symbols' entity extraction to match cashtags, rather than trying to extract the cashtag from the body itself.

Example: `$twtr OR @XDevelopers -$fb` | +| `from:` | Standalone | Matches any Post from a specific user.
The value can be either the username (excluding the @ character) or the user's numeric user ID.

You can only pass a single username/ID `from:` operator.

Example: `from:XDevelopers OR from:api -from:X` | +| `to:` | Standalone | Matches any Post that is in reply to a particular user.
The value can be either the username (excluding the @ character) or the user's numeric user ID.

You can only pass a single username/ID per `to:` operator.

Example: `to:XDevelopers OR to:api -to:x` | +| `url:` | Standalone | Performs a tokenized match on any validly-formatted URL of a Post.

This operator can match on the contents of both the `url` or `expanded_url` fields. For example, a Post containing "You should check out X Developer Labs: https://t.co/c0A36SWil4" (with the short URL redirecting to https://developer.x.com) will match both the following rules:

`from:XDevelopers url:"https://developer.x.com"`
(because it will match the contents of `entities.urls.expanded_url`)

`from:XDevelopers url:"https://t.co"`
(because it will match the contents of `entities.urls.url`)

Tokens and phrases containing punctuation or special characters should be double-quoted (for example, `url:"/developer"`). Similarly, to match on a specific protocol, enclose in double-quotes (for example, `url:"https://developer.x.com"`).

You can only pass a single URL per `url:` operator. | +| `retweets_of:` | Standalone | *Available alias:* `retweets_of_user:`
Matches Posts that are Retweets of the specified user. The value can be either the username (excluding the @ character) or the user's numeric user ID.

You can only pass a single username/ID per `retweets_of:` operator.

Example: `retweets_of:XDevelopers OR retweets_of:twitterapi`
See [HERE](/x-api/users/lookup/introduction) for methods for looking up numeric X Account IDs. | +| `context:` | Standalone | Matches Posts with a specific domain id and/or domain id, entity id pair where * represents a wildcard. To learn more about this operator, please visit our page on [Post annotations](/x-api/fundamentals/post-annotations).

You can only pass a single domain/entity per `context:` operator.

`context:domain_id.entity_id`
`context:domain_id.*`
`context:*.entity_id`

Examples:
`context:10.799022225751871488`
(`domain_id.entity_id` returns Posts matching that specific domain-entity pair)

`context:47.*`
(`domain_id.*` returns Posts matching that domain ID, with any domain-entity pair)

`context:*.799022225751871488`
(`*.entity_id` returns Posts matching that entity ID, with any domain-entity pair) | +| `entity:` | Standalone | Matches Posts with a specific entity string value. To learn more about this operator, please visit our page on [annotations](/x-api/fundamentals/post-annotations).

You can only pass a single entity per `entity:` operator.

`entity:"string declaration of entity/place"`

Examples: `entity:"Michael Jordan" OR entity:"Barcelona"` | +| `conversation_id:` | Standalone | Matches Posts that share a common conversation ID. A conversation ID is set to the Post ID of a Post that started a conversation. As Replies to a Post are posted, even Replies to Replies, the `conversation_id` is added to its JSON payload.

You can only pass a single conversation ID per `conversation_id:` operator.

Example: `conversation_id:1334987486343299072 (from:XDevelopers OR from:api)` | +| `bio:` | Standalone | *Available alias:* `user_bio:`
Matches a keyword or phrase within the Post publisher's bio. This is a tokenized match within the contents of the `description` field within the [User object](/x-api/fundamentals/data-dictionary#user).

Example: `bio:developer OR bio:"data engineer" OR bio:academic` | +| `bio_name:` | Standalone | Matches a keyword within the Post publisher's user bio name. This is a tokenized match within the contents of a user's "name" field within the [User object](/x-api/fundamentals/data-dictionary#user).

Example: `bio_name:phd OR bio_name:md` | +| `bio_location:` | Standalone | *Available alias:* `user_bio_location:`
Matches Posts that are published by users whose location contains the specified keyword or phrase. This operator performs a tokenized match, similar to the normal keyword rules on the message body.

This location is part of the [User object](/x-api/fundamentals/data-dictionary#user), matches on the 'location' field, and is a non-normalized, user-generated, free-form string. It is also different from a Post's location (see `place:`).

Example: `bio_location:"big apple" OR bio_location:nyc OR bio_location:manhattan` | +| `place:` | Standalone | Matches Posts tagged with the specified location or X place ID. Multi-word place names (“New York City”, “Palo Alto”) should be enclosed in quotes.

You can only pass a single place per `place:` operator.

Note: See the [GET geo/search](https://developer.x.com/content/developer-twitter/en/docs/geo/places-near-location/api-reference/get-geo-search) standard v1.1 endpoint for how to obtain X place IDs.

Note: This operator will not match on Retweets, since Retweet's places are attached to the original Post. It will also not match on places attached to the original Post of a Quote Tweet.

Example: `place:"new york city" OR place:seattle OR place:fd70c22040963ac7` | +| `place_country:` | Standalone | Matches Posts where the country code associated with a tagged place/location matches the given ISO alpha-2 character code.

You can find a list of valid ISO codes on [Wikipedia](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).

You can only pass a single ISO code per `place_country:` operator.

Note: This operator will not match on Retweets, since Retweet's places are attached to the original Post. It will also not match on places attached to the original Post of a Quote Tweet.

Example: `place_country:US OR place_country:MX OR place_country:CA` | +| `point_radius:` | Standalone | Matches against the `place.geo.coordinates` object of the Post when present, and in X, against a place geo polygon, where the Place polygon is fully contained within the defined region.

`point_radius:[longitude latitude radius]`

- Units of radius supported are miles (mi) and kilometers (km)
- Radius must be less than 25mi
- Longitude is in the range of ±180
- Latitude is in the range of ±90
- All coordinates are in decimal degrees
- Rule arguments are contained within brackets, space delimited

You can only pass a single geo polygon per `point_radius:` operator.

Note: This operator will not match on Retweets, since Retweet's places are attached to the original Post. It will also not match on places attached to the original Post of a Quote Tweet.

Example: `point_radius:[2.355128 48.861118 16km] OR point_radius:[-41.287336 174.761070 20mi]` | +| `bounding_box:` | Standalone | *Available alias:* `geo_bounding_box:`
Matches against the place.geo.coordinates object of the Post when present, and in X, against a place geo polygon, where the place polygon is fully contained within the defined region.

`bounding_box:[west_long south_lat east_long north_lat]`

- `west_long south_lat` represent the southwest corner of the bounding box where `west_long` is the longitude of that point, and `south_lat` is the latitude.
- `east_long north_lat` represent the northeast corner of the bounding box, where `east_long` is the longitude of that point, and `north_lat` is the latitude.
- Width and height of the bounding box must be less than 25mi
- Longitude is in the range of ±180
- Latitude is in the range of ±90
- All coordinates are in decimal degrees.
- Rule arguments are contained within brackets, space delimited.

You can only pass a single geo polygon per `bounding_box:` operator.

Note: This operator will not match on Retweets, since Retweet's places are attached to the original Post. It will also not match on places attached to the original Post of a Quote Tweet.

Example: `bounding_box:[-105.301758 39.964069 -105.178505 40.09455]` | +| `is:retweet` | Conjunction required | Matches on Retweets that match the rest of the specified rule. This operator looks only for true Retweets (for example, those generated using the Retweet button). Quote Tweets will not be matched by this operator.

Example: `data @XDevelopers -is:retweet` | +| `is:reply` | Conjunction required | Deliver only explicit replies that match a rule. Can also be negated to exclude replies that match a rule from delivery.

When used with the filtered stream, this operator matches on replies to an original Post, replies in quoted Posts, and replies in Retweets.

Example: `from:XDevelopers is:reply` | +| `is:quote` | Conjunction required | Returns all Quote Tweets, also known as Posts with comments.

Example: `"sentiment analysis" is:quote` | +| `is:verified` | Conjunction required | Deliver only Posts whose authors are verified by X.

Example: `#nowplaying is:verified` | +| `-is:nullcast` | Conjunction required | Removes Posts created for promotion only on ads.twitter.com that have a `source:"Twitter for Advertisers (legacy)"` or `source:"Twitter for Advertisers".`
This operator must be negated.

For more info on Nullcasted Posts, see our page on [Post availability](https://developer.x.com/content/developer-twitter/en/docs/twitter-api/v1/tweets/post-and-engage/guides/tweet-availability).

Example: `"mobile games" -is:nullcast` | +| `has:hashtags` | Conjunction required | Matches Posts that contain at least one hashtag.

Example: `from:XDevelopers -has:hashtags` | +| `has:cashtags` | Conjunction required | Matches Posts that contain a cashtag symbol (with a leading '$' character. For example, `$tag`).

Example: `#stonks has:cashtags` | +| `has:links` | Conjunction required | This operator matches Posts which contain links and media in the Post body.

Example: `from:XDevelopers announcement has:links` | +| `has:mentions` | Conjunction required | Matches Posts that mention another X user.

Example: `#nowplaying has:mentions` | +| `has:media` | Conjunction required | *Available alias:* `has:media_link`
Matches Posts that contain a media object, such as a photo, GIF, or video, as determined by X. This will not match on media created with Periscope, or Posts with links to other media hosting sites.

Example: `(kittens OR puppies) has:media` | +| `has:images` | Conjunction required | Matches Posts that contain a recognized URL to an image.

Example: `#meme has:images` | +| `has:video_link` | Conjunction required | *Available alias:* `has:videos`
Matches Posts that contain native X videos, uploaded directly to X. This will not match on videos created with Periscope, or Posts with links to other video hosting sites.

Example: `#icebucketchallenge has:video_link` | +| `has:geo` | Conjunction required | Matches Posts that have Post-specific geolocation data provided by the X user. This can be either a location in the form of a X place, with the corresponding display name, geo polygon, and other fields, or in rare cases, a geo lat-long coordinate.

Note: Operators matching on place (Post geo) will only include matches from original posts. Retweets do not contain any place data.

Example: `recommend #paris has:geo -bakery` | +| `sample:` | Conjunction required | Returns a random percent sample of Posts that match a rule rather than the entire set of Posts. The percent value must be represented by an integer between 1 and 100 (for example, `sample:10` will return a random 10% sample).

This operator first reduces the scope of the stream to the percentage you specified, then the rule/filter is applied to that sampled subset. In other words, if you are using, for example, `sample:10`, each Post will have a 10% chance of being in the sample.

This operator applies to the entire rule and requires all OR'd terms to be grouped.

Example: `#nowplaying @spotify sample:15` | +| `lang:` | Conjunction required | Matches Posts that have been classified by X as being of a particular language (if, and only if, the post has been classified). It is important to note that each Post is currently only classified as being of one language, so AND’ing together multiple languages will yield no results.

You can only pass a single BCP 47 language identifier per `lang:` operator.

Note: if no language classification can be made the provided result is 'und' (for undefined).

Example: `recommend #paris lang:en`

The list below represents the currently supported languages and their corresponding BCP 47 language identifier:

| Language | BCP 47 |
|-|-|
| Amharic | `am` |
| Arabic | `ar` |
| Armenian | `hy` |
| Basque | `eu` |
| Bengali | `bn` |
| Bosnian | `bs` |
| Bulgarian | `bg` |
| Burmese | `my` |
| Croatian | `hr` |
| Catalan | `ca` |
| Czech | `cs` |
| Danish | `da` |
| Dutch | `nl` |
| English | `en` |
| Estonian | `et` |
| Finnish | `fi` |
| French | `fr` |
| Georgian | `ka` |
| German | `de` |
| Greek | `el` |
| Gujarati | `gu` |
| Haitian Creole | `ht` |
| Hebrew | `iw` |
| Hindi | `hi` |
| Latinized Hindi | `hi-Latn` |
| Hungarian | `hu` |
| Icelandic | `is` |
| Indonesian | `in` |
| Italian | `it` |
| Japanese | `ja` |
| Kannada | `kn` |
| Khmer | `km` |
| Korean | `ko` |
| Lao | `lo` |
| Latvian | `lv` |
| Lithuanian | `lt` |
| Malayalam | `ml` |
| Maldivian | `dv` |
| Marathi | `mr` |
| Nepali | `ne` |
| Norwegian | `no` |
| Oriya | `or` |
| Panjabi | `pa` |
| Pashto | `ps` |
| Persian | `fa` |
| Polish | `pl` |
| Portuguese | `pt` |
| Romanian | `ro` |
| Russian | `ru` |
| Serbian | `sr` |
| Simplified Chinese | `zh-CN` |
| Sindhi | `sd` |
| Sinhala | `si` |
| Slovak | `sk` |
| Slovenian | `sl` |
| Sorani Kurdish | `ckb` |
| Spanish | `es` |
| Swedish | `sv` |
| Tagalog | `tl` |
| Tamil | `ta` |
| Telugu | `te` |
| Thai | `th` |
| Tibetan | `bo` |
| Traditional Chinese | `zh-TW` |
| Turkish | `tr` |
| Ukrainian | `uk` |
| Urdu | `ur` |
| Uyghur | `ug` |
| Vietnamese | `vi` |
| Welsh | `cy` | | +| `followers_count:` | | Matches Posts when the author has a followers count within the given range.
If a single number is specified, any number equal to or higher will match.

Example: `followers_count:500`

Additionally, a range can be specified to match any number in the given range.

Example: `followers_count:1000..10000` | +| `tweets_count:` | | *Available alias:* `statuses_count:`
Matches Posts when the author has posted a number of Posts that falls within the given range.
If a single number is specified, any number equal to or higher will match.

Example: `tweets_count:1000`

Additionally, a range can be specified to match any number in the given range.

Example: `tweets_count:1000..10000` | +| `following_count:` | | *Available alias:* `friends_count:`
Matches Posts when the author has a friends count (the number of users they follow) that falls within the given range.
If a single number is specified, any number equal to or higher will match.

Example: `following_count:500`

Additionally, a range can be specified to match any number in the given range.

Example: `following_count:1000..10000` | +| `listed_count:` | | *Available alias:* `user_in_lists_count:`
Matches Posts when the author is included in the specified number of Lists.
If a single number is specified, any number equal to or higher will match.

Example: `listed_count:10`

Additionally, a range can be specified to match any number in the given range.

Example: `listed_count:10..100` | +| `url_title:` | | *Available alias:* `within_url_title:`
Performs a keyword/phrase match on the expanded URL HTML title metadata.

Example: `url_title:snow` | +| `url_description:` | | *Available alias:* `within_url_description:`
Performs a keyword/phrase match on the expanded page description metadata.

Example: `url_description:weather` | +| `url_contains:` | | Matches Posts with URLs that literally contain the given phrase or keyword. To search for patterns with punctuation in them (i.e., google.com) enclose the search term in quotes.
NOTE: This will match against the expanded URL as well.

Example: `url_contains:photos` | +| `source:` | | Matches any Post generated by the given source application. The value must be either the name of the application or the application's URL. Cannot be used alone.

Example: `source:"X for iPhone"`

Note: As an X app developer, Posts created programmatically by your application will have the source of your application Name and Website URL set in your [app settings](/resources/fundamentals/developer-apps#app-management). | +| `in_reply_to_tweet_id:` | | *Available alias:* `in_reply_to_status_id:`
Deliver only explicit Replies to the specified Post.

Example: `in_reply_to_tweet_id:1539382664746020864` | | `retweets_of_tweet_id:` | | *Available alias:* `retweets_of_status_id:`
Deliver only explicit (or native) Retweets of the specified Post. Note that the status ID used should be the ID of an original Post and not a Retweet.

Example: `retweets_of_tweet_id:1539382664746020864` | \ No newline at end of file diff --git a/x-api/posts/filtered-stream/integrate/consuming-streaming-data.mdx b/x-api/posts/filtered-stream/integrate/consuming-streaming-data.mdx index 7d45fde6c..34457dd85 100644 --- a/x-api/posts/filtered-stream/integrate/consuming-streaming-data.mdx +++ b/x-api/posts/filtered-stream/integrate/consuming-streaming-data.mdx @@ -1,95 +1,95 @@ ---- -title: Consuming streaming data -sidebarTitle: Consuming streaming data ---- - -### Building a client to consume streaming data - -When using a streaming endpoint, there are some general best practices to consider in order to optimize usage.   -  - -#### Client design - -When building a solution with the filter stream endpoint, you will need a client that can do the following: - -1. Establish an HTTPS streaming connection to the filter stream endpoint. -2. Asynchronously send POST requests to the filter stream rules endpoint to add and delete rules from the stream. -3. Handle low data volumes – Maintain the streaming connection, detecting Post objects and keep-alive signals -4. Handle high data volumes – de-couple stream ingestion from additional processing using asynchronous processes, and ensure client side buffers are flushed regularly. -5. Manage volume consumption tracking on the client side. -6. Detect stream disconnections, evaluate and reconnect to the stream automatically. -   - -#### Connecting to a streaming endpoint - -Establishing a connection to X API v2 streaming endpoints means making a very long lived HTTP request, and parsing the response incrementally. Conceptually, you can think of it as downloading an infinitely long file over HTTP.  Once a connection has been established, the X server will deliver Post events through the connection as long as the connection is open. -  - -#### Consuming data in real time - -Note that the individual fields of JSON objects are not ordered, and not all fields will be present in all circumstances. Similarly, separate activities are not delivered in sorted order, and duplicate messages may be encountered. Keep in mind that over time, new message types may be added and sent through the stream. - -Thus, your client must tolerate: - -* Fields appearing in any order -* Unexpected or missing fields -* Non-sorted Posts -* Duplicate messages -* New arbitrary message types coming down the stream at any time - -In addition to relevant Post data and requested field parameters, the following kinds of messages may be delivered on a stream connection. Note that this list may not be comprehensive—additional objects may be introduced into streams. Ensure that your parser is tolerant of unexpected message formats. -  - -#### Buffering  - -The streaming endpoints will send data to you as quickly as it becomes available, which can result in high volumes in many cases. If the X server cannot write new data to the stream right away (for example if your client is not reading fast enough, see [handling disconnections](/x-api/posts/filtered-stream#what-is-a-disconnection) for more), it will buffer the content on its end to allow your client to catch up. However, when this buffer is full, a forced disconnect will be initiated to drop the connection, and the buffered Posts will be dropped and not resent. See below for more details. - -One way to identify times where your app is falling behind is to compare the timestamp of the Posts being received with the current time, and track this over time. - -Although stream backups cannot ever be completely eliminated due to potential latency and hiccups over the public internet, they can be largely eliminated through proper configuration of your app. To minimize the occurrence of backups: - -* Ensure that your client is reading the stream fast enough. Typically you should not do any real processing work as you read the stream. Read the stream and hand the activity to another thread/process/data store to do your processing asynchronously. -* Ensure that your data center has inbound bandwidth sufficient to accomodate large sustained data volumes as well as significantly larger spikes (e.g. 5-10x normal volume). For filtered stream, the volume and corresponding bandwidth required on your end are wholly dependent on what Posts your rules are matching. -   - -#### Usage tracking and rule management - -As developers expectations around what “normal” data volume should be for their streams, we do not have a general recommendation for a specific percentage decrease/increase or period of time.  - -Consider monitoring your stream data volumes for unexpected deviations. A data volume decrease may be symptomatic of a different issue than a stream disconnection. In such a situation, a stream would still be receiving the keep-alive signal and probably some new activity data. However, a significantly decreased number of Posts should lead you to investigate whether there is anything causing the decrease in inbound data volume to your application or network, check the [status page](https://api.twitterstat.us/) for any related notices. - -To create such monitoring, you could track the number of new Posts you expect to see in a set amount of time. If a stream’s data volume falls far enough below the specified threshold, and does not recover within a set period of time, then alerts and notifications should be initiated. You may also want to monitor for a large increase in data volume, particularly if you are in the process of modifying rules in a filtered stream, or if an event occurs that produces a spike in Post activity. - -It's important to note that Posts delivered through filtered stream do count towards the total monthly Post volume, and you should track and adjust consumption in order to optimize.  If volume is high, consider adding a sample: operator to each of your rules to reduce from 100% matching to sample:50 or sample:25 when necessary. - -Additionally, we encourage you to implement measures within your app that will alert your team if the volume passes a pre-set threshold, and to possibly introduce other measures such as automated deletion of rules that are bringing in too much data, or disconnecting from the stream completely in extreme circumstances. -  - -#### Responding to system messages - -Keep-alive signals -At least every 20 seconds, the stream will send a keep-alive signal, or heartbeat in the form of an \\r\\n carriage return through the open connection to prevent your client from timing out. Your client application should be tolerant of the \\r\\n characters in the stream. - -If your client properly implements a read timeout on your HTTP library, your app will be able to rely on the HTTP protocol and your HTTP library to throw an event if no data is read within this period, and you will not need to explicitly monitor for the \\r\\n character. - -This event will typically be an exception being thrown or some other event depending on the HTTP library used. It is highly recommended to wrap your HTTP methods with error/event handlers to detect these timeouts. On timeout, your application should attempt to reconnect. - -Error messages -The v2 streaming endpoints may also deliver in stream error messages. Provided below is the basic format of these messages, along with some examples. Please note that the messages delivered could change, with new message being introduced. Client applications need to be tolerant of changing system message payloads. - -Note that error messages will link to the documentation describing how to solve the problem. - -Message format: - -```{ - "errors": [{ - "title": "operational-disconnect", - "disconnect_type": "UpstreamOperationalDisconnect", - "detail": "This stream has been disconnected upstream for operational reasons.", - "type": "https://api.x.com/2/problems/operational-disconnect" - }] -} -``` - -Note that error messages indicating a force disconnect for a full buffer may never get to your client, if the backup which caused the force disconnect prevents it from getting through. Accordingly, your app should not depend on these messages to initiate a reconnect. - +--- +title: Consuming streaming data +sidebarTitle: Consuming streaming data +--- + +### Building a client to consume streaming data + +When using a streaming endpoint, there are some general best practices to consider in order to optimize usage.   +  + +#### Client design + +When building a solution with the filter stream endpoint, you will need a client that can do the following: + +1. Establish an HTTPS streaming connection to the filter stream endpoint. +2. Asynchronously send POST requests to the filter stream rules endpoint to add and delete rules from the stream. +3. Handle low data volumes – Maintain the streaming connection, detecting Post objects and keep-alive signals +4. Handle high data volumes – de-couple stream ingestion from additional processing using asynchronous processes, and ensure client side buffers are flushed regularly. +5. Manage volume consumption tracking on the client side. +6. Detect stream disconnections, evaluate and reconnect to the stream automatically. +   + +#### Connecting to a streaming endpoint + +Establishing a connection to X API v2 streaming endpoints means making a very long lived HTTP request, and parsing the response incrementally. Conceptually, you can think of it as downloading an infinitely long file over HTTP.  Once a connection has been established, the X server will deliver Post events through the connection as long as the connection is open. +  + +#### Consuming data + +Note that the individual fields of JSON objects are not ordered, and not all fields will be present in all circumstances. Similarly, separate activities are not delivered in sorted order, and duplicate messages may be encountered. Keep in mind that over time, new message types may be added and sent through the stream. + +Thus, your client must tolerate: + +* Fields appearing in any order +* Unexpected or missing fields +* Non-sorted Posts +* Duplicate messages +* New arbitrary message types coming down the stream at any time + +In addition to relevant Post data and requested field parameters, the following kinds of messages may be delivered on a stream connection. Note that this list may not be comprehensive—additional objects may be introduced into streams. Ensure that your parser is tolerant of unexpected message formats. +  + +#### Buffering  + +The streaming endpoints will send data to you as quickly as it becomes available, which can result in high volumes in many cases. If the X server cannot write new data to the stream right away (for example if your client is not reading fast enough, see [handling disconnections](/x-api/posts/filtered-stream#what-is-a-disconnection) for more), it will buffer the content on its end to allow your client to catch up. However, when this buffer is full, a forced disconnect will be initiated to drop the connection, and the buffered Posts will be dropped and not resent. See below for more details. + +One way to identify times where your app is falling behind is to compare the timestamp of the Posts being received with the current time, and track this over time. + +Although stream backups cannot ever be completely eliminated due to potential latency and hiccups over the public internet, they can be largely eliminated through proper configuration of your app. To minimize the occurrence of backups: + +* Ensure that your client is reading the stream fast enough. Typically you should not do any real processing work as you read the stream. Read the stream and hand the activity to another thread/process/data store to do your processing asynchronously. +* Ensure that your data center has inbound bandwidth sufficient to accomodate large sustained data volumes as well as significantly larger spikes (e.g. 5-10x normal volume). For filtered stream, the volume and corresponding bandwidth required on your end are wholly dependent on what Posts your rules are matching. +   + +#### Usage tracking and rule management + +As developers expectations around what “normal” data volume should be for their streams, we do not have a general recommendation for a specific percentage decrease/increase or period of time.  + +Consider monitoring your stream data volumes for unexpected deviations. A data volume decrease may be symptomatic of a different issue than a stream disconnection. In such a situation, a stream would still be receiving the keep-alive signal and probably some new activity data. However, a significantly decreased number of Posts should lead you to investigate whether there is anything causing the decrease in inbound data volume to your application or network, check the [status page](https://api.twitterstat.us/) for any related notices. + +To create such monitoring, you could track the number of new Posts you expect to see in a set amount of time. If a stream’s data volume falls far enough below the specified threshold, and does not recover within a set period of time, then alerts and notifications should be initiated. You may also want to monitor for a large increase in data volume, particularly if you are in the process of modifying rules in a filtered stream, or if an event occurs that produces a spike in Post activity. + +It's important to note that Posts delivered through filtered stream do count towards the total monthly Post volume, and you should track and adjust consumption in order to optimize.  If volume is high, consider adding a sample: operator to each of your rules to reduce from 100% matching to sample:50 or sample:25 when necessary. + +Additionally, we encourage you to implement measures within your app that will alert your team if the volume passes a pre-set threshold, and to possibly introduce other measures such as automated deletion of rules that are bringing in too much data, or disconnecting from the stream completely in extreme circumstances. +  + +#### Responding to system messages + +Keep-alive signals +At least every 20 seconds, the stream will send a keep-alive signal, or heartbeat in the form of an \\r\\n carriage return through the open connection to prevent your client from timing out. Your client application should be tolerant of the \\r\\n characters in the stream. + +If your client properly implements a read timeout on your HTTP library, your app will be able to rely on the HTTP protocol and your HTTP library to throw an event if no data is read within this period, and you will not need to explicitly monitor for the \\r\\n character. + +This event will typically be an exception being thrown or some other event depending on the HTTP library used. It is highly recommended to wrap your HTTP methods with error/event handlers to detect these timeouts. On timeout, your application should attempt to reconnect. + +Error messages +The v2 streaming endpoints may also deliver in stream error messages. Provided below is the basic format of these messages, along with some examples. Please note that the messages delivered could change, with new message being introduced. Client applications need to be tolerant of changing system message payloads. + +Note that error messages will link to the documentation describing how to solve the problem. + +Message format: + +```{ + "errors": [{ + "title": "operational-disconnect", + "disconnect_type": "UpstreamOperationalDisconnect", + "detail": "This stream has been disconnected upstream for operational reasons.", + "type": "https://api.x.com/2/problems/operational-disconnect" + }] +} +``` + +Note that error messages indicating a force disconnect for a full buffer may never get to your client, if the backup which caused the force disconnect prevents it from getting through. Accordingly, your app should not depend on these messages to initiate a reconnect. + diff --git a/x-api/posts/filtered-stream/integrate/handling-high-volume-capacity.mdx b/x-api/posts/filtered-stream/integrate/handling-high-volume-capacity.mdx index e6db62598..1d1930919 100644 --- a/x-api/posts/filtered-stream/integrate/handling-high-volume-capacity.mdx +++ b/x-api/posts/filtered-stream/integrate/handling-high-volume-capacity.mdx @@ -1,43 +1,43 @@ ---- -title: Handling high-volume capacity -sidebarTitle: Handling high-volume capacity ---- - -### How to plan for high-volume social data events - -Major national and global events are often accompanied by dramatic spikes in user activity across social media platforms. Sometimes these events are known about in advance, like the Super Bowl, political elections, and New Year’s celebrations around the world. Other times, the spikes in volume are due to unexpected happenings such as natural disasters, unplanned political events, pop culture moments, or health pandemics like COVID-19. - -These bursts of user activity may sometimes be short-lived (measured in seconds), or they may even be sustained over several minutes’ time. No matter their origin, it is important to consider the impact that they can have on applications consuming real-time data from X. Here are some best practices that will help your team prepare for high-volume social data events. - -#### Review your current filtered stream rules - -* Certain keywords can skyrocket during high volume events, such as brand mentions when a brand sponsors a major sporting event. -* Be careful to avoid any unnecessary or overly generic rules that may generate unnecessary activity volumes. -* Consider communicating with your clients prior to known high-volume events to help them plan appropriately. -   - -#### Stress test your application - -Anticipate that burst volumes may reach 5-10x average daily consumption levels. Depending on your rule set, the increase may be much higher. - -#### Understand delivery caps for connections - -Flow and delivery caps are based on levels of access. This results in a static volume of delivered results for streams. - -* **Academic**: 250 Posts/second -* **Enterprise**: Posts/second is set at access level - -#### Optimize to stay connected - -With real-time streams, staying connected is essential to avoid missing data. Your client application should be able to detect a disconnect and have logic to immediately retry its connection, using an exponential backoff if the reconnect attempt fails. -  - -#### Add built-in buffering on your end - -Building a multi-threaded application is a key strategy for handling high-volume streams. At a high-level, a best practice for managing data streams is to have a separate thread/process that establishes the streaming connection and then writes received JSON activities to a memory structure or a buffered stream reader. This ‘light-weight’ stream processing thread is responsible for handling incoming data, which can be buffered in memory, growing and shrinking as needed. Then a different thread consumes that hash and does the ‘heavy lifting’ of parsing the JSON, preparing database writes, or whatever else your application needs to do. -  - -#### Global events = global time zones - -The events may occur after business hours or over the weekend, so be sure that your team is prepared for spikes to occur outside your normal business hours. - +--- +title: Handling high-volume capacity +sidebarTitle: Handling high-volume capacity +--- + +### How to plan for high-volume social data events + +Major national and global events are often accompanied by dramatic spikes in user activity across social media platforms. Sometimes these events are known about in advance, like the Super Bowl, political elections, and New Year’s celebrations around the world. Other times, the spikes in volume are due to unexpected happenings such as natural disasters, unplanned political events, pop culture moments, or health pandemics like COVID-19. + +These bursts of user activity may sometimes be short-lived (measured in seconds), or they may even be sustained over several minutes’ time. No matter their origin, it is important to consider the impact that they can have on applications consuming data from X. Here are some best practices that will help your team prepare for high-volume social data events. + +#### Review your current filtered stream rules + +* Certain keywords can skyrocket during high volume events, such as brand mentions when a brand sponsors a major sporting event. +* Be careful to avoid any unnecessary or overly generic rules that may generate unnecessary activity volumes. +* Consider communicating with your clients prior to known high-volume events to help them plan appropriately. +   + +#### Stress test your application + +Anticipate that burst volumes may reach 5-10x average daily consumption levels. Depending on your rule set, the increase may be much higher. + +#### Understand delivery caps for connections + +Flow and delivery caps are based on levels of access. This results in a static volume of delivered results for streams. + +* **Academic**: 250 Posts/second +* **Enterprise**: Posts/second is set at access level + +#### Optimize to stay connected + +With streams, staying connected is essential to avoid missing data. Your client application should be able to detect a disconnect and have logic to immediately retry its connection, using an exponential backoff if the reconnect attempt fails. +  + +#### Add built-in buffering on your end + +Building a multi-threaded application is a key strategy for handling high-volume streams. At a high-level, a best practice for managing data streams is to have a separate thread/process that establishes the streaming connection and then writes received JSON activities to a memory structure or a buffered stream reader. This ‘light-weight’ stream processing thread is responsible for handling incoming data, which can be buffered in memory, growing and shrinking as needed. Then a different thread consumes that hash and does the ‘heavy lifting’ of parsing the JSON, preparing database writes, or whatever else your application needs to do. +  + +#### Global events = global time zones + +The events may occur after business hours or over the weekend, so be sure that your team is prepared for spikes to occur outside your normal business hours. + diff --git a/x-api/posts/filtered-stream/integrate/recovery-and-redundancy-features.mdx b/x-api/posts/filtered-stream/integrate/recovery-and-redundancy-features.mdx index 056b4680f..3e052e8be 100644 --- a/x-api/posts/filtered-stream/integrate/recovery-and-redundancy-features.mdx +++ b/x-api/posts/filtered-stream/integrate/recovery-and-redundancy-features.mdx @@ -1,45 +1,45 @@ ---- -title: Recovery and redundancy -sidebarTitle: Recovery and redundancy ---- - -#### Introduction - -When consuming realtime data, maximizing your connection time and receiving all matched data is a fundamental goal. This means that it is important to take advantage of redundant connections, automatically detect disconnections, to reconnect quickly, and to have a plan for recovering lost data. - -In this integration guide, we will discuss different recovery and redundancy features: redundant connections, backfill, and recovery. -  - -**Redundant connections** - -A redundant connection simply allows you to establish more than one simultaneous connections to the filtered stream. This provides redundancy by allowing you to connect to the same stream with two separate consumers, receiving the same data through both connections. Thus, your app has a hot failover for various situations such as if one stream is disconnected or if your application's primary server fails. - -Filtered stream currently only allows Projects with Enterprise access to connect to up to two redundant connections. To use a redundant stream, simply connect to the same URL used for your primary connection. The data for your stream will be sent through both connections. - -#### Recovering missed data after a disconnection: Backfill - -After you've detected a disconnection, your system should be smart enough to reconnect to the stream. If possible, your system should take note of how long the disconnection lasted so that you can use the proper recovery feature to backfill the data.  - -If you are using a Project with Enterprise access and identified that the disconnection lasted five minutes or less, you can use the backfill parameter, backfill_minutes. If you pass this parameter with your [GET /tweets/search/stream](/x-api/posts/filtered-stream#get-2-tweets-search-stream) request, you will receive the Posts that match your rules within the past one to five minutes. We generally deliver these older Posts first before any newly matched Posts, and also do not deduplicate Posts. This means that if you were disconnected for 90 seconds, but request two minutes worth of backfill data, you will receive 30 seconds worth of duplicate Posts, which your system should be tolerant of. Here is an example of what a request might look like with the backfill parameter: - - `curl 'https://api.x.com/2/tweets/search/stream?backfill_minutes=5' -H "Authorization: Bearer $ACCESS_TOKEN"` - - -If you don't have Enterprise access, or identified that the disconnection time lasted for longer than five minutes, you can utilize the [recent search endpoint](/x-api/posts/search/introduction) or the recovery feature to request missed data. However, note that the search Posts endpoints do not include the sample:, bio:, bio_name:, or bio_location: operators, and has certain differences in matching behavior when using accents and diacritics with the keyword and #hashtag operators. These differences could mean that you don't fully recover all Posts that might have been received via the filtered stream endpoints.  - -**Recovering missed data after a disconnection: Recovery** - -If you are using a Project with Enterprise access, you can use the Recovery feature to recover missed data within the last 24 hours if you are unable to reconnect with the 5 minute backfill window. - -The streaming recovery feature allows you to have an extended backfill window of 24 hours. Recovery enables you to 'replay' the time period of missed data. A recovery stream is started when you make a connection request using 'start\_time' and 'end\_time' request parameters. Once connected, Recovery will re-stream the time period indicated, then disconnect.   - -You will be able to make 2 concurrent requests to recovery at the same time, i.e. “two recovery jobs”. Recovery works technically in the same way as backfill, except a start and end time is defined. A recovery period is for a single time range. - -| | | | -| :--- | :--- | :--- | -| **Name** | **Type** | **Description** | -| start_time | date (ISO 8601) | YYYY-MM-DDTHH:mm:ssZ (ISO 8601/RFC 3339).

Date in UTC signifying the start time to recover from. | -| end_time | date (ISO 8601) | YYYY-MM-DDTHH:mm:ssZ (ISO 8601/RFC 3339).

Date in UTC signifying the end time to recover to. | - - +--- +title: Recovery and redundancy +sidebarTitle: Recovery and redundancy +--- + +#### Introduction + +When consuming streaming data, maximizing your connection time and receiving all matched data is a fundamental goal. This means that it is important to take advantage of redundant connections, automatically detect disconnections, to reconnect quickly, and to have a plan for recovering lost data. + +In this integration guide, we will discuss different recovery and redundancy features: redundant connections, backfill, and recovery. +  + +**Redundant connections** + +A redundant connection simply allows you to establish more than one simultaneous connections to the filtered stream. This provides redundancy by allowing you to connect to the same stream with two separate consumers, receiving the same data through both connections. Thus, your app has a hot failover for various situations such as if one stream is disconnected or if your application's primary server fails. + +Filtered stream currently only allows Projects with Enterprise access to connect to up to two redundant connections. To use a redundant stream, simply connect to the same URL used for your primary connection. The data for your stream will be sent through both connections. + +#### Recovering missed data after a disconnection: Backfill + +After you've detected a disconnection, your system should be smart enough to reconnect to the stream. If possible, your system should take note of how long the disconnection lasted so that you can use the proper recovery feature to backfill the data.  + +If you are using a Project with Enterprise access and identified that the disconnection lasted five minutes or less, you can use the backfill parameter, backfill_minutes. If you pass this parameter with your [GET /tweets/search/stream](/x-api/posts/filtered-stream#get-2-tweets-search-stream) request, you will receive the Posts that match your rules within the past one to five minutes. We generally deliver these older Posts first before any newly matched Posts, and also do not deduplicate Posts. This means that if you were disconnected for 90 seconds, but request two minutes worth of backfill data, you will receive 30 seconds worth of duplicate Posts, which your system should be tolerant of. Here is an example of what a request might look like with the backfill parameter: + + `curl 'https://api.x.com/2/tweets/search/stream?backfill_minutes=5' -H "Authorization: Bearer $ACCESS_TOKEN"` + + +If you don't have Enterprise access, or identified that the disconnection time lasted for longer than five minutes, you can utilize the [recent search endpoint](/x-api/posts/search/introduction) or the recovery feature to request missed data. However, note that the search Posts endpoints do not include the sample:, bio:, bio_name:, or bio_location: operators, and has certain differences in matching behavior when using accents and diacritics with the keyword and #hashtag operators. These differences could mean that you don't fully recover all Posts that might have been received via the filtered stream endpoints.  + +**Recovering missed data after a disconnection: Recovery** + +If you are using a Project with Enterprise access, you can use the Recovery feature to recover missed data within the last 24 hours if you are unable to reconnect with the 5 minute backfill window. + +The streaming recovery feature allows you to have an extended backfill window of 24 hours. Recovery enables you to 'replay' the time period of missed data. A recovery stream is started when you make a connection request using 'start\_time' and 'end\_time' request parameters. Once connected, Recovery will re-stream the time period indicated, then disconnect.   + +You will be able to make 2 concurrent requests to recovery at the same time, i.e. “two recovery jobs”. Recovery works technically in the same way as backfill, except a start and end time is defined. A recovery period is for a single time range. + +| | | | +| :--- | :--- | :--- | +| **Name** | **Type** | **Description** | +| start_time | date (ISO 8601) | YYYY-MM-DDTHH:mm:ssZ (ISO 8601/RFC 3339).

Date in UTC signifying the start time to recover from. | +| end_time | date (ISO 8601) | YYYY-MM-DDTHH:mm:ssZ (ISO 8601/RFC 3339).

Date in UTC signifying the end time to recover to. | + + Example request URL: [https://api.x.com/2/tweets/search/stream?start\_time=2022-07-12T15:10:00Z&end\_time=2022-07-12T15:20:00Z](https://api.x.com/2/tweets/search/stream?start_time=1985-04-12T23:20:50.52Z&end_time=1985-04-13T00:20:50.52Z) \ No newline at end of file diff --git a/x-api/posts/filtered-stream/introduction.mdx b/x-api/posts/filtered-stream/introduction.mdx index 76e320006..dcd075587 100644 --- a/x-api/posts/filtered-stream/introduction.mdx +++ b/x-api/posts/filtered-stream/introduction.mdx @@ -5,7 +5,7 @@ sidebarTitle: Introduction import { Button } from '/snippets/button.mdx'; -The filtered stream endpoint group enables developers to filter the real-time stream of public Posts. This endpoint group’s functionality includes multiple endpoints that enable you to create and manage rules, and apply those rules to filter a stream of real-time Posts that will return matching public Posts. This endpoint group allows users to listen for specific topics and events in real-time, monitor the conversation around competitions, understand how trends develop in real-time, and much more. +The filtered stream endpoint group enables developers to filter a stream of public Posts. This endpoint group’s functionality includes multiple endpoints that enable you to create and manage rules, and apply those rules to filter a stream of Posts that will return matching public Posts. This endpoint group allows users to listen for specific topics and events, monitor the conversation around competitions, understand how trends develop, and much more. Developers can use the REST [rules endpoint](/x-api/posts/filtered-stream#post-2-tweets-search-stream-rules) to add and remove rules to a persistent stream connection without needing to disconnect. These [rules](/x-api/posts/filtered-stream#building-rules-for-filtered-stream) can be created with operators that match on Post attributes such as message keywords, hashtags, and URLs. Operators and rule clauses can be combined with boolean logic and parentheses to help refine the filter’s matching behavior.  diff --git a/x-api/posts/get-last-28hr-metrics-for-posts.mdx b/x-api/posts/get-28-hour-post-insights.mdx similarity index 100% rename from x-api/posts/get-last-28hr-metrics-for-posts.mdx rename to x-api/posts/get-28-hour-post-insights.mdx diff --git a/x-api/posts/full-archive-search-counts.mdx b/x-api/posts/get-count-of-all-posts.mdx similarity index 100% rename from x-api/posts/full-archive-search-counts.mdx rename to x-api/posts/get-count-of-all-posts.mdx diff --git a/x-api/posts/recent-search-counts.mdx b/x-api/posts/get-count-of-recent-posts.mdx similarity index 100% rename from x-api/posts/recent-search-counts.mdx rename to x-api/posts/get-count-of-recent-posts.mdx diff --git a/x-api/posts/get-engagement-analytics.mdx b/x-api/posts/get-engagement-analytics.mdx deleted file mode 100644 index 961c610c4..000000000 --- a/x-api/posts/get-engagement-analytics.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -openapi: get /2/tweets/analytics ---- \ No newline at end of file diff --git a/x-api/posts/get-historical-metrics-for-posts.mdx b/x-api/posts/get-historical-post-insights.mdx similarity index 100% rename from x-api/posts/get-historical-metrics-for-posts.mdx rename to x-api/posts/get-historical-post-insights.mdx diff --git a/x-api/posts/returns-post-objects-liked-by-the-provided-user-id.mdx b/x-api/posts/get-liked-posts.mdx similarity index 100% rename from x-api/posts/returns-post-objects-liked-by-the-provided-user-id.mdx rename to x-api/posts/get-liked-posts.mdx diff --git a/x-api/posts/list-posts-timeline-by-list-id.mdx b/x-api/posts/get-list-posts.mdx similarity index 100% rename from x-api/posts/list-posts-timeline-by-list-id.mdx rename to x-api/posts/get-list-posts.mdx diff --git a/x-api/posts/user-mention-timeline-by-user-id.mdx b/x-api/posts/get-mentions.mdx similarity index 100% rename from x-api/posts/user-mention-timeline-by-user-id.mdx rename to x-api/posts/get-mentions.mdx diff --git a/x-api/posts/analytics-of-posts.mdx b/x-api/posts/get-post-analytics.mdx similarity index 100% rename from x-api/posts/analytics-of-posts.mdx rename to x-api/posts/get-post-analytics.mdx diff --git a/x-api/posts/post-lookup-by-post-id.mdx b/x-api/posts/get-post-by-id.mdx similarity index 100% rename from x-api/posts/post-lookup-by-post-id.mdx rename to x-api/posts/get-post-by-id.mdx diff --git a/x-api/posts/post-lookup-by-post-ids.mdx b/x-api/posts/get-posts-by-ids.mdx similarity index 100% rename from x-api/posts/post-lookup-by-post-ids.mdx rename to x-api/posts/get-posts-by-ids.mdx diff --git a/x-api/posts/user-posts-timeline-by-user-id.mdx b/x-api/posts/get-posts.mdx similarity index 100% rename from x-api/posts/user-posts-timeline-by-user-id.mdx rename to x-api/posts/get-posts.mdx diff --git a/x-api/posts/retrieve-posts-that-quote-a-post.mdx b/x-api/posts/get-quoted-posts.mdx similarity index 100% rename from x-api/posts/retrieve-posts-that-quote-a-post.mdx rename to x-api/posts/get-quoted-posts.mdx diff --git a/x-api/posts/retrieve-posts-that-repost-a-post.mdx b/x-api/posts/get-reposts.mdx similarity index 100% rename from x-api/posts/retrieve-posts-that-repost-a-post.mdx rename to x-api/posts/get-reposts.mdx diff --git a/x-api/posts/user-home-timeline-by-user-id.mdx b/x-api/posts/get-timeline.mdx similarity index 100% rename from x-api/posts/user-home-timeline-by-user-id.mdx rename to x-api/posts/get-timeline.mdx diff --git a/x-api/posts/hide-replies.mdx b/x-api/posts/hide-reply.mdx similarity index 100% rename from x-api/posts/hide-replies.mdx rename to x-api/posts/hide-reply.mdx diff --git a/x-api/posts/causes-the-user-in-the-path-to-like-the-specified-post.mdx b/x-api/posts/like-post.mdx similarity index 100% rename from x-api/posts/causes-the-user-in-the-path-to-like-the-specified-post.mdx rename to x-api/posts/like-post.mdx diff --git a/x-api/posts/causes-the-user-in-the-path-to-repost-the-specified-post.mdx b/x-api/posts/repost-post.mdx similarity index 100% rename from x-api/posts/causes-the-user-in-the-path-to-repost-the-specified-post.mdx rename to x-api/posts/repost-post.mdx diff --git a/x-api/posts/full-archive-search.mdx b/x-api/posts/search-all-posts.mdx similarity index 100% rename from x-api/posts/full-archive-search.mdx rename to x-api/posts/search-all-posts.mdx diff --git a/x-api/posts/recent-search.mdx b/x-api/posts/search-recent-posts.mdx similarity index 100% rename from x-api/posts/recent-search.mdx rename to x-api/posts/search-recent-posts.mdx diff --git a/x-api/posts/causes-the-user-in-the-path-to-unlike-the-specified-post.mdx b/x-api/posts/unlike-post.mdx similarity index 100% rename from x-api/posts/causes-the-user-in-the-path-to-unlike-the-specified-post.mdx rename to x-api/posts/unlike-post.mdx diff --git a/x-api/posts/causes-the-user-in-the-path-to-unretweet-the-specified-post.mdx b/x-api/posts/unrepost-post.mdx similarity index 100% rename from x-api/posts/causes-the-user-in-the-path-to-unretweet-the-specified-post.mdx rename to x-api/posts/unrepost-post.mdx diff --git a/x-api/spaces/space-lookup-by-space-id.mdx b/x-api/spaces/get-space-by-id.mdx similarity index 100% rename from x-api/spaces/space-lookup-by-space-id.mdx rename to x-api/spaces/get-space-by-id.mdx diff --git a/x-api/spaces/retrieve-posts-from-a-space.mdx b/x-api/spaces/get-space-posts.mdx similarity index 100% rename from x-api/spaces/retrieve-posts-from-a-space.mdx rename to x-api/spaces/get-space-posts.mdx diff --git a/x-api/spaces/retrieve-the-list-of-users-who-purchased-a-ticket-to-the-given-space.mdx b/x-api/spaces/get-space-ticket-buyers.mdx similarity index 100% rename from x-api/spaces/retrieve-the-list-of-users-who-purchased-a-ticket-to-the-given-space.mdx rename to x-api/spaces/get-space-ticket-buyers.mdx diff --git a/x-api/spaces/space-lookup-by-their-creators.mdx b/x-api/spaces/get-spaces-by-creator-ids.mdx similarity index 100% rename from x-api/spaces/space-lookup-by-their-creators.mdx rename to x-api/spaces/get-spaces-by-creator-ids.mdx diff --git a/x-api/spaces/space-lookup-up-space-ids.mdx b/x-api/spaces/get-spaces-by-ids.mdx similarity index 100% rename from x-api/spaces/space-lookup-up-space-ids.mdx rename to x-api/spaces/get-spaces-by-ids.mdx diff --git a/x-api/spaces/search-for-spaces.mdx b/x-api/spaces/search-spaces.mdx similarity index 100% rename from x-api/spaces/search-for-spaces.mdx rename to x-api/spaces/search-spaces.mdx diff --git a/x-api/posts/rules-count.mdx b/x-api/stream/get-stream-rule-counts.mdx similarity index 100% rename from x-api/posts/rules-count.mdx rename to x-api/stream/get-stream-rule-counts.mdx diff --git a/x-api/posts/rules-lookup.mdx b/x-api/stream/get-stream-rules.mdx similarity index 100% rename from x-api/posts/rules-lookup.mdx rename to x-api/stream/get-stream-rules.mdx diff --git a/x-api/posts/sample-10-stream.mdx b/x-api/stream/stream-10-sampled-posts.mdx similarity index 100% rename from x-api/posts/sample-10-stream.mdx rename to x-api/stream/stream-10-sampled-posts.mdx diff --git a/x-api/likes/likes-firehose-stream.mdx b/x-api/stream/stream-all-likes.mdx similarity index 100% rename from x-api/likes/likes-firehose-stream.mdx rename to x-api/stream/stream-all-likes.mdx diff --git a/x-api/posts/firehose-stream.mdx b/x-api/stream/stream-all-posts.mdx similarity index 100% rename from x-api/posts/firehose-stream.mdx rename to x-api/stream/stream-all-posts.mdx diff --git a/x-api/posts/english-language-firehose-stream.mdx b/x-api/stream/stream-english-posts.mdx similarity index 100% rename from x-api/posts/english-language-firehose-stream.mdx rename to x-api/stream/stream-english-posts.mdx diff --git a/x-api/posts/filtered-stream.mdx b/x-api/stream/stream-filtered-posts.mdx similarity index 100% rename from x-api/posts/filtered-stream.mdx rename to x-api/stream/stream-filtered-posts.mdx diff --git a/x-api/posts/japanese-language-firehose-stream.mdx b/x-api/stream/stream-japanese-posts.mdx similarity index 100% rename from x-api/posts/japanese-language-firehose-stream.mdx rename to x-api/stream/stream-japanese-posts.mdx diff --git a/x-api/posts/korean-language-firehose-stream.mdx b/x-api/stream/stream-korean-posts.mdx similarity index 100% rename from x-api/posts/korean-language-firehose-stream.mdx rename to x-api/stream/stream-korean-posts.mdx diff --git a/x-api/compliance/likes-compliance-stream.mdx b/x-api/stream/stream-likes-compliance-data.mdx similarity index 100% rename from x-api/compliance/likes-compliance-stream.mdx rename to x-api/stream/stream-likes-compliance-data.mdx diff --git a/x-api/posts/portuguese-language-firehose-stream.mdx b/x-api/stream/stream-portuguese-posts.mdx similarity index 100% rename from x-api/posts/portuguese-language-firehose-stream.mdx rename to x-api/stream/stream-portuguese-posts.mdx diff --git a/x-api/stream/stream-post-labels.mdx b/x-api/stream/stream-post-labels.mdx new file mode 100644 index 000000000..48a78208d --- /dev/null +++ b/x-api/stream/stream-post-labels.mdx @@ -0,0 +1,3 @@ +--- +openapi: get /2/tweets/label/stream +--- \ No newline at end of file diff --git a/x-api/compliance/posts-compliance-stream.mdx b/x-api/stream/stream-posts-compliance-data.mdx similarity index 100% rename from x-api/compliance/posts-compliance-stream.mdx rename to x-api/stream/stream-posts-compliance-data.mdx diff --git a/x-api/likes/likes-sample-10-stream.mdx b/x-api/stream/stream-sampled-likes.mdx similarity index 100% rename from x-api/likes/likes-sample-10-stream.mdx rename to x-api/stream/stream-sampled-likes.mdx diff --git a/x-api/posts/sample-stream.mdx b/x-api/stream/stream-sampled-posts.mdx similarity index 100% rename from x-api/posts/sample-stream.mdx rename to x-api/stream/stream-sampled-posts.mdx diff --git a/x-api/compliance/users-compliance-stream.mdx b/x-api/stream/stream-users-compliance-data.mdx similarity index 100% rename from x-api/compliance/users-compliance-stream.mdx rename to x-api/stream/stream-users-compliance-data.mdx diff --git a/x-api/posts/adddelete-rules.mdx b/x-api/stream/update-stream-rules.mdx similarity index 100% rename from x-api/posts/adddelete-rules.mdx rename to x-api/stream/update-stream-rules.mdx diff --git a/x-api/tools-and-libraries/sdks.mdx b/x-api/tools-and-libraries/sdks.mdx index 51e72c60a..a6402171e 100644 --- a/x-api/tools-and-libraries/sdks.mdx +++ b/x-api/tools-and-libraries/sdks.mdx @@ -111,8 +111,8 @@ The methods provided within the library client are clearly named to correspond w Here is an example of Post lookup by ID: - -```js + +```java String id = "1511757922354663425"; // String | A single Tweet ID. Set expansions = new HashSet<>(Arrays.asList("author_id")); // Set | A comma separated list of fields to expand. Set tweetFields = new HashSet<>(Arrays.asList("created_at", "lang", "context_annotations")); // Set | A comma separated list of Tweet fields to display. diff --git a/x-api/trends/trends.mdx b/x-api/trends/get-trends-by-woeid.mdx similarity index 100% rename from x-api/trends/trends.mdx rename to x-api/trends/get-trends-by-woeid.mdx diff --git a/x-api/usage/post-usage.mdx b/x-api/usage/get-usage.mdx similarity index 100% rename from x-api/usage/post-usage.mdx rename to x-api/usage/get-usage.mdx diff --git a/x-api/users/causes-dms-tofrom-the-target-user-in-the-path-to-be-blocked-by-the-authenticated-request-user.mdx b/x-api/users/block-dms.mdx similarity index 100% rename from x-api/users/causes-dms-tofrom-the-target-user-in-the-path-to-be-blocked-by-the-authenticated-request-user.mdx rename to x-api/users/block-dms.mdx diff --git a/x-api/users/returns-user-objects-that-are-blocked-by-provided-user-id.mdx b/x-api/users/get-blocking.mdx similarity index 100% rename from x-api/users/returns-user-objects-that-are-blocked-by-provided-user-id.mdx rename to x-api/users/get-blocking.mdx diff --git a/x-api/users/followers-by-user-id.mdx b/x-api/users/get-followers.mdx similarity index 100% rename from x-api/users/followers-by-user-id.mdx rename to x-api/users/get-followers.mdx diff --git a/x-api/users/following-by-user-id.mdx b/x-api/users/get-following.mdx similarity index 100% rename from x-api/users/following-by-user-id.mdx rename to x-api/users/get-following.mdx diff --git a/x-api/users/returns-user-objects-that-have-liked-the-provided-post-id.mdx b/x-api/users/get-liking-users.mdx similarity index 100% rename from x-api/users/returns-user-objects-that-have-liked-the-provided-post-id.mdx rename to x-api/users/get-liking-users.mdx diff --git a/x-api/users/returns-user-objects-that-follow-a-list-by-the-provided-list-id.mdx b/x-api/users/get-list-followers.mdx similarity index 100% rename from x-api/users/returns-user-objects-that-follow-a-list-by-the-provided-list-id.mdx rename to x-api/users/get-list-followers.mdx diff --git a/x-api/users/returns-user-objects-that-are-members-of-a-list-by-the-provided-list-id.mdx b/x-api/users/get-list-members.mdx similarity index 100% rename from x-api/users/returns-user-objects-that-are-members-of-a-list-by-the-provided-list-id.mdx rename to x-api/users/get-list-members.mdx diff --git a/x-api/users/returns-user-objects-that-are-muted-by-the-provided-user-id.mdx b/x-api/users/get-muting.mdx similarity index 100% rename from x-api/users/returns-user-objects-that-are-muted-by-the-provided-user-id.mdx rename to x-api/users/get-muting.mdx diff --git a/x-api/users/user-lookup-me.mdx b/x-api/users/get-my-user.mdx similarity index 100% rename from x-api/users/user-lookup-me.mdx rename to x-api/users/get-my-user.mdx diff --git a/x-api/users/returns-user-objects-that-have-retweeted-the-provided-post-id.mdx b/x-api/users/get-reposted-by.mdx similarity index 100% rename from x-api/users/returns-user-objects-that-have-retweeted-the-provided-post-id.mdx rename to x-api/users/get-reposted-by.mdx diff --git a/x-api/users/returns-repost-of-user.mdx b/x-api/users/get-reposts-of-me.mdx similarity index 100% rename from x-api/users/returns-repost-of-user.mdx rename to x-api/users/get-reposts-of-me.mdx diff --git a/x-api/users/user-lookup-by-id.mdx b/x-api/users/get-user-by-id.mdx similarity index 100% rename from x-api/users/user-lookup-by-id.mdx rename to x-api/users/get-user-by-id.mdx diff --git a/x-api/users/user-lookup-by-username.mdx b/x-api/users/get-user-by-username.mdx similarity index 100% rename from x-api/users/user-lookup-by-username.mdx rename to x-api/users/get-user-by-username.mdx diff --git a/x-api/users/user-lookup-by-ids.mdx b/x-api/users/get-users-by-ids.mdx similarity index 100% rename from x-api/users/user-lookup-by-ids.mdx rename to x-api/users/get-users-by-ids.mdx diff --git a/x-api/users/user-lookup-by-usernames.mdx b/x-api/users/get-users-by-usernames.mdx similarity index 100% rename from x-api/users/user-lookup-by-usernames.mdx rename to x-api/users/get-users-by-usernames.mdx diff --git a/x-api/users/mute-user-by-user-id.mdx b/x-api/users/mute-user.mdx similarity index 100% rename from x-api/users/mute-user-by-user-id.mdx rename to x-api/users/mute-user.mdx diff --git a/x-api/users/user-search.mdx b/x-api/users/search-users.mdx similarity index 100% rename from x-api/users/user-search.mdx rename to x-api/users/search-users.mdx diff --git a/x-api/users/causes-dms-tofrom-the-target-user-in-the-path-to-be-unblocked-by-the-authenticated-request-user.mdx b/x-api/users/unblock-dms.mdx similarity index 100% rename from x-api/users/causes-dms-tofrom-the-target-user-in-the-path-to-be-unblocked-by-the-authenticated-request-user.mdx rename to x-api/users/unblock-dms.mdx diff --git a/x-api/users/unmute-user-by-user-id.mdx b/x-api/users/unmute-user.mdx similarity index 100% rename from x-api/users/unmute-user-by-user-id.mdx rename to x-api/users/unmute-user.mdx diff --git a/x-api/webhooks/create-webhook-config.mdx b/x-api/webhooks/create-webhook.mdx similarity index 100% rename from x-api/webhooks/create-webhook-config.mdx rename to x-api/webhooks/create-webhook.mdx diff --git a/x-api/webhooks/delete-webhook-config.mdx b/x-api/webhooks/delete-webhook.mdx similarity index 100% rename from x-api/webhooks/delete-webhook-config.mdx rename to x-api/webhooks/delete-webhook.mdx diff --git a/x-api/webhooks/get-a-list-of-webhook-configs-associated-with-a-client-app.mdx b/x-api/webhooks/get-webhook.mdx similarity index 100% rename from x-api/webhooks/get-a-list-of-webhook-configs-associated-with-a-client-app.mdx rename to x-api/webhooks/get-webhook.mdx diff --git a/x-api/webhooks/webhook-crc-check.mdx b/x-api/webhooks/validate-webhook.mdx similarity index 100% rename from x-api/webhooks/webhook-crc-check.mdx rename to x-api/webhooks/validate-webhook.mdx