naftiko: 1.0.0-alpha2 info: label: X API v2 — Tweets description: 'X API v2 — Tweets. 38 operations. Lead operation: X Get 28-hour Post Insights. Self-contained Naftiko capability covering one Twitter business surface.' tags: - Twitter - Tweets created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: TWITTER_API_KEY: TWITTER_API_KEY capability: consumes: - type: http namespace: x-tweets baseUri: https://api.x.com description: X API v2 — Tweets business capability. Self-contained, no shared references. resources: - name: 2-insights-28hr path: /2/insights/28hr operations: - name: getinsights28hr method: GET description: X Get 28-hour Post Insights outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: tweet_ids in: query type: array description: List of PostIds for 28hr metrics. required: true - name: granularity in: query type: string description: granularity of metrics response. required: true - name: requested_metrics in: query type: array description: request metrics for historical request. required: true - name: 2-insights-historical path: /2/insights/historical operations: - name: getinsightshistorical method: GET description: X Get Historical Post Insights outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: tweet_ids in: query type: array description: List of PostIds for historical metrics. required: true - name: end_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the end of the time range. required: true - name: start_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the start of the time range. required: true - name: granularity in: query type: string description: granularity of metrics response. required: true - name: requested_metrics in: query type: array description: request metrics for historical request. required: true - name: 2-lists-id-tweets path: /2/lists/{id}/tweets operations: - name: getlistsposts method: GET description: X Get List Posts outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID of the List. required: true - name: max_results in: query type: integer description: The maximum number of results. - name: pagination_token in: query type: string description: This parameter is used to get the next 'page' of results. - name: 2-spaces-id-buyers path: /2/spaces/{id}/buyers operations: - name: getspacesbuyers method: GET description: X Get Space Ticket Buyers outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID of the Space to be retrieved. required: true - name: pagination_token in: query type: string description: This parameter is used to get a specified 'page' of results. - name: max_results in: query type: integer description: The maximum number of results. - name: 2-spaces-id-tweets path: /2/spaces/{id}/tweets operations: - name: getspacesposts method: GET description: X Get Space Posts outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID of the Space to be retrieved. required: true - name: max_results in: query type: integer description: The number of Posts to fetch from the provided space. If not provided, the value will default to the maximum of 100. - name: 2-tweets path: /2/tweets operations: - name: getpostsbyids method: GET description: X Get Posts by IDs outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: ids in: query type: array description: A comma separated list of Post IDs. Up to 100 are allowed in a single request. required: true - name: createposts method: POST description: X Create or Edit Post outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: body in: body type: object description: Request body (JSON). required: true - name: 2-tweets-analytics path: /2/tweets/analytics operations: - name: getpostsanalytics method: GET description: X Get Post Analytics outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: ids in: query type: array description: A comma separated list of Post IDs. Up to 100 are allowed in a single request. required: true - name: end_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the end of the time range. required: true - name: start_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The UTC timestamp representing the start of the time range. required: true - name: granularity in: query type: string description: The granularity for the search counts results. required: true - name: 2-tweets-counts-all path: /2/tweets/counts/all operations: - name: getpostscountsall method: GET description: X Get Count of All Posts outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: query in: query type: string description: One query/rule/filter for matching Posts. Refer to https://t.co/rulelength to identify the max query length. required: true - name: start_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The oldest UTC timestamp from which the Posts will be provided. Timestamp is in second granularity and is inclusive (i.e. 12:00:01 include - name: end_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The newest, most recent UTC timestamp to which the Posts will be provided. Timestamp is in second granularity and is exclusive (i.e. 12:00 - name: since_id in: query type: string description: Returns results with a Post ID greater than (that is, more recent than) the specified ID. - name: until_id in: query type: string description: Returns results with a Post ID less than (that is, older than) the specified ID. - name: next_token in: query type: string description: This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should - name: pagination_token in: query type: string description: This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should - name: granularity in: query type: string description: The granularity for the search counts results. - name: 2-tweets-counts-recent path: /2/tweets/counts/recent operations: - name: getpostscountsrecent method: GET description: X Get Count of Recent Posts outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: query in: query type: string description: One query/rule/filter for matching Posts. Refer to https://t.co/rulelength to identify the max query length. required: true - name: start_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The oldest UTC timestamp (from most recent 7 days) from which the Posts will be provided. Timestamp is in second granularity and is inclus - name: end_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The newest, most recent UTC timestamp to which the Posts will be provided. Timestamp is in second granularity and is exclusive (i.e. 12:00 - name: since_id in: query type: string description: Returns results with a Post ID greater than (that is, more recent than) the specified ID. - name: until_id in: query type: string description: Returns results with a Post ID less than (that is, older than) the specified ID. - name: next_token in: query type: string description: This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should - name: pagination_token in: query type: string description: This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should - name: granularity in: query type: string description: The granularity for the search counts results. - name: 2-tweets-firehose-stream path: /2/tweets/firehose/stream operations: - name: streampostsfirehose method: GET description: X Stream All Posts outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: backfill_minutes in: query type: integer description: The number of minutes of backfill requested. - name: partition in: query type: integer description: The partition number. required: true - name: start_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. - name: end_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. - name: 2-tweets-firehose-stream-lang-en path: /2/tweets/firehose/stream/lang/en operations: - name: streampostsfirehoseen method: GET description: X Stream English Posts outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: backfill_minutes in: query type: integer description: The number of minutes of backfill requested. - name: partition in: query type: integer description: The partition number. required: true - name: start_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. - name: end_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. - name: 2-tweets-firehose-stream-lang-ja path: /2/tweets/firehose/stream/lang/ja operations: - name: streampostsfirehoseja method: GET description: X Stream Japanese Posts outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: backfill_minutes in: query type: integer description: The number of minutes of backfill requested. - name: partition in: query type: integer description: The partition number. required: true - name: start_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. - name: end_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. - name: 2-tweets-firehose-stream-lang-ko path: /2/tweets/firehose/stream/lang/ko operations: - name: streampostsfirehoseko method: GET description: X Stream Korean Posts outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: backfill_minutes in: query type: integer description: The number of minutes of backfill requested. - name: partition in: query type: integer description: The partition number. required: true - name: start_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. - name: end_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. - name: 2-tweets-firehose-stream-lang-pt path: /2/tweets/firehose/stream/lang/pt operations: - name: streampostsfirehosept method: GET description: X Stream Portuguese Posts outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: backfill_minutes in: query type: integer description: The number of minutes of backfill requested. - name: partition in: query type: integer description: The partition number. required: true - name: start_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. - name: end_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. - name: 2-tweets-sample-stream path: /2/tweets/sample/stream operations: - name: streampostssample method: GET description: X Stream Sampled Posts outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: backfill_minutes in: query type: integer description: The number of minutes of backfill requested. - name: 2-tweets-sample10-stream path: /2/tweets/sample10/stream operations: - name: streampostssample10 method: GET description: X Stream 10% Sampled Posts outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: backfill_minutes in: query type: integer description: The number of minutes of backfill requested. - name: partition in: query type: integer description: The partition number. required: true - name: start_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. - name: end_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. - name: 2-tweets-search-all path: /2/tweets/search/all operations: - name: searchpostsall method: GET description: X Search All Posts outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: query in: query type: string description: One query/rule/filter for matching Posts. Refer to https://t.co/rulelength to identify the max query length. required: true - name: start_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The oldest UTC timestamp from which the Posts will be provided. Timestamp is in second granularity and is inclusive (i.e. 12:00:01 include - name: end_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The newest, most recent UTC timestamp to which the Posts will be provided. Timestamp is in second granularity and is exclusive (i.e. 12:00 - name: since_id in: query type: string description: Returns results with a Post ID greater than (that is, more recent than) the specified ID. - name: until_id in: query type: string description: Returns results with a Post ID less than (that is, older than) the specified ID. - name: max_results in: query type: integer description: The maximum number of search results to be returned by a request. - name: next_token in: query type: string description: This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should - name: pagination_token in: query type: string description: This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should - name: sort_order in: query type: string description: This order in which to return results. - name: 2-tweets-search-recent path: /2/tweets/search/recent operations: - name: searchpostsrecent method: GET description: X Search Recent Posts outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: query in: query type: string description: One query/rule/filter for matching Posts. Refer to https://t.co/rulelength to identify the max query length. required: true - name: start_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The oldest UTC timestamp from which the Posts will be provided. Timestamp is in second granularity and is inclusive (i.e. 12:00:01 include - name: end_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The newest, most recent UTC timestamp to which the Posts will be provided. Timestamp is in second granularity and is exclusive (i.e. 12:00 - name: since_id in: query type: string description: Returns results with a Post ID greater than (that is, more recent than) the specified ID. - name: until_id in: query type: string description: Returns results with a Post ID less than (that is, older than) the specified ID. - name: max_results in: query type: integer description: The maximum number of search results to be returned by a request. - name: next_token in: query type: string description: This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should - name: pagination_token in: query type: string description: This parameter is used to get the next 'page' of results. The value used with the parameter is pulled directly from the response provided by the API, and should - name: sort_order in: query type: string description: This order in which to return results. - name: 2-tweets-search-stream path: /2/tweets/search/stream operations: - name: streamposts method: GET description: X Stream Filtered Posts outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: backfill_minutes in: query type: integer description: The number of minutes of backfill requested. - name: start_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Posts will be provided. - name: end_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. - name: 2-tweets-search-stream-rules path: /2/tweets/search/stream/rules operations: - name: getrules method: GET description: X Get Stream Rules outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: ids in: query type: array description: A comma-separated list of Rule IDs. - name: max_results in: query type: integer description: The maximum number of results. - name: pagination_token in: query type: string description: This value is populated by passing the 'next_token' returned in a request to paginate through results. - name: updaterules method: POST description: X Update Stream Rules outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: dry_run in: query type: boolean description: Dry Run can be used with both the add and delete action, with the expected result given, but without actually taking any action in the system (meaning the end s - name: delete_all in: query type: boolean description: Delete All can be used to delete all of the rules associated this client app, it should be specified with no other parameters. Once deleted, rules cannot be rec - name: body in: body type: object description: Request body (JSON). required: true - name: 2-tweets-search-stream-rules-counts path: /2/tweets/search/stream/rules/counts operations: - name: getrulecounts method: GET description: X Get Stream Rule Counts outputRawFormat: json outputParameters: - name: result type: object value: $. - name: 2-tweets-id path: /2/tweets/{id} operations: - name: deleteposts method: DELETE description: X Delete Post outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID of the Post to be deleted. required: true - name: getpostsbyid method: GET description: X Get Post by ID outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: A single Post ID. required: true - name: 2-tweets-id-liking_users path: /2/tweets/{id}/liking_users operations: - name: getpostslikingusers method: GET description: X Get Liking Users outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: A single Post ID. required: true - name: max_results in: query type: integer description: The maximum number of results. - name: pagination_token in: query type: string description: This parameter is used to get the next 'page' of results. - name: 2-tweets-id-quote_tweets path: /2/tweets/{id}/quote_tweets operations: - name: getpostsquotedposts method: GET description: X Get Quoted Posts outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: A single Post ID. required: true - name: max_results in: query type: integer description: The maximum number of results to be returned. - name: pagination_token in: query type: string description: This parameter is used to get a specified 'page' of results. - name: exclude in: query type: array description: The set of entities to exclude (e.g. 'replies' or 'retweets'). - name: 2-tweets-id-retweeted_by path: /2/tweets/{id}/retweeted_by operations: - name: getpostsrepostedby method: GET description: X Get Reposted by outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: A single Post ID. required: true - name: max_results in: query type: integer description: The maximum number of results. - name: pagination_token in: query type: string description: This parameter is used to get the next 'page' of results. - name: 2-tweets-id-retweets path: /2/tweets/{id}/retweets operations: - name: getpostsreposts method: GET description: X Get Reposts outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: A single Post ID. required: true - name: max_results in: query type: integer description: The maximum number of results. - name: pagination_token in: query type: string description: This parameter is used to get the next 'page' of results. - name: 2-tweets-tweet_id-hidden path: /2/tweets/{tweet_id}/hidden operations: - name: hidepostsreply method: PUT description: X Hide Reply outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: tweet_id in: path type: string description: The ID of the reply that you want to hide or unhide. required: true - name: body in: body type: object description: Request body (JSON). required: false - name: 2-users-id-liked_tweets path: /2/users/{id}/liked_tweets operations: - name: getuserslikedposts method: GET description: X Get Liked Posts outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID of the User to lookup. required: true - name: max_results in: query type: integer description: The maximum number of results. - name: pagination_token in: query type: string description: This parameter is used to get the next 'page' of results. - name: 2-users-id-likes path: /2/users/{id}/likes operations: - name: likepost method: POST description: X Like Post outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID of the authenticated source User that is requesting to like the Post. required: true - name: body in: body type: object description: Request body (JSON). required: false - name: 2-users-id-likes-tweet_id path: /2/users/{id}/likes/{tweet_id} operations: - name: unlikepost method: DELETE description: X Unlike Post outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID of the authenticated source User that is requesting to unlike the Post. required: true - name: tweet_id in: path type: string description: The ID of the Post that the User is requesting to unlike. required: true - name: 2-users-id-mentions path: /2/users/{id}/mentions operations: - name: getusersmentions method: GET description: X Get Mentions outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID of the User to lookup. required: true - name: since_id in: query type: string description: The minimum Post ID to be included in the result set. This parameter takes precedence over start_time if both are specified. - name: until_id in: query type: string description: The maximum Post ID to be included in the result set. This parameter takes precedence over end_time if both are specified. - name: max_results in: query type: integer description: The maximum number of results. - name: pagination_token in: query type: string description: This parameter is used to get the next 'page' of results. - name: start_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Posts will be provided. The since_id parameter takes precedence if it is also specified. - name: end_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. The until_id parameter takes precedence if it is also specified. - name: 2-users-id-retweets path: /2/users/{id}/retweets operations: - name: repostpost method: POST description: X Repost Post outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID of the authenticated source User that is requesting to repost the Post. required: true - name: body in: body type: object description: Request body (JSON). required: false - name: 2-users-id-retweets-source_tweet_id path: /2/users/{id}/retweets/{source_tweet_id} operations: - name: unrepostpost method: DELETE description: X Unrepost Post outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID of the authenticated source User that is requesting to repost the Post. required: true - name: source_tweet_id in: path type: string description: The ID of the Post that the User is requesting to unretweet. required: true - name: 2-users-id-timelines-reverse_chronological path: /2/users/{id}/timelines/reverse_chronological operations: - name: getuserstimeline method: GET description: X Get Timeline outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID of the authenticated source User to list Reverse Chronological Timeline Posts of. required: true - name: since_id in: query type: string description: The minimum Post ID to be included in the result set. This parameter takes precedence over start_time if both are specified. - name: until_id in: query type: string description: The maximum Post ID to be included in the result set. This parameter takes precedence over end_time if both are specified. - name: max_results in: query type: integer description: The maximum number of results. - name: pagination_token in: query type: string description: This parameter is used to get the next 'page' of results. - name: exclude in: query type: array description: The set of entities to exclude (e.g. 'replies' or 'retweets'). - name: start_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Posts will be provided. The since_id parameter takes precedence if it is also specified. - name: end_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. The until_id parameter takes precedence if it is also specified. - name: 2-users-id-tweets path: /2/users/{id}/tweets operations: - name: getusersposts method: GET description: X Get Posts outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID of the User to lookup. required: true - name: since_id in: query type: string description: The minimum Post ID to be included in the result set. This parameter takes precedence over start_time if both are specified. - name: until_id in: query type: string description: The maximum Post ID to be included in the result set. This parameter takes precedence over end_time if both are specified. - name: max_results in: query type: integer description: The maximum number of results. - name: pagination_token in: query type: string description: This parameter is used to get the next 'page' of results. - name: exclude in: query type: array description: The set of entities to exclude (e.g. 'replies' or 'retweets'). - name: start_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Posts will be provided. The since_id parameter takes precedence if it is also specified. - name: end_time in: query type: string description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. The until_id parameter takes precedence if it is also specified. authentication: type: bearer token: '{{env.TWITTER_API_KEY}}' exposes: - type: rest namespace: x-tweets-rest port: 8080 description: REST adapter for X API v2 — Tweets. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/2/insights/28hr name: 2-insights-28hr description: REST surface for 2-insights-28hr. operations: - method: GET name: getinsights28hr description: X Get 28-hour Post Insights call: x-tweets.getinsights28hr with: tweet_ids: rest.tweet_ids granularity: rest.granularity requested_metrics: rest.requested_metrics outputParameters: - type: object mapping: $. - path: /v1/2/insights/historical name: 2-insights-historical description: REST surface for 2-insights-historical. operations: - method: GET name: getinsightshistorical description: X Get Historical Post Insights call: x-tweets.getinsightshistorical with: tweet_ids: rest.tweet_ids end_time: rest.end_time start_time: rest.start_time granularity: rest.granularity requested_metrics: rest.requested_metrics outputParameters: - type: object mapping: $. - path: /v1/2/lists/{id}/tweets name: 2-lists-id-tweets description: REST surface for 2-lists-id-tweets. operations: - method: GET name: getlistsposts description: X Get List Posts call: x-tweets.getlistsposts with: id: rest.id max_results: rest.max_results pagination_token: rest.pagination_token outputParameters: - type: object mapping: $. - path: /v1/2/spaces/{id}/buyers name: 2-spaces-id-buyers description: REST surface for 2-spaces-id-buyers. operations: - method: GET name: getspacesbuyers description: X Get Space Ticket Buyers call: x-tweets.getspacesbuyers with: id: rest.id pagination_token: rest.pagination_token max_results: rest.max_results outputParameters: - type: object mapping: $. - path: /v1/2/spaces/{id}/tweets name: 2-spaces-id-tweets description: REST surface for 2-spaces-id-tweets. operations: - method: GET name: getspacesposts description: X Get Space Posts call: x-tweets.getspacesposts with: id: rest.id max_results: rest.max_results outputParameters: - type: object mapping: $. - path: /v1/2/tweets name: 2-tweets description: REST surface for 2-tweets. operations: - method: GET name: getpostsbyids description: X Get Posts by IDs call: x-tweets.getpostsbyids with: ids: rest.ids outputParameters: - type: object mapping: $. - method: POST name: createposts description: X Create or Edit Post call: x-tweets.createposts with: body: rest.body outputParameters: - type: object mapping: $. - path: /v1/2/tweets/analytics name: 2-tweets-analytics description: REST surface for 2-tweets-analytics. operations: - method: GET name: getpostsanalytics description: X Get Post Analytics call: x-tweets.getpostsanalytics with: ids: rest.ids end_time: rest.end_time start_time: rest.start_time granularity: rest.granularity outputParameters: - type: object mapping: $. - path: /v1/2/tweets/counts/all name: 2-tweets-counts-all description: REST surface for 2-tweets-counts-all. operations: - method: GET name: getpostscountsall description: X Get Count of All Posts call: x-tweets.getpostscountsall with: query: rest.query start_time: rest.start_time end_time: rest.end_time since_id: rest.since_id until_id: rest.until_id next_token: rest.next_token pagination_token: rest.pagination_token granularity: rest.granularity outputParameters: - type: object mapping: $. - path: /v1/2/tweets/counts/recent name: 2-tweets-counts-recent description: REST surface for 2-tweets-counts-recent. operations: - method: GET name: getpostscountsrecent description: X Get Count of Recent Posts call: x-tweets.getpostscountsrecent with: query: rest.query start_time: rest.start_time end_time: rest.end_time since_id: rest.since_id until_id: rest.until_id next_token: rest.next_token pagination_token: rest.pagination_token granularity: rest.granularity outputParameters: - type: object mapping: $. - path: /v1/2/tweets/firehose/stream name: 2-tweets-firehose-stream description: REST surface for 2-tweets-firehose-stream. operations: - method: GET name: streampostsfirehose description: X Stream All Posts call: x-tweets.streampostsfirehose with: backfill_minutes: rest.backfill_minutes partition: rest.partition start_time: rest.start_time end_time: rest.end_time outputParameters: - type: object mapping: $. - path: /v1/2/tweets/firehose/stream/lang/en name: 2-tweets-firehose-stream-lang-en description: REST surface for 2-tweets-firehose-stream-lang-en. operations: - method: GET name: streampostsfirehoseen description: X Stream English Posts call: x-tweets.streampostsfirehoseen with: backfill_minutes: rest.backfill_minutes partition: rest.partition start_time: rest.start_time end_time: rest.end_time outputParameters: - type: object mapping: $. - path: /v1/2/tweets/firehose/stream/lang/ja name: 2-tweets-firehose-stream-lang-ja description: REST surface for 2-tweets-firehose-stream-lang-ja. operations: - method: GET name: streampostsfirehoseja description: X Stream Japanese Posts call: x-tweets.streampostsfirehoseja with: backfill_minutes: rest.backfill_minutes partition: rest.partition start_time: rest.start_time end_time: rest.end_time outputParameters: - type: object mapping: $. - path: /v1/2/tweets/firehose/stream/lang/ko name: 2-tweets-firehose-stream-lang-ko description: REST surface for 2-tweets-firehose-stream-lang-ko. operations: - method: GET name: streampostsfirehoseko description: X Stream Korean Posts call: x-tweets.streampostsfirehoseko with: backfill_minutes: rest.backfill_minutes partition: rest.partition start_time: rest.start_time end_time: rest.end_time outputParameters: - type: object mapping: $. - path: /v1/2/tweets/firehose/stream/lang/pt name: 2-tweets-firehose-stream-lang-pt description: REST surface for 2-tweets-firehose-stream-lang-pt. operations: - method: GET name: streampostsfirehosept description: X Stream Portuguese Posts call: x-tweets.streampostsfirehosept with: backfill_minutes: rest.backfill_minutes partition: rest.partition start_time: rest.start_time end_time: rest.end_time outputParameters: - type: object mapping: $. - path: /v1/2/tweets/sample/stream name: 2-tweets-sample-stream description: REST surface for 2-tweets-sample-stream. operations: - method: GET name: streampostssample description: X Stream Sampled Posts call: x-tweets.streampostssample with: backfill_minutes: rest.backfill_minutes outputParameters: - type: object mapping: $. - path: /v1/2/tweets/sample10/stream name: 2-tweets-sample10-stream description: REST surface for 2-tweets-sample10-stream. operations: - method: GET name: streampostssample10 description: X Stream 10% Sampled Posts call: x-tweets.streampostssample10 with: backfill_minutes: rest.backfill_minutes partition: rest.partition start_time: rest.start_time end_time: rest.end_time outputParameters: - type: object mapping: $. - path: /v1/2/tweets/search/all name: 2-tweets-search-all description: REST surface for 2-tweets-search-all. operations: - method: GET name: searchpostsall description: X Search All Posts call: x-tweets.searchpostsall with: query: rest.query start_time: rest.start_time end_time: rest.end_time since_id: rest.since_id until_id: rest.until_id max_results: rest.max_results next_token: rest.next_token pagination_token: rest.pagination_token sort_order: rest.sort_order outputParameters: - type: object mapping: $. - path: /v1/2/tweets/search/recent name: 2-tweets-search-recent description: REST surface for 2-tweets-search-recent. operations: - method: GET name: searchpostsrecent description: X Search Recent Posts call: x-tweets.searchpostsrecent with: query: rest.query start_time: rest.start_time end_time: rest.end_time since_id: rest.since_id until_id: rest.until_id max_results: rest.max_results next_token: rest.next_token pagination_token: rest.pagination_token sort_order: rest.sort_order outputParameters: - type: object mapping: $. - path: /v1/2/tweets/search/stream name: 2-tweets-search-stream description: REST surface for 2-tweets-search-stream. operations: - method: GET name: streamposts description: X Stream Filtered Posts call: x-tweets.streamposts with: backfill_minutes: rest.backfill_minutes start_time: rest.start_time end_time: rest.end_time outputParameters: - type: object mapping: $. - path: /v1/2/tweets/search/stream/rules name: 2-tweets-search-stream-rules description: REST surface for 2-tweets-search-stream-rules. operations: - method: GET name: getrules description: X Get Stream Rules call: x-tweets.getrules with: ids: rest.ids max_results: rest.max_results pagination_token: rest.pagination_token outputParameters: - type: object mapping: $. - method: POST name: updaterules description: X Update Stream Rules call: x-tweets.updaterules with: dry_run: rest.dry_run delete_all: rest.delete_all body: rest.body outputParameters: - type: object mapping: $. - path: /v1/2/tweets/search/stream/rules/counts name: 2-tweets-search-stream-rules-counts description: REST surface for 2-tweets-search-stream-rules-counts. operations: - method: GET name: getrulecounts description: X Get Stream Rule Counts call: x-tweets.getrulecounts outputParameters: - type: object mapping: $. - path: /v1/2/tweets/{id} name: 2-tweets-id description: REST surface for 2-tweets-id. operations: - method: DELETE name: deleteposts description: X Delete Post call: x-tweets.deleteposts with: id: rest.id outputParameters: - type: object mapping: $. - method: GET name: getpostsbyid description: X Get Post by ID call: x-tweets.getpostsbyid with: id: rest.id outputParameters: - type: object mapping: $. - path: /v1/2/tweets/{id}/liking-users name: 2-tweets-id-liking-users description: REST surface for 2-tweets-id-liking_users. operations: - method: GET name: getpostslikingusers description: X Get Liking Users call: x-tweets.getpostslikingusers with: id: rest.id max_results: rest.max_results pagination_token: rest.pagination_token outputParameters: - type: object mapping: $. - path: /v1/2/tweets/{id}/quote-tweets name: 2-tweets-id-quote-tweets description: REST surface for 2-tweets-id-quote_tweets. operations: - method: GET name: getpostsquotedposts description: X Get Quoted Posts call: x-tweets.getpostsquotedposts with: id: rest.id max_results: rest.max_results pagination_token: rest.pagination_token exclude: rest.exclude outputParameters: - type: object mapping: $. - path: /v1/2/tweets/{id}/retweeted-by name: 2-tweets-id-retweeted-by description: REST surface for 2-tweets-id-retweeted_by. operations: - method: GET name: getpostsrepostedby description: X Get Reposted by call: x-tweets.getpostsrepostedby with: id: rest.id max_results: rest.max_results pagination_token: rest.pagination_token outputParameters: - type: object mapping: $. - path: /v1/2/tweets/{id}/retweets name: 2-tweets-id-retweets description: REST surface for 2-tweets-id-retweets. operations: - method: GET name: getpostsreposts description: X Get Reposts call: x-tweets.getpostsreposts with: id: rest.id max_results: rest.max_results pagination_token: rest.pagination_token outputParameters: - type: object mapping: $. - path: /v1/2/tweets/{tweet-id}/hidden name: 2-tweets-tweet-id-hidden description: REST surface for 2-tweets-tweet_id-hidden. operations: - method: PUT name: hidepostsreply description: X Hide Reply call: x-tweets.hidepostsreply with: tweet_id: rest.tweet_id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/2/users/{id}/liked-tweets name: 2-users-id-liked-tweets description: REST surface for 2-users-id-liked_tweets. operations: - method: GET name: getuserslikedposts description: X Get Liked Posts call: x-tweets.getuserslikedposts with: id: rest.id max_results: rest.max_results pagination_token: rest.pagination_token outputParameters: - type: object mapping: $. - path: /v1/2/users/{id}/likes name: 2-users-id-likes description: REST surface for 2-users-id-likes. operations: - method: POST name: likepost description: X Like Post call: x-tweets.likepost with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/2/users/{id}/likes/{tweet-id} name: 2-users-id-likes-tweet-id description: REST surface for 2-users-id-likes-tweet_id. operations: - method: DELETE name: unlikepost description: X Unlike Post call: x-tweets.unlikepost with: id: rest.id tweet_id: rest.tweet_id outputParameters: - type: object mapping: $. - path: /v1/2/users/{id}/mentions name: 2-users-id-mentions description: REST surface for 2-users-id-mentions. operations: - method: GET name: getusersmentions description: X Get Mentions call: x-tweets.getusersmentions with: id: rest.id since_id: rest.since_id until_id: rest.until_id max_results: rest.max_results pagination_token: rest.pagination_token start_time: rest.start_time end_time: rest.end_time outputParameters: - type: object mapping: $. - path: /v1/2/users/{id}/retweets name: 2-users-id-retweets description: REST surface for 2-users-id-retweets. operations: - method: POST name: repostpost description: X Repost Post call: x-tweets.repostpost with: id: rest.id body: rest.body outputParameters: - type: object mapping: $. - path: /v1/2/users/{id}/retweets/{source-tweet-id} name: 2-users-id-retweets-source-tweet-id description: REST surface for 2-users-id-retweets-source_tweet_id. operations: - method: DELETE name: unrepostpost description: X Unrepost Post call: x-tweets.unrepostpost with: id: rest.id source_tweet_id: rest.source_tweet_id outputParameters: - type: object mapping: $. - path: /v1/2/users/{id}/timelines/reverse-chronological name: 2-users-id-timelines-reverse-chronological description: REST surface for 2-users-id-timelines-reverse_chronological. operations: - method: GET name: getuserstimeline description: X Get Timeline call: x-tweets.getuserstimeline with: id: rest.id since_id: rest.since_id until_id: rest.until_id max_results: rest.max_results pagination_token: rest.pagination_token exclude: rest.exclude start_time: rest.start_time end_time: rest.end_time outputParameters: - type: object mapping: $. - path: /v1/2/users/{id}/tweets name: 2-users-id-tweets description: REST surface for 2-users-id-tweets. operations: - method: GET name: getusersposts description: X Get Posts call: x-tweets.getusersposts with: id: rest.id since_id: rest.since_id until_id: rest.until_id max_results: rest.max_results pagination_token: rest.pagination_token exclude: rest.exclude start_time: rest.start_time end_time: rest.end_time outputParameters: - type: object mapping: $. - type: mcp namespace: x-tweets-mcp port: 9090 transport: http description: MCP adapter for X API v2 — Tweets. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: x-get-28-hour-post description: X Get 28-hour Post Insights hints: readOnly: true destructive: false idempotent: true call: x-tweets.getinsights28hr with: tweet_ids: tools.tweet_ids granularity: tools.granularity requested_metrics: tools.requested_metrics outputParameters: - type: object mapping: $. - name: x-get-historical-post-insights description: X Get Historical Post Insights hints: readOnly: true destructive: false idempotent: true call: x-tweets.getinsightshistorical with: tweet_ids: tools.tweet_ids end_time: tools.end_time start_time: tools.start_time granularity: tools.granularity requested_metrics: tools.requested_metrics outputParameters: - type: object mapping: $. - name: x-get-list-posts description: X Get List Posts hints: readOnly: true destructive: false idempotent: true call: x-tweets.getlistsposts with: id: tools.id max_results: tools.max_results pagination_token: tools.pagination_token outputParameters: - type: object mapping: $. - name: x-get-space-ticket-buyers description: X Get Space Ticket Buyers hints: readOnly: true destructive: false idempotent: true call: x-tweets.getspacesbuyers with: id: tools.id pagination_token: tools.pagination_token max_results: tools.max_results outputParameters: - type: object mapping: $. - name: x-get-space-posts description: X Get Space Posts hints: readOnly: true destructive: false idempotent: true call: x-tweets.getspacesposts with: id: tools.id max_results: tools.max_results outputParameters: - type: object mapping: $. - name: x-get-posts-ids description: X Get Posts by IDs hints: readOnly: true destructive: false idempotent: true call: x-tweets.getpostsbyids with: ids: tools.ids outputParameters: - type: object mapping: $. - name: x-create-edit-post description: X Create or Edit Post hints: readOnly: false destructive: false idempotent: false call: x-tweets.createposts with: body: tools.body outputParameters: - type: object mapping: $. - name: x-get-post-analytics description: X Get Post Analytics hints: readOnly: true destructive: false idempotent: true call: x-tweets.getpostsanalytics with: ids: tools.ids end_time: tools.end_time start_time: tools.start_time granularity: tools.granularity outputParameters: - type: object mapping: $. - name: x-get-count-all-posts description: X Get Count of All Posts hints: readOnly: true destructive: false idempotent: true call: x-tweets.getpostscountsall with: query: tools.query start_time: tools.start_time end_time: tools.end_time since_id: tools.since_id until_id: tools.until_id next_token: tools.next_token pagination_token: tools.pagination_token granularity: tools.granularity outputParameters: - type: object mapping: $. - name: x-get-count-recent-posts description: X Get Count of Recent Posts hints: readOnly: true destructive: false idempotent: true call: x-tweets.getpostscountsrecent with: query: tools.query start_time: tools.start_time end_time: tools.end_time since_id: tools.since_id until_id: tools.until_id next_token: tools.next_token pagination_token: tools.pagination_token granularity: tools.granularity outputParameters: - type: object mapping: $. - name: x-stream-all-posts description: X Stream All Posts hints: readOnly: true destructive: false idempotent: true call: x-tweets.streampostsfirehose with: backfill_minutes: tools.backfill_minutes partition: tools.partition start_time: tools.start_time end_time: tools.end_time outputParameters: - type: object mapping: $. - name: x-stream-english-posts description: X Stream English Posts hints: readOnly: true destructive: false idempotent: true call: x-tweets.streampostsfirehoseen with: backfill_minutes: tools.backfill_minutes partition: tools.partition start_time: tools.start_time end_time: tools.end_time outputParameters: - type: object mapping: $. - name: x-stream-japanese-posts description: X Stream Japanese Posts hints: readOnly: true destructive: false idempotent: true call: x-tweets.streampostsfirehoseja with: backfill_minutes: tools.backfill_minutes partition: tools.partition start_time: tools.start_time end_time: tools.end_time outputParameters: - type: object mapping: $. - name: x-stream-korean-posts description: X Stream Korean Posts hints: readOnly: true destructive: false idempotent: true call: x-tweets.streampostsfirehoseko with: backfill_minutes: tools.backfill_minutes partition: tools.partition start_time: tools.start_time end_time: tools.end_time outputParameters: - type: object mapping: $. - name: x-stream-portuguese-posts description: X Stream Portuguese Posts hints: readOnly: true destructive: false idempotent: true call: x-tweets.streampostsfirehosept with: backfill_minutes: tools.backfill_minutes partition: tools.partition start_time: tools.start_time end_time: tools.end_time outputParameters: - type: object mapping: $. - name: x-stream-sampled-posts description: X Stream Sampled Posts hints: readOnly: true destructive: false idempotent: true call: x-tweets.streampostssample with: backfill_minutes: tools.backfill_minutes outputParameters: - type: object mapping: $. - name: x-stream-10-sampled-posts description: X Stream 10% Sampled Posts hints: readOnly: true destructive: false idempotent: true call: x-tweets.streampostssample10 with: backfill_minutes: tools.backfill_minutes partition: tools.partition start_time: tools.start_time end_time: tools.end_time outputParameters: - type: object mapping: $. - name: x-search-all-posts description: X Search All Posts hints: readOnly: true destructive: false idempotent: true call: x-tweets.searchpostsall with: query: tools.query start_time: tools.start_time end_time: tools.end_time since_id: tools.since_id until_id: tools.until_id max_results: tools.max_results next_token: tools.next_token pagination_token: tools.pagination_token sort_order: tools.sort_order outputParameters: - type: object mapping: $. - name: x-search-recent-posts description: X Search Recent Posts hints: readOnly: true destructive: false idempotent: true call: x-tweets.searchpostsrecent with: query: tools.query start_time: tools.start_time end_time: tools.end_time since_id: tools.since_id until_id: tools.until_id max_results: tools.max_results next_token: tools.next_token pagination_token: tools.pagination_token sort_order: tools.sort_order outputParameters: - type: object mapping: $. - name: x-stream-filtered-posts description: X Stream Filtered Posts hints: readOnly: true destructive: false idempotent: true call: x-tweets.streamposts with: backfill_minutes: tools.backfill_minutes start_time: tools.start_time end_time: tools.end_time outputParameters: - type: object mapping: $. - name: x-get-stream-rules description: X Get Stream Rules hints: readOnly: true destructive: false idempotent: true call: x-tweets.getrules with: ids: tools.ids max_results: tools.max_results pagination_token: tools.pagination_token outputParameters: - type: object mapping: $. - name: x-update-stream-rules description: X Update Stream Rules hints: readOnly: false destructive: false idempotent: false call: x-tweets.updaterules with: dry_run: tools.dry_run delete_all: tools.delete_all body: tools.body outputParameters: - type: object mapping: $. - name: x-get-stream-rule-counts description: X Get Stream Rule Counts hints: readOnly: true destructive: false idempotent: true call: x-tweets.getrulecounts outputParameters: - type: object mapping: $. - name: x-delete-post description: X Delete Post hints: readOnly: false destructive: true idempotent: true call: x-tweets.deleteposts with: id: tools.id outputParameters: - type: object mapping: $. - name: x-get-post-id description: X Get Post by ID hints: readOnly: true destructive: false idempotent: true call: x-tweets.getpostsbyid with: id: tools.id outputParameters: - type: object mapping: $. - name: x-get-liking-users description: X Get Liking Users hints: readOnly: true destructive: false idempotent: true call: x-tweets.getpostslikingusers with: id: tools.id max_results: tools.max_results pagination_token: tools.pagination_token outputParameters: - type: object mapping: $. - name: x-get-quoted-posts description: X Get Quoted Posts hints: readOnly: true destructive: false idempotent: true call: x-tweets.getpostsquotedposts with: id: tools.id max_results: tools.max_results pagination_token: tools.pagination_token exclude: tools.exclude outputParameters: - type: object mapping: $. - name: x-get-reposted description: X Get Reposted by hints: readOnly: true destructive: false idempotent: true call: x-tweets.getpostsrepostedby with: id: tools.id max_results: tools.max_results pagination_token: tools.pagination_token outputParameters: - type: object mapping: $. - name: x-get-reposts description: X Get Reposts hints: readOnly: true destructive: false idempotent: true call: x-tweets.getpostsreposts with: id: tools.id max_results: tools.max_results pagination_token: tools.pagination_token outputParameters: - type: object mapping: $. - name: x-hide-reply description: X Hide Reply hints: readOnly: false destructive: false idempotent: true call: x-tweets.hidepostsreply with: tweet_id: tools.tweet_id body: tools.body outputParameters: - type: object mapping: $. - name: x-get-liked-posts description: X Get Liked Posts hints: readOnly: true destructive: false idempotent: true call: x-tweets.getuserslikedposts with: id: tools.id max_results: tools.max_results pagination_token: tools.pagination_token outputParameters: - type: object mapping: $. - name: x-like-post description: X Like Post hints: readOnly: false destructive: false idempotent: false call: x-tweets.likepost with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: x-unlike-post description: X Unlike Post hints: readOnly: false destructive: true idempotent: true call: x-tweets.unlikepost with: id: tools.id tweet_id: tools.tweet_id outputParameters: - type: object mapping: $. - name: x-get-mentions description: X Get Mentions hints: readOnly: true destructive: false idempotent: true call: x-tweets.getusersmentions with: id: tools.id since_id: tools.since_id until_id: tools.until_id max_results: tools.max_results pagination_token: tools.pagination_token start_time: tools.start_time end_time: tools.end_time outputParameters: - type: object mapping: $. - name: x-repost-post description: X Repost Post hints: readOnly: false destructive: false idempotent: false call: x-tweets.repostpost with: id: tools.id body: tools.body outputParameters: - type: object mapping: $. - name: x-unrepost-post description: X Unrepost Post hints: readOnly: false destructive: true idempotent: true call: x-tweets.unrepostpost with: id: tools.id source_tweet_id: tools.source_tweet_id outputParameters: - type: object mapping: $. - name: x-get-timeline description: X Get Timeline hints: readOnly: true destructive: false idempotent: true call: x-tweets.getuserstimeline with: id: tools.id since_id: tools.since_id until_id: tools.until_id max_results: tools.max_results pagination_token: tools.pagination_token exclude: tools.exclude start_time: tools.start_time end_time: tools.end_time outputParameters: - type: object mapping: $. - name: x-get-posts description: X Get Posts hints: readOnly: true destructive: false idempotent: true call: x-tweets.getusersposts with: id: tools.id since_id: tools.since_id until_id: tools.until_id max_results: tools.max_results pagination_token: tools.pagination_token exclude: tools.exclude start_time: tools.start_time end_time: tools.end_time outputParameters: - type: object mapping: $.