openapi: 3.2.0 info: description: X API v2 core endpoints version: '2.168' title: X API v2 Stream API termsOfService: https://developer.x.com/en/developer-terms/agreement-and-policy.html contact: name: X Developers url: https://developer.x.com/ license: name: X Developer Agreement and Policy url: https://developer.x.com/en/developer-terms/agreement-and-policy.html servers: - description: X API url: https://api.x.com tags: - name: Stream description: Endpoints related to streaming externalDocs: description: Find out more url: https://developer.x.com/ paths: /2/activity/stream: get: security: - BearerToken: [] tags: - Stream summary: Activity Stream description: Stream of X Activities externalDocs: url: https://docs.x.com/x-api/activity/activity-stream operationId: activityStream parameters: - name: backfill_minutes in: query description: The number of minutes of backfill requested. required: false schema: type: integer minimum: 0 maximum: 5 format: int32 style: form - name: start_time in: query description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the activities will be provided. required: false schema: type: string format: date-time style: form - name: end_time in: query description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the activities will be provided. required: false schema: type: string format: date-time style: form responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/ActivityStreamResponse' default: description: The request has failed. content: application/json: schema: $ref: '#/components/schemas/Error' application/problem+json: schema: $ref: '#/components/schemas/Problem' x-twitter-streaming: true /2/likes/compliance/stream: get: security: - BearerToken: [] tags: - Stream summary: Stream Likes compliance data description: Streams all compliance data related to Likes for Users. operationId: streamLikesCompliance parameters: - name: backfill_minutes in: query description: The number of minutes of backfill requested. required: false schema: type: integer minimum: 0 maximum: 5 format: int32 style: form - name: start_time in: query description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Likes Compliance events will be provided. required: false schema: type: string format: date-time style: form - name: end_time in: query description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Likes Compliance events will be provided. required: false schema: type: string format: date-time style: form responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/StreamLikesComplianceResponse' default: description: The request has failed. content: application/json: schema: $ref: '#/components/schemas/Error' application/problem+json: schema: $ref: '#/components/schemas/Problem' x-twitter-streaming: true /2/likes/firehose/stream: get: security: - BearerToken: [] tags: - Stream summary: Stream all Likes description: Streams all public Likes in real-time. operationId: streamLikesFirehose parameters: - name: backfill_minutes in: query description: The number of minutes of backfill requested. required: false schema: type: integer minimum: 0 maximum: 5 format: int32 style: form - name: partition in: query description: The partition number. required: true schema: type: integer minimum: 1 maximum: 20 format: int32 style: form - name: start_time in: query description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Likes will be provided. required: false schema: type: string format: date-time style: form - name: end_time in: query description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. required: false schema: type: string format: date-time style: form - name: like_with_tweet_author.fields in: query description: A comma separated list of LikeWithTweetAuthor fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - attachments_media_keys - created_at - id - liked_tweet_author_id - liked_tweet_id - timestamp_ms explode: false style: form - name: expansions in: query description: A comma separated list of fields to expand. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - attachments.media_keys - liked_tweet_author_id - liked_tweet_id explode: false style: form - name: media.fields in: query description: A comma separated list of Media fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - alt_text - duration_ms - height - media_key - non_public_metrics - organic_metrics - preview_image_url - promoted_metrics - public_metrics - type - url - variants - width explode: false style: form - name: user.fields in: query description: A comma separated list of User fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - affiliation - confirmed_email - connection_status - created_at - description - entities - id - is_identity_verified - location - most_recent_tweet_id - name - parody - pinned_tweet_id - profile_banner_url - profile_image_url - protected - public_metrics - receives_your_dm - subscription - subscription_type - url - username - verified - verified_followers_count - verified_type - withheld explode: false style: form - name: tweet.fields in: query description: A comma separated list of Tweet fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - article - attachments - author_id - card_uri - community_id - context_annotations - conversation_id - created_at - display_text_range - edit_controls - edit_history_tweet_ids - entities - geo - id - in_reply_to_user_id - lang - matched_media_notes - media_metadata - non_public_metrics - note_request_suggestions - note_tweet - organic_metrics - paid_partnership - possibly_sensitive - promoted_metrics - public_metrics - referenced_tweets - reply_settings - scopes - source - suggested_source_links - suggested_source_links_with_counts - text - withheld explode: false style: form responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/StreamLikesFirehoseResponse' default: description: The request has failed. content: application/json: schema: $ref: '#/components/schemas/Error' application/problem+json: schema: $ref: '#/components/schemas/Problem' x-twitter-streaming: true /2/likes/sample10/stream: get: security: - BearerToken: [] tags: - Stream summary: Stream sampled Likes description: Streams a 10% sample of public Likes in real-time. operationId: streamLikesSample10 parameters: - name: backfill_minutes in: query description: The number of minutes of backfill requested. required: false schema: type: integer minimum: 0 maximum: 5 format: int32 style: form - name: partition in: query description: The partition number. required: true schema: type: integer minimum: 1 maximum: 2 format: int32 style: form - name: start_time in: query description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Likes will be provided. required: false schema: type: string format: date-time style: form - name: end_time in: query description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. required: false schema: type: string format: date-time style: form - name: like_with_tweet_author.fields in: query description: A comma separated list of LikeWithTweetAuthor fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - attachments_media_keys - created_at - id - liked_tweet_author_id - liked_tweet_id - timestamp_ms explode: false style: form - name: expansions in: query description: A comma separated list of fields to expand. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - attachments.media_keys - liked_tweet_author_id - liked_tweet_id explode: false style: form - name: media.fields in: query description: A comma separated list of Media fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - alt_text - duration_ms - height - media_key - non_public_metrics - organic_metrics - preview_image_url - promoted_metrics - public_metrics - type - url - variants - width explode: false style: form - name: user.fields in: query description: A comma separated list of User fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - affiliation - confirmed_email - connection_status - created_at - description - entities - id - is_identity_verified - location - most_recent_tweet_id - name - parody - pinned_tweet_id - profile_banner_url - profile_image_url - protected - public_metrics - receives_your_dm - subscription - subscription_type - url - username - verified - verified_followers_count - verified_type - withheld explode: false style: form - name: tweet.fields in: query description: A comma separated list of Tweet fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - article - attachments - author_id - card_uri - community_id - context_annotations - conversation_id - created_at - display_text_range - edit_controls - edit_history_tweet_ids - entities - geo - id - in_reply_to_user_id - lang - matched_media_notes - media_metadata - non_public_metrics - note_request_suggestions - note_tweet - organic_metrics - paid_partnership - possibly_sensitive - promoted_metrics - public_metrics - referenced_tweets - reply_settings - scopes - source - suggested_source_links - suggested_source_links_with_counts - text - withheld explode: false style: form responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/StreamLikesSample10Response' default: description: The request has failed. content: application/json: schema: $ref: '#/components/schemas/Error' application/problem+json: schema: $ref: '#/components/schemas/Problem' x-twitter-streaming: true /2/tweets/compliance/stream: get: security: - BearerToken: [] tags: - Stream summary: Stream Posts compliance data description: Streams all compliance data related to Posts. operationId: streamPostsCompliance parameters: - name: backfill_minutes in: query description: The number of minutes of backfill requested. required: false schema: type: integer minimum: 0 maximum: 5 format: int32 style: form - name: partition in: query description: The partition number. required: true schema: type: integer minimum: 1 maximum: 4 format: int32 style: form - name: start_time in: query description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Post Compliance events will be provided. required: false schema: type: string format: date-time style: form - name: end_time in: query description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Post Compliance events will be provided. required: false schema: type: string format: date-time style: form responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/StreamPostsComplianceResponse' default: description: The request has failed. content: application/json: schema: $ref: '#/components/schemas/Error' application/problem+json: schema: $ref: '#/components/schemas/Problem' x-twitter-streaming: true /2/tweets/firehose/stream: get: security: - BearerToken: [] tags: - Stream summary: Stream all Posts description: Streams all public Posts in real-time. operationId: streamPostsFirehose parameters: - name: backfill_minutes in: query description: The number of minutes of backfill requested. required: false schema: type: integer minimum: 0 maximum: 5 format: int32 style: form - name: tweet.fields in: query description: A comma separated list of Tweet fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - article - attachments - author_id - card_uri - community_id - context_annotations - conversation_id - created_at - display_text_range - edit_controls - edit_history_tweet_ids - entities - geo - id - in_reply_to_user_id - lang - matched_media_notes - media_metadata - non_public_metrics - note_request_suggestions - note_tweet - organic_metrics - paid_partnership - possibly_sensitive - promoted_metrics - public_metrics - referenced_tweets - reply_settings - scopes - source - suggested_source_links - suggested_source_links_with_counts - text - withheld explode: false style: form - name: expansions in: query description: A comma separated list of fields to expand. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - article.cover_media - article.media_entities - attachments.media_keys - attachments.media_source_tweet - attachments.poll_ids - author_id - edit_history_tweet_ids - entities.mentions.username - geo.place_id - in_reply_to_user_id - entities.note.mentions.username - referenced_tweets.id - referenced_tweets.id.attachments.media_keys - referenced_tweets.id.author_id explode: false style: form - name: media.fields in: query description: A comma separated list of Media fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - alt_text - duration_ms - height - media_key - non_public_metrics - organic_metrics - preview_image_url - promoted_metrics - public_metrics - type - url - variants - width explode: false style: form - name: poll.fields in: query description: A comma separated list of Poll fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - duration_minutes - end_datetime - id - options - voting_status explode: false style: form - name: user.fields in: query description: A comma separated list of User fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - affiliation - confirmed_email - connection_status - created_at - description - entities - id - is_identity_verified - location - most_recent_tweet_id - name - parody - pinned_tweet_id - profile_banner_url - profile_image_url - protected - public_metrics - receives_your_dm - subscription - subscription_type - url - username - verified - verified_followers_count - verified_type - withheld explode: false style: form - name: place.fields in: query description: A comma separated list of Place fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - contained_within - country - country_code - full_name - geo - id - name - place_type explode: false style: form - name: partition in: query description: The partition number. required: true schema: type: integer minimum: 1 maximum: 20 format: int32 style: form - name: start_time in: query description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. required: false schema: type: string format: date-time style: form - name: end_time in: query description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. required: false schema: type: string format: date-time style: form responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/StreamPostsFirehoseResponse' default: description: The request has failed. content: application/json: schema: $ref: '#/components/schemas/Error' application/problem+json: schema: $ref: '#/components/schemas/Problem' x-twitter-streaming: true /2/tweets/firehose/stream/lang/en: get: security: - BearerToken: [] tags: - Stream summary: Stream English Posts description: Streams all public English-language Posts in real-time. operationId: streamPostsFirehoseEn parameters: - name: backfill_minutes in: query description: The number of minutes of backfill requested. required: false schema: type: integer minimum: 0 maximum: 5 format: int32 style: form - name: tweet.fields in: query description: A comma separated list of Tweet fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - article - attachments - author_id - card_uri - community_id - context_annotations - conversation_id - created_at - display_text_range - edit_controls - edit_history_tweet_ids - entities - geo - id - in_reply_to_user_id - lang - matched_media_notes - media_metadata - non_public_metrics - note_request_suggestions - note_tweet - organic_metrics - paid_partnership - possibly_sensitive - promoted_metrics - public_metrics - referenced_tweets - reply_settings - scopes - source - suggested_source_links - suggested_source_links_with_counts - text - withheld explode: false style: form - name: expansions in: query description: A comma separated list of fields to expand. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - article.cover_media - article.media_entities - attachments.media_keys - attachments.media_source_tweet - attachments.poll_ids - author_id - edit_history_tweet_ids - entities.mentions.username - geo.place_id - in_reply_to_user_id - entities.note.mentions.username - referenced_tweets.id - referenced_tweets.id.attachments.media_keys - referenced_tweets.id.author_id explode: false style: form - name: media.fields in: query description: A comma separated list of Media fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - alt_text - duration_ms - height - media_key - non_public_metrics - organic_metrics - preview_image_url - promoted_metrics - public_metrics - type - url - variants - width explode: false style: form - name: poll.fields in: query description: A comma separated list of Poll fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - duration_minutes - end_datetime - id - options - voting_status explode: false style: form - name: user.fields in: query description: A comma separated list of User fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - affiliation - confirmed_email - connection_status - created_at - description - entities - id - is_identity_verified - location - most_recent_tweet_id - name - parody - pinned_tweet_id - profile_banner_url - profile_image_url - protected - public_metrics - receives_your_dm - subscription - subscription_type - url - username - verified - verified_followers_count - verified_type - withheld explode: false style: form - name: place.fields in: query description: A comma separated list of Place fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - contained_within - country - country_code - full_name - geo - id - name - place_type explode: false style: form - name: partition in: query description: The partition number. required: true schema: type: integer minimum: 1 maximum: 8 format: int32 style: form - name: start_time in: query description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. required: false schema: type: string format: date-time style: form - name: end_time in: query description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. required: false schema: type: string format: date-time style: form responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/StreamPostsFirehoseEnResponse' default: description: The request has failed. content: application/json: schema: $ref: '#/components/schemas/Error' application/problem+json: schema: $ref: '#/components/schemas/Problem' x-twitter-streaming: true /2/tweets/firehose/stream/lang/ja: get: security: - BearerToken: [] tags: - Stream summary: Stream Japanese Posts description: Streams all public Japanese-language Posts in real-time. operationId: streamPostsFirehoseJa parameters: - name: backfill_minutes in: query description: The number of minutes of backfill requested. required: false schema: type: integer minimum: 0 maximum: 5 format: int32 style: form - name: tweet.fields in: query description: A comma separated list of Tweet fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - article - attachments - author_id - card_uri - community_id - context_annotations - conversation_id - created_at - display_text_range - edit_controls - edit_history_tweet_ids - entities - geo - id - in_reply_to_user_id - lang - matched_media_notes - media_metadata - non_public_metrics - note_request_suggestions - note_tweet - organic_metrics - paid_partnership - possibly_sensitive - promoted_metrics - public_metrics - referenced_tweets - reply_settings - scopes - source - suggested_source_links - suggested_source_links_with_counts - text - withheld explode: false style: form - name: expansions in: query description: A comma separated list of fields to expand. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - article.cover_media - article.media_entities - attachments.media_keys - attachments.media_source_tweet - attachments.poll_ids - author_id - edit_history_tweet_ids - entities.mentions.username - geo.place_id - in_reply_to_user_id - entities.note.mentions.username - referenced_tweets.id - referenced_tweets.id.attachments.media_keys - referenced_tweets.id.author_id explode: false style: form - name: media.fields in: query description: A comma separated list of Media fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - alt_text - duration_ms - height - media_key - non_public_metrics - organic_metrics - preview_image_url - promoted_metrics - public_metrics - type - url - variants - width explode: false style: form - name: poll.fields in: query description: A comma separated list of Poll fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - duration_minutes - end_datetime - id - options - voting_status explode: false style: form - name: user.fields in: query description: A comma separated list of User fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - affiliation - confirmed_email - connection_status - created_at - description - entities - id - is_identity_verified - location - most_recent_tweet_id - name - parody - pinned_tweet_id - profile_banner_url - profile_image_url - protected - public_metrics - receives_your_dm - subscription - subscription_type - url - username - verified - verified_followers_count - verified_type - withheld explode: false style: form - name: place.fields in: query description: A comma separated list of Place fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - contained_within - country - country_code - full_name - geo - id - name - place_type explode: false style: form - name: partition in: query description: The partition number. required: true schema: type: integer minimum: 1 maximum: 2 format: int32 style: form - name: start_time in: query description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. required: false schema: type: string format: date-time style: form - name: end_time in: query description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. required: false schema: type: string format: date-time style: form responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/StreamPostsFirehoseJaResponse' default: description: The request has failed. content: application/json: schema: $ref: '#/components/schemas/Error' application/problem+json: schema: $ref: '#/components/schemas/Problem' x-twitter-streaming: true /2/tweets/firehose/stream/lang/ko: get: security: - BearerToken: [] tags: - Stream summary: Stream Korean Posts description: Streams all public Korean-language Posts in real-time. operationId: streamPostsFirehoseKo parameters: - name: backfill_minutes in: query description: The number of minutes of backfill requested. required: false schema: type: integer minimum: 0 maximum: 5 format: int32 style: form - name: tweet.fields in: query description: A comma separated list of Tweet fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - article - attachments - author_id - card_uri - community_id - context_annotations - conversation_id - created_at - display_text_range - edit_controls - edit_history_tweet_ids - entities - geo - id - in_reply_to_user_id - lang - matched_media_notes - media_metadata - non_public_metrics - note_request_suggestions - note_tweet - organic_metrics - paid_partnership - possibly_sensitive - promoted_metrics - public_metrics - referenced_tweets - reply_settings - scopes - source - suggested_source_links - suggested_source_links_with_counts - text - withheld explode: false style: form - name: expansions in: query description: A comma separated list of fields to expand. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - article.cover_media - article.media_entities - attachments.media_keys - attachments.media_source_tweet - attachments.poll_ids - author_id - edit_history_tweet_ids - entities.mentions.username - geo.place_id - in_reply_to_user_id - entities.note.mentions.username - referenced_tweets.id - referenced_tweets.id.attachments.media_keys - referenced_tweets.id.author_id explode: false style: form - name: media.fields in: query description: A comma separated list of Media fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - alt_text - duration_ms - height - media_key - non_public_metrics - organic_metrics - preview_image_url - promoted_metrics - public_metrics - type - url - variants - width explode: false style: form - name: poll.fields in: query description: A comma separated list of Poll fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - duration_minutes - end_datetime - id - options - voting_status explode: false style: form - name: user.fields in: query description: A comma separated list of User fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - affiliation - confirmed_email - connection_status - created_at - description - entities - id - is_identity_verified - location - most_recent_tweet_id - name - parody - pinned_tweet_id - profile_banner_url - profile_image_url - protected - public_metrics - receives_your_dm - subscription - subscription_type - url - username - verified - verified_followers_count - verified_type - withheld explode: false style: form - name: place.fields in: query description: A comma separated list of Place fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - contained_within - country - country_code - full_name - geo - id - name - place_type explode: false style: form - name: partition in: query description: The partition number. required: true schema: type: integer minimum: 1 maximum: 2 format: int32 style: form - name: start_time in: query description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. required: false schema: type: string format: date-time style: form - name: end_time in: query description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. required: false schema: type: string format: date-time style: form responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/StreamPostsFirehoseKoResponse' default: description: The request has failed. content: application/json: schema: $ref: '#/components/schemas/Error' application/problem+json: schema: $ref: '#/components/schemas/Problem' x-twitter-streaming: true /2/tweets/firehose/stream/lang/pt: get: security: - BearerToken: [] tags: - Stream summary: Stream Portuguese Posts description: Streams all public Portuguese-language Posts in real-time. operationId: streamPostsFirehosePt parameters: - name: backfill_minutes in: query description: The number of minutes of backfill requested. required: false schema: type: integer minimum: 0 maximum: 5 format: int32 style: form - name: tweet.fields in: query description: A comma separated list of Tweet fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - article - attachments - author_id - card_uri - community_id - context_annotations - conversation_id - created_at - display_text_range - edit_controls - edit_history_tweet_ids - entities - geo - id - in_reply_to_user_id - lang - matched_media_notes - media_metadata - non_public_metrics - note_request_suggestions - note_tweet - organic_metrics - paid_partnership - possibly_sensitive - promoted_metrics - public_metrics - referenced_tweets - reply_settings - scopes - source - suggested_source_links - suggested_source_links_with_counts - text - withheld explode: false style: form - name: expansions in: query description: A comma separated list of fields to expand. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - article.cover_media - article.media_entities - attachments.media_keys - attachments.media_source_tweet - attachments.poll_ids - author_id - edit_history_tweet_ids - entities.mentions.username - geo.place_id - in_reply_to_user_id - entities.note.mentions.username - referenced_tweets.id - referenced_tweets.id.attachments.media_keys - referenced_tweets.id.author_id explode: false style: form - name: media.fields in: query description: A comma separated list of Media fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - alt_text - duration_ms - height - media_key - non_public_metrics - organic_metrics - preview_image_url - promoted_metrics - public_metrics - type - url - variants - width explode: false style: form - name: poll.fields in: query description: A comma separated list of Poll fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - duration_minutes - end_datetime - id - options - voting_status explode: false style: form - name: user.fields in: query description: A comma separated list of User fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - affiliation - confirmed_email - connection_status - created_at - description - entities - id - is_identity_verified - location - most_recent_tweet_id - name - parody - pinned_tweet_id - profile_banner_url - profile_image_url - protected - public_metrics - receives_your_dm - subscription - subscription_type - url - username - verified - verified_followers_count - verified_type - withheld explode: false style: form - name: place.fields in: query description: A comma separated list of Place fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - contained_within - country - country_code - full_name - geo - id - name - place_type explode: false style: form - name: partition in: query description: The partition number. required: true schema: type: integer minimum: 1 maximum: 2 format: int32 style: form - name: start_time in: query description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. required: false schema: type: string format: date-time style: form - name: end_time in: query description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. required: false schema: type: string format: date-time style: form responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/StreamPostsFirehosePtResponse' default: description: The request has failed. content: application/json: schema: $ref: '#/components/schemas/Error' application/problem+json: schema: $ref: '#/components/schemas/Problem' x-twitter-streaming: true /2/tweets/label/stream: get: security: - BearerToken: [] tags: - Stream summary: Stream Post labels description: Streams all labeling events applied to Posts. operationId: streamLabelsCompliance parameters: - name: backfill_minutes in: query description: The number of minutes of backfill requested. required: false schema: type: integer minimum: 0 maximum: 5 format: int32 style: form - name: start_time in: query description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the Post labels will be provided. required: false schema: type: string format: date-time style: form - name: end_time in: query description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the Post labels will be provided. required: false schema: type: string format: date-time style: form responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/StreamLabelsComplianceResponse' default: description: The request has failed. content: application/json: schema: $ref: '#/components/schemas/Error' application/problem+json: schema: $ref: '#/components/schemas/Problem' x-twitter-streaming: true /2/tweets/sample/stream: get: security: - BearerToken: [] tags: - Stream summary: Stream sampled Posts description: Streams a 1% sample of public Posts in real-time. externalDocs: url: https://docs.x.com/x-api/posts/volume-streams/introduction operationId: streamPostsSample parameters: - name: backfill_minutes in: query description: The number of minutes of backfill requested. required: false schema: type: integer minimum: 0 maximum: 5 format: int32 style: form - name: tweet.fields in: query description: A comma separated list of Tweet fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - article - attachments - author_id - card_uri - community_id - context_annotations - conversation_id - created_at - display_text_range - edit_controls - edit_history_tweet_ids - entities - geo - id - in_reply_to_user_id - lang - matched_media_notes - media_metadata - non_public_metrics - note_request_suggestions - note_tweet - organic_metrics - paid_partnership - possibly_sensitive - promoted_metrics - public_metrics - referenced_tweets - reply_settings - scopes - source - suggested_source_links - suggested_source_links_with_counts - text - withheld explode: false style: form - name: expansions in: query description: A comma separated list of fields to expand. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - article.cover_media - article.media_entities - attachments.media_keys - attachments.media_source_tweet - attachments.poll_ids - author_id - edit_history_tweet_ids - entities.mentions.username - geo.place_id - in_reply_to_user_id - entities.note.mentions.username - referenced_tweets.id - referenced_tweets.id.attachments.media_keys - referenced_tweets.id.author_id explode: false style: form - name: media.fields in: query description: A comma separated list of Media fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - alt_text - duration_ms - height - media_key - non_public_metrics - organic_metrics - preview_image_url - promoted_metrics - public_metrics - type - url - variants - width explode: false style: form - name: poll.fields in: query description: A comma separated list of Poll fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - duration_minutes - end_datetime - id - options - voting_status explode: false style: form - name: user.fields in: query description: A comma separated list of User fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - affiliation - confirmed_email - connection_status - created_at - description - entities - id - is_identity_verified - location - most_recent_tweet_id - name - parody - pinned_tweet_id - profile_banner_url - profile_image_url - protected - public_metrics - receives_your_dm - subscription - subscription_type - url - username - verified - verified_followers_count - verified_type - withheld explode: false style: form - name: place.fields in: query description: A comma separated list of Place fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - contained_within - country - country_code - full_name - geo - id - name - place_type explode: false style: form responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/StreamPostsSampleResponse' default: description: The request has failed. content: application/json: schema: $ref: '#/components/schemas/Error' application/problem+json: schema: $ref: '#/components/schemas/Problem' x-twitter-streaming: true /2/tweets/sample10/stream: get: security: - BearerToken: [] tags: - Stream summary: Stream 10% sampled Posts description: Streams a 10% sample of public Posts in real-time. operationId: streamPostsSample10 parameters: - name: backfill_minutes in: query description: The number of minutes of backfill requested. required: false schema: type: integer minimum: 0 maximum: 5 format: int32 style: form - name: tweet.fields in: query description: A comma separated list of Tweet fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - article - attachments - author_id - card_uri - community_id - context_annotations - conversation_id - created_at - display_text_range - edit_controls - edit_history_tweet_ids - entities - geo - id - in_reply_to_user_id - lang - matched_media_notes - media_metadata - non_public_metrics - note_request_suggestions - note_tweet - organic_metrics - paid_partnership - possibly_sensitive - promoted_metrics - public_metrics - referenced_tweets - reply_settings - scopes - source - suggested_source_links - suggested_source_links_with_counts - text - withheld explode: false style: form - name: expansions in: query description: A comma separated list of fields to expand. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - article.cover_media - article.media_entities - attachments.media_keys - attachments.media_source_tweet - attachments.poll_ids - author_id - edit_history_tweet_ids - entities.mentions.username - geo.place_id - in_reply_to_user_id - entities.note.mentions.username - referenced_tweets.id - referenced_tweets.id.attachments.media_keys - referenced_tweets.id.author_id explode: false style: form - name: media.fields in: query description: A comma separated list of Media fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - alt_text - duration_ms - height - media_key - non_public_metrics - organic_metrics - preview_image_url - promoted_metrics - public_metrics - type - url - variants - width explode: false style: form - name: poll.fields in: query description: A comma separated list of Poll fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - duration_minutes - end_datetime - id - options - voting_status explode: false style: form - name: user.fields in: query description: A comma separated list of User fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - affiliation - confirmed_email - connection_status - created_at - description - entities - id - is_identity_verified - location - most_recent_tweet_id - name - parody - pinned_tweet_id - profile_banner_url - profile_image_url - protected - public_metrics - receives_your_dm - subscription - subscription_type - url - username - verified - verified_followers_count - verified_type - withheld explode: false style: form - name: place.fields in: query description: A comma separated list of Place fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - contained_within - country - country_code - full_name - geo - id - name - place_type explode: false style: form - name: partition in: query description: The partition number. required: true schema: type: integer minimum: 1 maximum: 2 format: int32 style: form - name: start_time in: query description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. required: false schema: type: string format: date-time style: form - name: end_time in: query description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. required: false schema: type: string format: date-time style: form responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/StreamPostsSample10Response' default: description: The request has failed. content: application/json: schema: $ref: '#/components/schemas/Error' application/problem+json: schema: $ref: '#/components/schemas/Problem' x-twitter-streaming: true /2/tweets/search/stream: get: security: - BearerToken: [] tags: - Stream summary: Stream filtered Posts description: Streams Posts in real-time matching the active rule set. externalDocs: url: https://docs.x.com/x-api/posts/filtered-stream/introduction operationId: streamPosts parameters: - name: backfill_minutes in: query description: The number of minutes of backfill requested. required: false schema: type: integer minimum: 0 maximum: 5 format: int32 style: form - name: start_time in: query description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided. required: false schema: type: string format: date-time style: form - name: end_time in: query description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided. required: false schema: type: string format: date-time style: form - name: tweet.fields in: query description: A comma separated list of Tweet fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - article - attachments - author_id - card_uri - community_id - context_annotations - conversation_id - created_at - display_text_range - edit_controls - edit_history_tweet_ids - entities - geo - id - in_reply_to_user_id - lang - matched_media_notes - media_metadata - non_public_metrics - note_request_suggestions - note_tweet - organic_metrics - paid_partnership - possibly_sensitive - promoted_metrics - public_metrics - referenced_tweets - reply_settings - scopes - source - suggested_source_links - suggested_source_links_with_counts - text - withheld explode: false style: form - name: expansions in: query description: A comma separated list of fields to expand. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - article.cover_media - article.media_entities - attachments.media_keys - attachments.media_source_tweet - attachments.poll_ids - author_id - edit_history_tweet_ids - entities.mentions.username - geo.place_id - in_reply_to_user_id - entities.note.mentions.username - referenced_tweets.id - referenced_tweets.id.attachments.media_keys - referenced_tweets.id.author_id explode: false style: form - name: media.fields in: query description: A comma separated list of Media fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - alt_text - duration_ms - height - media_key - non_public_metrics - organic_metrics - preview_image_url - promoted_metrics - public_metrics - type - url - variants - width explode: false style: form - name: poll.fields in: query description: A comma separated list of Poll fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - duration_minutes - end_datetime - id - options - voting_status explode: false style: form - name: user.fields in: query description: A comma separated list of User fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - affiliation - confirmed_email - connection_status - created_at - description - entities - id - is_identity_verified - location - most_recent_tweet_id - name - parody - pinned_tweet_id - profile_banner_url - profile_image_url - protected - public_metrics - receives_your_dm - subscription - subscription_type - url - username - verified - verified_followers_count - verified_type - withheld explode: false style: form - name: place.fields in: query description: A comma separated list of Place fields to display. required: false schema: type: array minItems: 1 uniqueItems: true items: type: string enum: - contained_within - country - country_code - full_name - geo - id - name - place_type explode: false style: form responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/StreamPostsResponse' default: description: The request has failed. content: application/json: schema: $ref: '#/components/schemas/Error' application/problem+json: schema: $ref: '#/components/schemas/Problem' x-twitter-streaming: true /2/tweets/search/stream/rules: get: security: - BearerToken: [] tags: - Stream summary: Get filtered-stream rules description: Returns the active filtered-stream rules for the authenticated app. Provide `ids` to fetch specific rules; omit it to list all rules. externalDocs: url: https://docs.x.com/x-api/posts/rules-lookup operationId: getRules parameters: - name: ids in: query required: false schema: type: array maxItems: 1000 items: type: string pattern: ^[0-9]{1,19}$ explode: false style: form - name: max_results in: query required: false schema: type: integer minimum: 1 maximum: 1000 format: int32 default: 1000 style: form - name: pagination_token in: query description: A base32hex-encoded pagination token. required: false schema: type: string minLength: 16 maxLength: 16 style: form responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/GetRulesResponse' default: description: The request has failed. content: application/json: schema: $ref: '#/components/schemas/Error' application/problem+json: schema: $ref: '#/components/schemas/Problem' post: security: - BearerToken: [] tags: - Stream summary: Update stream rules description: Adds or deletes rules from the active rule set for the filtered stream. Exactly one of `add`, `delete`, or `?delete_all=true` must be specified. Use `?dry_run=true` to validate without committing. externalDocs: url: https://docs.x.com/x-api/posts/filtered-stream/integrate/add-or-delete-rules operationId: updateRules parameters: - name: dry_run in: query required: false schema: type: boolean style: form - name: delete_all in: query required: false schema: type: boolean style: form requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateRulesRequest' required: true responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/UpdateRulesResponse' default: description: The request has failed. content: application/json: schema: $ref: '#/components/schemas/Error' application/problem+json: schema: $ref: '#/components/schemas/Problem' /2/tweets/search/stream/rules/counts: get: security: - BearerToken: [] tags: - Stream summary: Get Rule Counts operationId: getRuleCounts parameters: - name: rules_count.fields in: query required: false schema: type: string style: form responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/GetRuleCountsResponse' default: description: The request has failed. content: application/json: schema: $ref: '#/components/schemas/Error' application/problem+json: schema: $ref: '#/components/schemas/Problem' /2/users/compliance/stream: get: security: - BearerToken: [] tags: - Stream summary: Stream Users compliance data description: Streams all compliance data related to Users. operationId: streamUsersCompliance parameters: - name: backfill_minutes in: query description: The number of minutes of backfill requested. required: false schema: type: integer minimum: 0 maximum: 5 format: int32 style: form - name: partition in: query description: The partition number. required: true schema: type: integer minimum: 1 maximum: 4 format: int32 style: form - name: start_time in: query description: YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp from which the User Compliance events will be provided. required: false schema: type: string format: date-time style: form - name: end_time in: query description: YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp from which the User Compliance events will be provided. required: false schema: type: string format: date-time style: form responses: '200': description: The request has succeeded. content: application/json: schema: $ref: '#/components/schemas/StreamUsersComplianceResponse' default: description: The request has failed. content: application/json: schema: $ref: '#/components/schemas/Error' application/problem+json: schema: $ref: '#/components/schemas/Problem' x-twitter-streaming: true components: schemas: StreamUsersComplianceResponse: description: User compliance stream events. oneOf: - type: object description: User compliance event. required: - data properties: data: $ref: '#/components/schemas/UserComplianceData' - type: object required: - errors properties: errors: type: array minItems: 1 items: $ref: '#/components/schemas/Problem' LikeWithPostAuthor: type: object description: A Like event, with the tweet author user and the tweet being liked properties: created_at: type: string description: Creation time of the Tweet. format: date-time example: '2021-01-06T18:40:40.000Z' id: $ref: '#/components/schemas/LikeId' liked_tweet_id: $ref: '#/components/schemas/PostId' timestamp_ms: type: integer description: Timestamp in milliseconds of creation. format: int32 tweet_author_id: $ref: '#/components/schemas/UserId' FieldHydrationFailureProblem: type: object required: - type - title - detail - field properties: detail: type: string field: type: string resource_type: type: string section: type: string status: type: integer title: type: string type: type: string enum: - https://api.x.com/2/problems/field-hydration-failure StreamPostsComplianceResponse: description: Tweet compliance stream events. oneOf: - type: object description: Compliance event. required: - data properties: data: $ref: '#/components/schemas/PostComplianceData' - type: object required: - errors properties: errors: type: array minItems: 1 items: $ref: '#/components/schemas/Problem' ActivityEventId: type: string description: The unique identifier of an Activity event. pattern: ^[0-9]{1,19}$ example: '1146654567674912769' StreamPostsFirehoseResponse: type: object properties: data: $ref: '#/components/schemas/Post' errors: type: array minItems: 1 items: $ref: '#/components/schemas/Problem' includes: $ref: '#/components/schemas/Expansions' ActivitySubscriptionFilter: type: object description: An XAA subscription filter. properties: direction: type: string description: Optional direction filter for directional events. enum: - inbound - outbound keyword: $ref: '#/components/schemas/Keyword' user_id: $ref: '#/components/schemas/UserId' additionalProperties: false Keyword: type: string description: A keyword to filter on. minLength: 1 maxLength: 150 example: The President GetRuleCountsResponseData: type: object required: - cap_per_client_app - cap_per_project - project_rules_count - client_app_rules_count properties: all_project_client_apps: type: array description: Per-client-app rule counts across the project. items: $ref: '#/components/schemas/GetRuleCountsResponseDataAllProjectClientApps' cap_per_client_app: type: string description: Maximum number of rules allowed per client application. cap_per_project: type: string description: Maximum number of rules allowed across the project. client_app_rules_count: description: The calling client application's own rule count. $ref: '#/components/schemas/GetRuleCountsResponseDataClientAppRulesCount' project_rules_count: type: string description: Number of rules across every client application in the project. GetRulesResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/GetRulesResponseData' errors: type: array items: $ref: '#/components/schemas/Problem' meta: type: object properties: next_token: type: string description: Pagination token for the next page of results. result_count: type: integer description: Number of items in the data array. format: int32 Poll: type: object properties: duration_minutes: type: integer end_datetime: type: string id: type: string options: $ref: '#/components/schemas/PollOptions' voting_status: type: string UserWithheld: type: object description: Withholding details for withheld content. properties: country_codes: type: - array - 'null' description: A list of countries (as ISO 3166-1 alpha-2 codes) where this content is withheld. items: type: string scope: type: - string - 'null' description: The scope of the withholding. Only present, with the value "user", when the entire User is withheld. enum: - user Error: type: object required: - code - message properties: code: type: integer format: int32 message: type: string ResourceUnavailableProblem: type: object required: - type - title - detail - resource_type properties: detail: type: string resource_id: type: string resource_type: type: string status: type: integer title: type: string type: type: string enum: - https://api.x.com/2/problems/resource-unavailable PostComplianceData: description: Tweet compliance data. oneOf: - $ref: '#/components/schemas/PostDeleteComplianceSchema' - $ref: '#/components/schemas/PostWithheldComplianceSchema' - $ref: '#/components/schemas/PostDropComplianceSchema' - $ref: '#/components/schemas/PostUndropComplianceSchema' - $ref: '#/components/schemas/PostEditComplianceSchema' UserEntities: type: object description: A list of metadata found in the User's profile description. properties: description: type: - object - 'null' description: Entities found in the User's bio. properties: cashtags: type: - array - 'null' items: type: object description: A hashtag or cashtag entity. required: - start - end - tag properties: end: type: integer description: End index in the text (exclusive). format: int64 start: type: integer description: Start index in the text (inclusive). format: int64 tag: type: string hashtags: type: - array - 'null' items: type: object description: A hashtag or cashtag entity. required: - start - end - tag properties: end: type: integer description: End index in the text (exclusive). format: int64 start: type: integer description: Start index in the text (inclusive). format: int64 tag: type: string mentions: type: - array - 'null' items: type: object description: A user mention entity. required: - start - end - username properties: end: type: integer format: int64 id: type: - string - 'null' start: type: integer format: int64 username: type: string urls: type: - array - 'null' items: type: object description: A URL entity found in profile text. required: - start - end - url properties: description: type: - string - 'null' description: Description of the linked page, when available. display_url: type: - string - 'null' description: The URL as displayed in the Post text. end: type: integer format: int64 expanded_url: type: - string - 'null' description: The fully resolved URL. images: type: - array - 'null' items: type: object description: A preview image for a linked page. properties: height: type: - integer - 'null' format: int64 url: type: - string - 'null' width: type: - integer - 'null' format: int64 media_key: type: - string - 'null' start: type: integer format: int64 status: type: - integer - 'null' description: HTTP status from resolving the URL. format: int64 title: type: - string - 'null' description: Title of the linked page, when available. unwound_url: type: - string - 'null' description: The final destination after following redirects. url: type: string description: The t.co shortened URL. url: type: - object - 'null' description: Entities for the User's profile website URL. properties: urls: type: - array - 'null' items: type: object description: A URL entity found in profile text. required: - start - end - url properties: description: type: - string - 'null' description: Description of the linked page, when available. display_url: type: - string - 'null' description: The URL as displayed in the Post text. end: type: integer format: int64 expanded_url: type: - string - 'null' description: The fully resolved URL. images: type: - array - 'null' items: type: object description: A preview image for a linked page. properties: height: type: - integer - 'null' format: int64 url: type: - string - 'null' width: type: - integer - 'null' format: int64 media_key: type: - string - 'null' start: type: integer format: int64 status: type: - integer - 'null' description: HTTP status from resolving the URL. format: int64 title: type: - string - 'null' description: Title of the linked page, when available. unwound_url: type: - string - 'null' description: The final destination after following redirects. url: type: string description: The t.co shortened URL. PostNotice: type: object required: - tweet - event_type - event_at - application properties: application: type: string description: If the label is being applied or removed. Possible values are ‘apply’ or ‘remove’. example: apply details: type: string description: Information shown on the Tweet label event_at: type: string description: Event time. format: date-time example: '2021-07-06T18:40:40.000Z' event_type: type: string description: The type of label on the Tweet example: misleading extended_details_url: type: string description: Link to more information about this kind of label label_title: type: string description: Title/header of the Tweet label tweet: type: object required: - id - author_id properties: author_id: $ref: '#/components/schemas/UserId' id: $ref: '#/components/schemas/PostId' PostMediaMetadata: type: array description: Metadata for media attached to this Post. items: type: object description: Metadata for one media item attached to this Post. properties: alt_text: type: - string - 'null' description: Alternative text describing the media for accessibility. description: type: - string - 'null' description: Description of the media. media_key: type: - string - 'null' description: The unique identifier of the media. title: type: - string - 'null' description: Title of the media. UpdateRulesResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/UpdateRulesResponseData' errors: type: array items: $ref: '#/components/schemas/Problem' meta: type: object properties: sent: type: string summary: type: object GetRuleCountsResponseDataClientAppRulesCount: type: object required: - rule_count properties: client_app_id: type: string description: Unique identifier of the client application. rule_count: type: integer description: Number of rules configured for the client application. additionalProperties: false InternalErrorProblem: type: object required: - type - title - detail properties: detail: type: string status: type: integer title: type: string type: type: string enum: - https://api.x.com/2/problems/internal-error PostEditComplianceSchema: type: object required: - tweet_edit properties: tweet_edit: $ref: '#/components/schemas/PostEditComplianceObjectSchema' StreamPostsFirehosePtResponse: type: object properties: data: $ref: '#/components/schemas/Post' errors: type: array minItems: 1 items: $ref: '#/components/schemas/Problem' includes: $ref: '#/components/schemas/Expansions' PostEditControls: type: object description: Indicates how much longer (if at all) this Post can be edited. properties: editable_until: type: - string - 'null' description: The time until which this Post can be edited. edits_remaining: type: - integer - 'null' description: Number of edits still allowed for this Post. format: int64 is_edit_eligible: type: - boolean - 'null' description: Indicates whether this Post is eligible to be edited. UserAffiliation: type: object description: Metadata about a user's affiliation. properties: badge_url: type: - string - 'null' description: URL of the affiliation badge image shown on the User's profile. description: type: - string - 'null' description: Description of the affiliation. url: type: - string - 'null' description: URL associated with the affiliation. user_id: type: - array - 'null' description: A list of unique identifiers of the accounts this User is affiliated with. items: type: string FollowActivityResponsePayload: type: object properties: source: $ref: '#/components/schemas/User' target: $ref: '#/components/schemas/User' additionalProperties: false Problem: oneOf: - $ref: '#/components/schemas/ResourceNotFoundProblem' - $ref: '#/components/schemas/InvalidRequestProblem' - $ref: '#/components/schemas/NotAuthorizedForResourceProblem' - $ref: '#/components/schemas/NotAuthorizedForFieldProblem' - $ref: '#/components/schemas/FieldUnauthorizedProblem' - $ref: '#/components/schemas/FieldHydrationFailureProblem' - $ref: '#/components/schemas/ResourceUnavailableProblem' - $ref: '#/components/schemas/DisallowedResourceProblem' - $ref: '#/components/schemas/InternalErrorProblem' discriminator: propertyName: type mapping: https://api.x.com/2/problems/disallowed-resource: '#/components/schemas/DisallowedResourceProblem' https://api.x.com/2/problems/field-hydration-failure: '#/components/schemas/FieldHydrationFailureProblem' https://api.x.com/2/problems/field-unauthorized: '#/components/schemas/FieldUnauthorizedProblem' https://api.x.com/2/problems/internal-error: '#/components/schemas/InternalErrorProblem' https://api.x.com/2/problems/invalid-request: '#/components/schemas/InvalidRequestProblem' https://api.x.com/2/problems/not-authorized-for-field: '#/components/schemas/NotAuthorizedForFieldProblem' https://api.x.com/2/problems/not-authorized-for-resource: '#/components/schemas/NotAuthorizedForResourceProblem' https://api.x.com/2/problems/resource-not-found: '#/components/schemas/ResourceNotFoundProblem' https://api.x.com/2/problems/resource-unavailable: '#/components/schemas/ResourceUnavailableProblem' RuleId: type: string description: Unique identifier of this rule. pattern: ^[0-9]{1,19}$ example: '120897978112909812' UserSubscription: type: object description: The subscription relationship between this User and you. required: - subscribes_to_you properties: subscribes_to_you: type: boolean description: Indicates if this User subscribes to you. UserDeleteComplianceSchema: type: object required: - user_delete properties: user_delete: $ref: '#/components/schemas/UserComplianceSchema' PostUndropComplianceSchema: type: object required: - undrop properties: undrop: $ref: '#/components/schemas/PostComplianceSchema' CountryCode: type: string description: A two-letter ISO 3166-1 alpha-2 country code. pattern: ^[A-Z]{2}$ example: US PostDropComplianceSchema: type: object required: - drop properties: drop: $ref: '#/components/schemas/PostComplianceSchema' UserScrubGeoObjectSchema: type: object required: - user - up_to_tweet_id - event_at properties: event_at: type: string description: Event time. format: date-time example: '2021-07-06T18:40:40.000Z' up_to_tweet_id: $ref: '#/components/schemas/PostId' user: type: object required: - id properties: id: $ref: '#/components/schemas/UserId' UserProfileModificationObjectSchema: type: object required: - user - profile_field - new_value - event_at properties: event_at: type: string description: Event time. format: date-time example: '2021-07-06T18:40:40.000Z' new_value: type: string profile_field: type: string user: type: object required: - id properties: id: $ref: '#/components/schemas/UserId' PostEditComplianceObjectSchema: type: object required: - tweet - event_at - initial_tweet_id - edit_tweet_ids properties: edit_tweet_ids: type: array minItems: 1 items: $ref: '#/components/schemas/PostId' event_at: type: string description: Event time. format: date-time example: '2021-07-06T18:40:40.000Z' initial_tweet_id: $ref: '#/components/schemas/PostId' tweet: type: object required: - id properties: id: $ref: '#/components/schemas/PostId' StreamPostsFirehoseEnResponse: type: object properties: data: $ref: '#/components/schemas/Post' errors: type: array minItems: 1 items: $ref: '#/components/schemas/Problem' includes: $ref: '#/components/schemas/Expansions' UserTakedownComplianceSchema: type: object required: - user - withheld_in_countries - event_at properties: event_at: type: string description: Event time. format: date-time example: '2021-07-06T18:40:40.000Z' user: type: object required: - id properties: id: $ref: '#/components/schemas/UserId' withheld_in_countries: type: array minItems: 1 items: $ref: '#/components/schemas/CountryCode' PostReferencedPosts: type: array description: A list of Posts this Post refers to. If the Post is a Retweet, Quote or Reply, it includes the referenced Post's type and ID. items: type: object description: A reference from this Post to another Post (repost, quote, or reply). required: - type - id properties: id: type: string description: Unique identifier of the referenced Post. type: description: How this Post references the other Post. oneOf: - type: string description: The kind of Post-to-Post reference. enum: - retweeted - quoted - replied_to PostComplianceSchema: type: object required: - tweet - event_at properties: event_at: type: string description: Event time. format: date-time example: '2021-07-06T18:40:40.000Z' quote_tweet_id: $ref: '#/components/schemas/PostId' tweet: type: object required: - id - author_id properties: author_id: $ref: '#/components/schemas/UserId' id: $ref: '#/components/schemas/PostId' PostNotePost: type: object description: The full content of the Post, including text beyond 280 characters. required: - text properties: entities: type: - object - 'null' description: Metadata entities (hashtags, cashtags, mentions, URLs) found in the note Post text. properties: cashtags: type: - array - 'null' items: type: object description: A hashtag or cashtag entity. required: - start - end - tag properties: end: type: integer description: End index in the text (exclusive). format: int64 start: type: integer description: Start index in the text (inclusive). format: int64 tag: type: string hashtags: type: - array - 'null' items: type: object description: A hashtag or cashtag entity. required: - start - end - tag properties: end: type: integer description: End index in the text (exclusive). format: int64 start: type: integer description: Start index in the text (inclusive). format: int64 tag: type: string mentions: type: - array - 'null' items: type: object description: A user mention entity. required: - start - end properties: end: type: integer format: int64 id: type: - string - 'null' start: type: integer format: int64 username: type: - string - 'null' urls: type: - array - 'null' items: type: object description: A URL entity found in note Post text. required: - start - end properties: display_url: type: - string - 'null' end: type: integer format: int64 expanded_url: type: - string - 'null' start: type: integer format: int64 url: type: - string - 'null' text: type: string description: The full note text of the Post. UserId: type: string description: Unique identifier of a User pattern: ^[0-9]{1,19}$ example: '2244994945' StreamPostsFirehoseJaResponse: type: object properties: data: $ref: '#/components/schemas/Post' errors: type: array minItems: 1 items: $ref: '#/components/schemas/Problem' includes: $ref: '#/components/schemas/Expansions' PostScopes: type: object description: The scopes for this Post. required: - followers properties: followers: type: boolean description: Indicates whether visibility of this Post is limited to the author's followers. DisallowedResourceProblem: type: object required: - type - title - detail properties: detail: type: string resource_id: type: string resource_type: type: string section: type: string status: type: integer title: type: string type: type: string enum: - https://api.x.com/2/problems/disallowed-resource ActivityStreamResponse: type: object description: An activity event or error that can be returned by the x activity streaming API. properties: data: type: object properties: event_type: type: string event_uuid: $ref: '#/components/schemas/ActivityEventId' filter: $ref: '#/components/schemas/ActivitySubscriptionFilter' includes: $ref: '#/components/schemas/Expansions' payload: $ref: '#/components/schemas/ActivityStreamingResponsePayload' tag: type: string errors: type: array minItems: 1 items: $ref: '#/components/schemas/Problem' PostSuggestedSourceLinksWithCounts: type: array description: Suggested source URLs for this Post, each with the number of times it was suggested. items: type: object description: A suggested source URL for this Post with the number of times it was suggested. properties: count: type: - integer - 'null' description: Number of times this source link was suggested. format: int64 url: type: - string - 'null' description: The suggested source URL. UpdateRulesResponseData: type: object properties: id: type: string description: Unique identifier of the rule. tag: type: string description: Optional caller-defined label for the rule. value: type: string description: The rule's filter expression. UpdateRulesRequest: type: object properties: add: type: array description: Rules to add. items: $ref: '#/components/schemas/UpdateRulesAdd' delete: description: Rules to delete by id or by value. $ref: '#/components/schemas/UpdateRulesDelete' additionalProperties: false PostNoticeSchema: type: object required: - public_tweet_notice properties: public_tweet_notice: $ref: '#/components/schemas/PostNotice' Topic: type: object properties: description: type: string id: type: string name: type: string LikeId: type: string description: The unique identifier of this Like. pattern: ^[A-Za-z0-9_]{1,40}$ example: 8ba4f34e6235d905a46bac021d98e923 UserProfileModificationComplianceSchema: type: object required: - user_profile_modification properties: user_profile_modification: $ref: '#/components/schemas/UserProfileModificationObjectSchema' PlaceContainedWithin: type: array description: A list of unique identifiers of the Places that contain this place. items: type: string PostDeleteComplianceSchema: type: object required: - delete properties: delete: $ref: '#/components/schemas/PostComplianceSchema' MediaPublicMetrics: type: object description: Public engagement metrics for the media at the time of the request. required: - view_count properties: view_count: type: integer description: The number of times this video has been viewed. format: int64 UserSuspendComplianceSchema: type: object required: - user_suspend properties: user_suspend: $ref: '#/components/schemas/UserComplianceSchema' StreamLabelsComplianceResponse: description: Tweet label stream events. oneOf: - type: object description: Tweet Label event. required: - data properties: data: $ref: '#/components/schemas/PostLabelData' - type: object required: - errors properties: errors: type: array minItems: 1 items: $ref: '#/components/schemas/Problem' ActivityStreamingResponsePayload: oneOf: - $ref: '#/components/schemas/ProfileUpdateActivityResponsePayload' - $ref: '#/components/schemas/NewsActivityResponsePayload' - $ref: '#/components/schemas/FollowActivityResponsePayload' - $ref: '#/components/schemas/Post' - $ref: '#/components/schemas/PostDeleteActivityResponsePayload' - $ref: '#/components/schemas/LikeWithPostAuthor' discriminator: propertyName: ../event_type mapping: follow.follow: '#/components/schemas/FollowActivityResponsePayload' follow.unfollow: '#/components/schemas/FollowActivityResponsePayload' like.create: '#/components/schemas/LikeWithPostAuthor' news.new: '#/components/schemas/NewsActivityResponsePayload' post.create: '#/components/schemas/Post' post.delete: '#/components/schemas/PostDeleteActivityResponsePayload' post.mention.create: '#/components/schemas/Post' post.quote.create: '#/components/schemas/Post' post.reply.create: '#/components/schemas/Post' post.repost.create: '#/components/schemas/Post' profile.update.affiliate_badge: '#/components/schemas/ProfileUpdateActivityResponsePayload' profile.update.banner_picture: '#/components/schemas/ProfileUpdateActivityResponsePayload' profile.update.bio: '#/components/schemas/ProfileUpdateActivityResponsePayload' profile.update.geo: '#/components/schemas/ProfileUpdateActivityResponsePayload' profile.update.handle: '#/components/schemas/ProfileUpdateActivityResponsePayload' profile.update.profile_picture: '#/components/schemas/ProfileUpdateActivityResponsePayload' profile.update.screenname: '#/components/schemas/ProfileUpdateActivityResponsePayload' profile.update.url: '#/components/schemas/ProfileUpdateActivityResponsePayload' profile.update.verified_badge: '#/components/schemas/ProfileUpdateActivityResponsePayload' PostDisplayTextRange: type: array description: The inclusive start and exclusive end indices of the displayable content of the Post. minItems: 2 maxItems: 2 items: type: integer format: int64 Expansions: type: object properties: media: type: array items: $ref: '#/components/schemas/Media' places: type: array items: $ref: '#/components/schemas/Place' polls: type: array items: $ref: '#/components/schemas/Poll' posts: type: array items: $ref: '#/components/schemas/Post' topics: type: array items: $ref: '#/components/schemas/Topic' users: type: array items: $ref: '#/components/schemas/User' StreamPostsResponse: type: object description: A Tweet or error that can be returned by the streaming Tweet API. The values returned with a successful streamed Tweet includes the user provided rules that the Tweet matched. properties: data: $ref: '#/components/schemas/Post' errors: type: array minItems: 1 items: $ref: '#/components/schemas/Problem' includes: $ref: '#/components/schemas/Expansions' matching_rules: type: array description: The list of rules which matched the Tweet items: type: object required: - id properties: id: $ref: '#/components/schemas/RuleId' tag: $ref: '#/components/schemas/RuleTag' StreamLikesComplianceResponse: description: Likes compliance stream events. oneOf: - type: object description: Compliance event. required: - data properties: data: $ref: '#/components/schemas/LikeComplianceSchema' - type: object required: - errors properties: errors: type: array minItems: 1 items: $ref: '#/components/schemas/Problem' GetRulesResponseData: type: object properties: id: type: string description: Unique identifier of the rule. tag: type: string description: Optional caller-defined label for the rule. value: type: string description: The rule's filter expression. UserUnsuspendComplianceSchema: type: object required: - user_unsuspend properties: user_unsuspend: $ref: '#/components/schemas/UserComplianceSchema' PostGeo: type: object description: The location tagged on the Post, if the user provided one. properties: coordinates: type: - object - 'null' description: A GeoJSON Point geometry. required: - type - coordinates properties: coordinates: type: array description: '[longitude, latitude].' minItems: 2 maxItems: 2 items: type: number format: double type: type: string description: The GeoJSON geometry type. enum: - Point place_id: type: - string - 'null' description: The unique identifier of the tagged place. PostWithheldComplianceSchema: type: object required: - withheld properties: withheld: $ref: '#/components/schemas/PostTakedownComplianceSchema' PostEntities: type: object description: A list of metadata entities (hashtags, mentions, URLs) found in the Post text. properties: cashtags: type: - array - 'null' items: type: object description: A hashtag or cashtag entity. required: - start - end - tag properties: end: type: integer description: End index in the text (exclusive). format: int64 start: type: integer description: Start index in the text (inclusive). format: int64 tag: type: string hashtags: type: - array - 'null' items: type: object description: A hashtag or cashtag entity. required: - start - end - tag properties: end: type: integer description: End index in the text (exclusive). format: int64 start: type: integer description: Start index in the text (inclusive). format: int64 tag: type: string mentions: type: - array - 'null' items: type: object description: A user mention entity. required: - start - end properties: end: type: integer format: int64 id: type: - string - 'null' start: type: integer format: int64 username: type: - string - 'null' urls: type: - array - 'null' items: type: object description: A URL entity found in the Post text, enriched with link metadata. required: - start - end properties: description: type: - string - 'null' description: Description of the linked page, when available. display_url: type: - string - 'null' description: The URL as displayed in the Post text. end: type: integer format: int64 expanded_url: type: - string - 'null' description: The fully resolved URL. images: type: - array - 'null' items: type: object description: A preview image for a linked page. properties: height: type: - integer - 'null' format: int64 url: type: - string - 'null' width: type: - integer - 'null' format: int64 media_key: type: - string - 'null' start: type: integer format: int64 status: type: - integer - 'null' description: HTTP status from resolving the URL. format: int64 title: type: - string - 'null' description: Title of the linked page, when available. unwound_url: type: - string - 'null' description: The final destination after following redirects. url: type: - string - 'null' description: The t.co shortened URL. MediaVariants: type: array description: Each media object may have multiple display or playback variants, with different resolutions or formats. items: type: object description: A single playback or display variant of a media object. properties: bit_rate: type: - integer - 'null' description: The bit rate of this variant, in bits per second. Absent for playlist variants. format: int64 content_type: type: - string - 'null' description: The MIME type of this variant, for example "video/mp4" or "application/x-mpegURL". url: type: - string - 'null' description: The URL to this media variant. NotAuthorizedForFieldProblem: type: object required: - type - title - detail - field properties: detail: type: string field: type: string parameter: type: string resource_id: type: string resource_type: type: string section: type: string status: type: integer title: type: string type: type: string enum: - https://api.x.com/2/problems/not-authorized-for-field value: type: string PostNoteRequestSuggestions: type: array description: Community-Notes request suggestions for this Post. items: type: object description: A Community-Notes request suggestion for this Post. properties: source_link: type: - string - 'null' description: A suggested source link supporting the note request. suggestion: type: - string - 'null' description: The text of the note request suggestion. suggestion_id: type: - string - 'null' description: The unique identifier of the note request suggestion. MediaPromotedMetrics: type: object description: Promoted nonpublic engagement metrics for the media at the time of the request. properties: playback_0_count: type: - integer - 'null' description: Number of users who started playback (0% quartile) of this video. format: int64 playback_100_count: type: - integer - 'null' description: Number of users who completed playback (100% quartile) of this video. format: int64 playback_25_count: type: - integer - 'null' description: Number of users who watched at least 25% of this video. format: int64 playback_50_count: type: - integer - 'null' description: Number of users who watched at least 50% of this video. format: int64 playback_75_count: type: - integer - 'null' description: Number of users who watched at least 75% of this video. format: int64 view_count: type: - integer - 'null' description: The number of promoted views of this video. Null when the backend returns quartile data without a view count. format: int64 PostUnviewable: type: object required: - tweet - event_at - application properties: application: type: string description: If the label is being applied or removed. Possible values are ‘apply’ or ‘remove’. example: apply event_at: type: string description: Event time. format: date-time example: '2021-07-06T18:40:40.000Z' tweet: type: object required: - id - author_id properties: author_id: $ref: '#/components/schemas/UserId' id: $ref: '#/components/schemas/PostId' User: type: object properties: affiliation: $ref: '#/components/schemas/UserAffiliation' confirmed_email: type: string connection_status: $ref: '#/components/schemas/UserConnectionStatus' created_at: type: string description: Creation time of this User. format: date-time description: type: string description: The text of this User's profile description (also known as bio), if the User provided one. entities: $ref: '#/components/schemas/UserEntities' id: type: string description: Unique identifier of this User. is_identity_verified: type: boolean description: Indicates if this User has completed identity verification. location: type: string description: The location specified in the User's profile, if the User provided one. As this is a freeform value, it may not indicate a valid location. most_recent_post_id: type: string description: Unique identifier of this User's most recent Post. name: type: string description: The friendly name of this User, as shown on their profile. parody: type: boolean description: Indicates if this User is a parody account. pinned_post_id: type: string description: Unique identifier of this User's pinned Post. profile_banner_url: type: string description: The URL to the profile banner for this User. profile_image_url: type: string description: The URL to the profile image for this User. protected: type: boolean description: Indicates if this User has chosen to protect their Posts (in other words, if this User's Posts are private). public_metrics: $ref: '#/components/schemas/UserPublicMetrics' receives_your_dm: type: boolean description: Indicates if you can send a DM to this User. subscriber_count: type: integer description: The number of Premium subscribers of this User. subscribes_to_you: type: boolean description: Indicates if this User subscribes to you. subscription: $ref: '#/components/schemas/UserSubscription' subscription_type: type: string description: 'The X Blue subscription type of the user, e.g.: Basic, Premium, PremiumPlus or None.' url: type: string description: The URL specified in the User's profile. username: type: string description: The X handle (screen name) of this User. verified: type: boolean description: Indicates if this User is a verified X User. verified_followers_count: type: integer description: The number of verified followers of this User. verified_type: type: string description: 'The X Blue verified type of the user, e.g.: blue, government, business or none.' withheld: $ref: '#/components/schemas/UserWithheld' UserScrubGeoSchema: type: object required: - scrub_geo properties: scrub_geo: $ref: '#/components/schemas/UserScrubGeoObjectSchema' RuleTag: type: string description: A tag meant for the labeling of user provided rules. example: Non-retweeted coffee Posts UserPublicMetrics: type: object description: A list of metrics for this User. required: - followers_count - following_count - post_count - listed_count properties: followers_count: type: integer description: Number of Users who follow this User. format: int64 following_count: type: integer description: Number of Users this User follows. format: int64 like_count: type: - integer - 'null' description: Number of Posts this User has liked. format: int64 listed_count: type: integer description: Number of Lists that include this User. format: int64 media_count: type: - integer - 'null' description: Number of media items posted by this User. format: int64 post_count: type: integer description: Number of Posts (including Reposts) created by this User. format: int64 StreamLikesSample10Response: type: object properties: data: $ref: '#/components/schemas/LikeWithPostAuthor' errors: type: array minItems: 1 items: $ref: '#/components/schemas/Problem' includes: $ref: '#/components/schemas/Expansions' Place: type: object properties: contained_within: $ref: '#/components/schemas/PlaceContainedWithin' country: type: string country_code: type: string full_name: type: string geo: $ref: '#/components/schemas/PlaceGeo' id: type: string name: type: string place_type: type: string UnlikeComplianceSchema: type: object required: - favorite - event_at properties: event_at: type: string description: Event time. format: date-time example: '2021-07-06T18:40:40.000Z' favorite: type: object required: - id - user_id properties: id: $ref: '#/components/schemas/PostId' user_id: $ref: '#/components/schemas/UserId' GetRuleCountsResponseDataAllProjectClientApps: type: object required: - rule_count properties: client_app_id: type: string description: Unique identifier of the client application. rule_count: type: integer description: Number of rules configured for the client application. additionalProperties: false PostTakedownComplianceSchema: type: object required: - tweet - withheld_in_countries - event_at properties: event_at: type: string description: Event time. format: date-time example: '2021-07-06T18:40:40.000Z' quote_tweet_id: $ref: '#/components/schemas/PostId' tweet: type: object required: - id - author_id properties: author_id: $ref: '#/components/schemas/UserId' id: $ref: '#/components/schemas/PostId' withheld_in_countries: type: array minItems: 1 items: $ref: '#/components/schemas/CountryCode' PostLabelData: description: Tweet label data. oneOf: - $ref: '#/components/schemas/PostNoticeSchema' - $ref: '#/components/schemas/PostUnviewableSchema' PostPublicMetrics: type: object description: Engagement metrics for the Post at the time of the request. required: - repost_count - reply_count - like_count - quote_count - bookmark_count - impression_count properties: bookmark_count: type: integer description: Number of times this Post has been bookmarked. format: int64 impression_count: type: integer description: Number of times this Post has been viewed. format: int64 like_count: type: integer description: Number of likes on this Post. format: int64 quote_count: type: integer description: Number of quote Posts of this Post. format: int64 reply_count: type: integer description: Number of replies to this Post. format: int64 repost_count: type: integer description: Number of times this Post has been reposted. format: int64 Media: type: object properties: alt_text: type: string duration_ms: type: integer height: type: integer media_key: type: string non_public_metrics: $ref: '#/components/schemas/MediaNonPublicMetrics' organic_metrics: $ref: '#/components/schemas/MediaOrganicMetrics' preview_image_url: type: string promoted_metrics: $ref: '#/components/schemas/MediaPromotedMetrics' public_metrics: $ref: '#/components/schemas/MediaPublicMetrics' type: type: string url: type: string variants: $ref: '#/components/schemas/MediaVariants' width: type: integer UserUndeleteComplianceSchema: type: object required: - user_undelete properties: user_undelete: $ref: '#/components/schemas/UserComplianceSchema' UserUnprotectComplianceSchema: type: object required: - user_unprotect properties: user_unprotect: $ref: '#/components/schemas/UserComplianceSchema' StreamPostsSampleResponse: type: object properties: data: $ref: '#/components/schemas/Post' errors: type: array minItems: 1 items: $ref: '#/components/schemas/Problem' includes: $ref: '#/components/schemas/Expansions' PostId: type: string description: Unique identifier of a Post pattern: ^[0-9]{1,19}$ example: '1346889436626259968' ProfileUpdateActivityResponsePayload: type: object properties: after: type: string before: type: string additionalProperties: false StreamLikesFirehoseResponse: type: object properties: data: $ref: '#/components/schemas/LikeWithPostAuthor' errors: type: array minItems: 1 items: $ref: '#/components/schemas/Problem' includes: $ref: '#/components/schemas/Expansions' UserWithheldComplianceSchema: type: object required: - user_withheld properties: user_withheld: $ref: '#/components/schemas/UserTakedownComplianceSchema' PostSuggestedSourceLinks: type: array description: URLs suggested as sources for this Post. items: type: string NotAuthorizedForResourceProblem: type: object required: - type - title - detail - resource_type properties: detail: type: string parameter: type: string resource_id: type: string resource_type: type: string section: type: string status: type: integer title: type: string type: type: string enum: - https://api.x.com/2/problems/not-authorized-for-resource value: type: string UpdateRulesDelete: type: object properties: ids: type: array description: Rule ids (Snowflake external ids) to delete. items: type: string pattern: ^[0-9]{1,19}$ values: type: array description: Rule values to delete. items: type: string additionalProperties: false StreamPostsSample10Response: type: object properties: data: $ref: '#/components/schemas/Post' errors: type: array minItems: 1 items: $ref: '#/components/schemas/Problem' includes: $ref: '#/components/schemas/Expansions' PostUnviewableSchema: type: object required: - public_tweet_unviewable properties: public_tweet_unviewable: $ref: '#/components/schemas/PostUnviewable' StreamPostsFirehoseKoResponse: type: object properties: data: $ref: '#/components/schemas/Post' errors: type: array minItems: 1 items: $ref: '#/components/schemas/Problem' includes: $ref: '#/components/schemas/Expansions' MediaNonPublicMetrics: type: object description: Nonpublic engagement metrics for the media at the time of the request. properties: playback_0_count: type: - integer - 'null' description: Number of users who started playback (0% quartile) of this video. format: int64 playback_100_count: type: - integer - 'null' description: Number of users who completed playback (100% quartile) of this video. format: int64 playback_25_count: type: - integer - 'null' description: Number of users who watched at least 25% of this video. format: int64 playback_50_count: type: - integer - 'null' description: Number of users who watched at least 50% of this video. format: int64 playback_75_count: type: - integer - 'null' description: Number of users who watched at least 75% of this video. format: int64 UserConnectionStatus: type: array description: Returns detailed information about the relationship between two users. items: type: string description: A connection between the authenticated User and this User. enum: - blocking - follow_request_received - follow_request_sent - followed_by - following - muting Post: type: object properties: article: type: object article_title: type: object description: Metadata about the long-form Article attached to this Post, if any. attachments: $ref: '#/components/schemas/PostAttachments' author_id: type: string description: Unique identifier of the author of this Post. card_uri: type: string community_id: type: string description: The unique identifier of the Community this Post belongs to, if any. context_annotations: $ref: '#/components/schemas/PostContextAnnotations' conversation_id: type: string description: The ID of the conversation this Post belongs to (matches the root Post's ID). created_at: type: string description: Creation time of the Post. format: date-time display_text_range: $ref: '#/components/schemas/PostDisplayTextRange' edit_controls: $ref: '#/components/schemas/PostEditControls' edit_history_post_ids: type: array description: A list of Post IDs in this Post's edit history chain. items: type: string entities: $ref: '#/components/schemas/PostEntities' geo: $ref: '#/components/schemas/PostGeo' id: type: string description: Unique identifier of this Post. in_reply_to_user_id: type: string description: Unique identifier of the User this Post is replying to. lang: type: string description: Language of the Post, if detected by X. Returned as a BCP47 language tag. matched_media_notes: $ref: '#/components/schemas/PostMatchedMediaNotes' media_metadata: $ref: '#/components/schemas/PostMediaMetadata' non_public_metrics: type: object description: Nonpublic engagement metrics for the Post at the time of the request. note_post: $ref: '#/components/schemas/PostNotePost' note_request_suggestions: $ref: '#/components/schemas/PostNoteRequestSuggestions' organic_metrics: type: object description: Organic nonpublic engagement metrics for the Post at the time of the request. paid_partnership: type: boolean description: Indicates if this Post is a paid partnership, i.e. it has been disclosed by the author as containing paid promotion. possibly_sensitive: type: boolean description: Indicates if this Post contains URLs marked as sensitive, for example content suitable for mature audiences. promoted_metrics: type: object description: Promoted nonpublic engagement metrics for the Post at the time of the request. public_metrics: $ref: '#/components/schemas/PostPublicMetrics' referenced_posts: $ref: '#/components/schemas/PostReferencedPosts' reply_settings: type: string description: Shows who can reply to this Post. scopes: $ref: '#/components/schemas/PostScopes' source: type: string description: The name of the app the user posted from. This is deprecated. suggested_source_links: $ref: '#/components/schemas/PostSuggestedSourceLinks' suggested_source_links_with_counts: $ref: '#/components/schemas/PostSuggestedSourceLinksWithCounts' text: type: string description: The content of the Post. username: type: string withheld: $ref: '#/components/schemas/PostWithheld' InvalidRequestProblem: type: object required: - type - title - detail properties: detail: type: string parameter: type: string status: type: integer title: type: string type: type: string enum: - https://api.x.com/2/problems/invalid-request value: type: string PostAttachments: type: object description: Specifies the type of attachments (if any) present in this Post. properties: media_keys: type: - array - 'null' description: Media keys of media attached to this Post. items: type: string media_source_tweet_id: type: - array - 'null' description: IDs of the source Posts the attached media originated from. items: type: string poll_ids: type: - array - 'null' description: IDs of polls attached to this Post. items: type: string PostContextAnnotations: type: array description: Annotations inferred about the Post (domain and entity context). items: type: object description: A single inferred annotation about the Post (domain and entity context). required: - domain - entity properties: domain: description: The domain (broad category) this annotation belongs to. oneOf: - type: object description: A domain or entity referenced by a context annotation. properties: description: type: - string - 'null' id: type: - string - 'null' name: type: - string - 'null' entity: description: The specific entity recognized within the domain. oneOf: - type: object description: A domain or entity referenced by a context annotation. properties: description: type: - string - 'null' id: type: - string - 'null' name: type: - string - 'null' GetRuleCountsResponse: type: object properties: data: $ref: '#/components/schemas/GetRuleCountsResponseData' errors: type: array items: $ref: '#/components/schemas/Problem' LikeComplianceSchema: type: object required: - delete properties: delete: $ref: '#/components/schemas/UnlikeComplianceSchema' PollOptions: type: array description: The list of options (choices) available in this poll. items: type: object description: A single option (choice) available in a poll. required: - position - label - votes properties: label: type: string description: The text label of this poll option. position: type: integer description: The 1-based position of this option within the poll. format: int64 votes: type: integer description: The number of votes this option has received. format: int64 PostDeleteActivityResponsePayload: type: object description: The identity of a deleted Post. required: - id - author_id properties: author_id: $ref: '#/components/schemas/UserId' id: $ref: '#/components/schemas/PostId' additionalProperties: false PlaceGeo: type: object description: The geographic location of this place, expressed as a GeoJSON Feature. required: - type - bbox - properties properties: bbox: type: array description: The bounding box as [southwest_longitude, southwest_latitude, northeast_longitude, northeast_latitude]. minItems: 4 maxItems: 4 items: type: number format: double properties: type: object description: Additional GeoJSON feature properties. type: description: The GeoJSON feature type. oneOf: - type: string enum: - Feature NewsActivityResponsePayload: type: object properties: category: type: string headline: type: string hook: type: string summary: type: string additionalProperties: false PostWithheld: type: object description: Withholding details for withheld content. required: - copyright - country_codes properties: copyright: type: boolean description: Indicates whether this content is withheld due to a copyright claim. country_codes: type: array description: Uppercase ISO 3166-1 alpha-2 country codes where this content is withheld. items: type: string scope: type: - string - 'null' description: Whether the withholding applies to a Post or a User. enum: - post - user MediaOrganicMetrics: type: object description: Organic nonpublic engagement metrics for the media at the time of the request. properties: playback_0_count: type: - integer - 'null' description: Number of users who started playback (0% quartile) of this video. format: int64 playback_100_count: type: - integer - 'null' description: Number of users who completed playback (100% quartile) of this video. format: int64 playback_25_count: type: - integer - 'null' description: Number of users who watched at least 25% of this video. format: int64 playback_50_count: type: - integer - 'null' description: Number of users who watched at least 50% of this video. format: int64 playback_75_count: type: - integer - 'null' description: Number of users who watched at least 75% of this video. format: int64 view_count: type: - integer - 'null' description: The number of organic views of this video. Null when the backend returns quartile data without a view count. format: int64 ResourceNotFoundProblem: type: object required: - type - title - detail - resource_type properties: detail: type: string parameter: type: string resource_id: type: string resource_type: type: string status: type: integer title: type: string type: type: string enum: - https://api.x.com/2/problems/resource-not-found value: type: string PostMatchedMediaNotes: type: array description: Community-Notes media matches for this Post. items: type: object description: A Community-Notes media match for this Post. properties: match_status: type: - string - 'null' description: The status of the media note match. note_id: type: - string - 'null' description: The matched note's unique identifier. UserComplianceData: description: User compliance data. oneOf: - $ref: '#/components/schemas/UserProtectComplianceSchema' - $ref: '#/components/schemas/UserUnprotectComplianceSchema' - $ref: '#/components/schemas/UserDeleteComplianceSchema' - $ref: '#/components/schemas/UserUndeleteComplianceSchema' - $ref: '#/components/schemas/UserSuspendComplianceSchema' - $ref: '#/components/schemas/UserUnsuspendComplianceSchema' - $ref: '#/components/schemas/UserWithheldComplianceSchema' - $ref: '#/components/schemas/UserScrubGeoSchema' - $ref: '#/components/schemas/UserProfileModificationComplianceSchema' UserComplianceSchema: type: object required: - user - event_at properties: event_at: type: string description: Event time. format: date-time example: '2021-07-06T18:40:40.000Z' user: type: object required: - id properties: id: $ref: '#/components/schemas/UserId' FieldUnauthorizedProblem: type: object required: - type - title - detail - field properties: detail: type: string field: type: string resource_type: type: string section: type: string status: type: integer title: type: string type: type: string enum: - https://api.x.com/2/problems/field-unauthorized UserProtectComplianceSchema: type: object required: - user_protect properties: user_protect: $ref: '#/components/schemas/UserComplianceSchema' UpdateRulesAdd: type: object required: - value properties: tag: type: string description: Optional caller-defined label for the rule. value: type: string description: Rule filter expression. additionalProperties: false securitySchemes: BearerToken: type: http scheme: bearer OAuth2UserToken: type: oauth2 flows: authorizationCode: authorizationUrl: https://api.x.com/2/oauth2/authorize tokenUrl: https://api.x.com/2/oauth2/token scopes: block.read: View accounts you have blocked. block.write: Block and unblock accounts on your behalf. bookmark.read: Read your bookmarked Posts. bookmark.write: Create and delete your bookmarks. broadcast.read: View your live broadcasts and their chat. broadcast.write: Manage your live broadcasts and send chat messages on your behalf. developer.read: View your developer accounts, apps, and settings. developer.write: Create and manage your X Developer Platform account. 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. 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: Create and repost on your behalf. users.read: View any account you can see, including protected accounts. UserToken: type: http scheme: OAuth