X Stream API
Endpoints related to streaming — 18 operation(s) in the X-published contract.
Endpoints related to streaming — 18 operation(s) in the X-published contract.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/x-stream-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
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
uniqueIte
# --- truncated at 32 KB (153 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/x/refs/heads/main/openapi/x-stream-api-openapi.yml