Overview
- Introduction
- Getting started
- Tools and libraries
- Migration guide
- What to build
- Fundamentals
Posts
- Search
- Post Counts
- Filtered Stream
- Timelines
- Post Lookup
- Bookmarks
- Manage Posts
- Reposts
- Quotes
- Hide replies
- Volume Streams
Users
- User Lookup
- Search
- Follows
- Mutes
- Blocks
- Personalized Trends
Engagement Metrics
Direct Messages
- Manage
- Lookup
- Blocks
Likes
- Introduction
- Guides
- GETReturns Post objects liked by the provided User ID
- GETReturns User objects that have liked the provided Post ID
- POSTCauses the User (in the path) to like the specified Post
- DELCauses the User (in the path) to unlike the specified Post
- GETLikes Firehose stream
- GETLikes Sample 10 stream
Lists
- Lookup Lists
- Lookup List Posts
- Manage Lists
- List Members
- Pinned Lists
Spaces
- Introduction
- Spaces Lookup
- Search Spaces
Communities
- Communities Lookup
- Search Communities
Trends
Compliance
- Batch Compliance
- Compliance streams
Enterprise (Gnip 2.0)
Sample 10% stream
Streams a deterministic 10% of public Posts.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Query Parameters
The number of minutes of backfill requested.
0 < x < 5
The partition number.
1 < x < 2
YYYY-MM-DDTHH:mm:ssZ. The earliest UTC timestamp to which the Posts will be provided.
YYYY-MM-DDTHH:mm:ssZ. The latest UTC timestamp to which the Posts will be provided.
A comma separated list of Tweet fields to display.
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
, media_metadata
, non_public_metrics
, note_tweet
, organic_metrics
, possibly_sensitive
, promoted_metrics
, public_metrics
, referenced_tweets
, reply_settings
, scopes
, source
, text
, withheld
A comma separated list of fields to expand.
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.author_id
A comma separated list of Media fields to display.
alt_text
, duration_ms
, height
, media_key
, non_public_metrics
, organic_metrics
, preview_image_url
, promoted_metrics
, public_metrics
, type
, url
, variants
, width
A comma separated list of Poll fields to display.
duration_minutes
, end_datetime
, id
, options
, voting_status
A comma separated list of User fields to display.
affiliation
, connection_status
, created_at
, description
, entities
, id
, is_identity_verified
, location
, most_recent_tweet_id
, name
, pinned_tweet_id
, profile_banner_url
, profile_image_url
, protected
, public_metrics
, receives_your_dm
, subscription_type
, url
, username
, verified
, verified_followers_count
, verified_type
, withheld
A comma separated list of Place fields to display.
contained_within
, country
, country_code
, full_name
, geo
, id
, name
, place_type
Response
Specifies the type of attachments (if any) present in this Tweet.
A list of Media Keys for each one of the media attachments (if media are attached).
A list of Posts the media on this Tweet was originally posted in. For example, if the media on a tweet is re-used in another Tweet, this refers to the original, source Tweet..
A list of poll IDs (if polls are attached).
Unique identifier of this User. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.
The unique identifier of this Community.
Represents the data for the context annotation domain.
Represents the data for the context annotation entity.
Unique identifier of this Tweet. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.
Creation time of the Tweet.
A list of Tweet Ids in this Tweet chain.
Index (zero-based) at which position this entity ends. The index is inclusive.
x > 0
Index (zero-based) at which position this entity starts. The index is inclusive.
x > 0
Text used to determine annotation.
Confidence factor for annotation type.
0 < x < 1
Annotation type.
Index (zero-based) at which position this entity ends. The index is exclusive.
x > 0
Index (zero-based) at which position this entity starts. The index is inclusive.
x > 0
Index (zero-based) at which position this entity ends. The index is exclusive.
x > 0
Index (zero-based) at which position this entity starts. The index is inclusive.
x > 0
The text of the Hashtag.
Index (zero-based) at which position this entity ends. The index is exclusive.
x > 0
Index (zero-based) at which position this entity starts. The index is inclusive.
x > 0
The X handle (screen name) of this user.
Unique identifier of this User. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.
Index (zero-based) at which position this entity ends. The index is exclusive.
x > 0
Index (zero-based) at which position this entity starts. The index is inclusive.
x > 0
A validly formatted URL.
Description of the URL landing page.
The URL as displayed in the X client.
A validly formatted URL.
The Media Key identifier for this attachment.
HTTP Status Code.
100 < x < 599
Title of the page the URL points to.
Fully resolved url.
The location tagged on the Tweet, if the user provided one.
A GeoJson Point geometry object.
A GeoJson Position in the format [longitude,latitude]
.
Point
The identifier for this place.
Unique identifier of this Tweet. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.
Unique identifier of this User. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.
Language of the Tweet, if detected by X. Returned as a BCP47 language tag.
Nonpublic engagement metrics for the Tweet at the time of the request.
Number of times this Tweet has been viewed.
The full-content of the Tweet, including text beyond 280 characters.
Index (zero-based) at which position this entity ends. The index is exclusive.
x > 0
Index (zero-based) at which position this entity starts. The index is inclusive.
x > 0
Index (zero-based) at which position this entity ends. The index is exclusive.
x > 0
Index (zero-based) at which position this entity starts. The index is inclusive.
x > 0
The text of the Hashtag.
Index (zero-based) at which position this entity ends. The index is exclusive.
x > 0
Index (zero-based) at which position this entity starts. The index is inclusive.
x > 0
The X handle (screen name) of this user.
Unique identifier of this User. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.
Index (zero-based) at which position this entity ends. The index is exclusive.
x > 0
Index (zero-based) at which position this entity starts. The index is inclusive.
x > 0
A validly formatted URL.
Description of the URL landing page.
The URL as displayed in the X client.
A validly formatted URL.
The Media Key identifier for this attachment.
HTTP Status Code.
100 < x < 599
Title of the page the URL points to.
Fully resolved url.
The note content of the Tweet.
Organic nonpublic engagement metrics for the Tweet at the time of the request.
Number of times this Tweet has been viewed.
Number of times this Tweet has been liked.
Number of times this Tweet has been replied to.
Number of times this Tweet has been Retweeted.
Indicates if this Tweet contains URLs marked as sensitive, for example content suitable for mature audiences.
Promoted nonpublic engagement metrics for the Tweet at the time of the request.
Number of times this Tweet has been viewed.
Number of times this Tweet has been liked.
Number of times this Tweet has been replied to.
Number of times this Tweet has been Retweeted.
Engagement metrics for the Tweet at the time of the request.
Number of times this Tweet has been bookmarked.
Number of times this Tweet has been viewed.
Number of times this Tweet has been liked.
Number of times this Tweet has been replied to.
Number of times this Tweet has been Retweeted.
Number of times this Tweet has been quoted.
A list of Posts this Tweet refers to. For example, if the parent Tweet is a Retweet, a Quoted Tweet or a Reply, it will include the related Tweet referenced to by its parent.
Shows who can reply a Tweet. Fields returned are everyone, mentioned_users, subscribers, verified and following.
everyone
, mentionedUsers
, following
, other
, subscribers
, verified
The scopes for this tweet
Indicates if this Tweet is viewable by followers without the Tweet ID
This is deprecated.
The content of the Tweet.
The X handle (screen name) of this user.
Indicates withholding details for withheld content.
Indicates if the content is being withheld for on the basis of copyright infringement.
Provides a list of countries where this content is not available.
Indicates whether the content being withheld is the tweet
or a user
.
tweet
, user
The full name of this place.
The identifier for this place.
The full name of the county in which this place exists.
A two-letter ISO 3166-1 alpha-2 country code.
Feature
A GeoJson Point geometry object.
A GeoJson Position in the format [longitude,latitude]
.
Point
The human readable name of this place.
poi
, neighborhood
, city
, admin
, country
, unknown
Unique identifier of this poll.
5 < x < 10080
open
, closed
Specifies the type of attachments (if any) present in this Tweet.
A list of Media Keys for each one of the media attachments (if media are attached).
A list of Posts the media on this Tweet was originally posted in. For example, if the media on a tweet is re-used in another Tweet, this refers to the original, source Tweet..
A list of poll IDs (if polls are attached).
Unique identifier of this User. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.
The unique identifier of this Community.
Represents the data for the context annotation domain.
The unique id for a context annotation domain.
Description of the context annotation domain.
Name of the context annotation domain.
Represents the data for the context annotation entity.
The unique id for a context annotation entity.
Description of the context annotation entity.
Name of the context annotation entity.
Unique identifier of this Tweet. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.
Creation time of the Tweet.
Time when Tweet is no longer editable.
Number of times this Tweet can be edited.
Indicates if this Tweet is eligible to be edited.
A list of Tweet Ids in this Tweet chain.
Index (zero-based) at which position this entity ends. The index is inclusive.
x > 0
Index (zero-based) at which position this entity starts. The index is inclusive.
x > 0
Text used to determine annotation.
Confidence factor for annotation type.
0 < x < 1
Annotation type.
Index (zero-based) at which position this entity ends. The index is exclusive.
x > 0
Index (zero-based) at which position this entity starts. The index is inclusive.
x > 0
Index (zero-based) at which position this entity ends. The index is exclusive.
x > 0
Index (zero-based) at which position this entity starts. The index is inclusive.
x > 0
The text of the Hashtag.
Index (zero-based) at which position this entity ends. The index is exclusive.
x > 0
Index (zero-based) at which position this entity starts. The index is inclusive.
x > 0
The X handle (screen name) of this user.
Unique identifier of this User. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.
Index (zero-based) at which position this entity ends. The index is exclusive.
x > 0
Index (zero-based) at which position this entity starts. The index is inclusive.
x > 0
A validly formatted URL.
Description of the URL landing page.
The URL as displayed in the X client.
A validly formatted URL.
The Media Key identifier for this attachment.
HTTP Status Code.
100 < x < 599
Title of the page the URL points to.
Fully resolved url.
The location tagged on the Tweet, if the user provided one.
A GeoJson Point geometry object.
A GeoJson Position in the format [longitude,latitude]
.
Point
The identifier for this place.
Unique identifier of this Tweet. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.
Unique identifier of this User. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.
Language of the Tweet, if detected by X. Returned as a BCP47 language tag.
Nonpublic engagement metrics for the Tweet at the time of the request.
Number of times this Tweet has been viewed.
The full-content of the Tweet, including text beyond 280 characters.
The note content of the Tweet.
Organic nonpublic engagement metrics for the Tweet at the time of the request.
Number of times this Tweet has been viewed.
Number of times this Tweet has been liked.
Number of times this Tweet has been replied to.
Number of times this Tweet has been Retweeted.
Indicates if this Tweet contains URLs marked as sensitive, for example content suitable for mature audiences.
Promoted nonpublic engagement metrics for the Tweet at the time of the request.
Number of times this Tweet has been viewed.
Number of times this Tweet has been liked.
Number of times this Tweet has been replied to.
Number of times this Tweet has been Retweeted.
Engagement metrics for the Tweet at the time of the request.
Number of times this Tweet has been bookmarked.
Number of times this Tweet has been viewed.
Number of times this Tweet has been liked.
Number of times this Tweet has been replied to.
Number of times this Tweet has been Retweeted.
Number of times this Tweet has been quoted.
A list of Posts this Tweet refers to. For example, if the parent Tweet is a Retweet, a Quoted Tweet or a Reply, it will include the related Tweet referenced to by its parent.
Unique identifier of this Tweet. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.
retweeted
, quoted
, replied_to
Shows who can reply a Tweet. Fields returned are everyone, mentioned_users, subscribers, verified and following.
everyone
, mentionedUsers
, following
, other
, subscribers
, verified
The scopes for this tweet
Indicates if this Tweet is viewable by followers without the Tweet ID
This is deprecated.
The content of the Tweet.
The X handle (screen name) of this user.
Indicates withholding details for withheld content.
Indicates if the content is being withheld for on the basis of copyright infringement.
Provides a list of countries where this content is not available.
Indicates whether the content being withheld is the tweet
or a user
.
tweet
, user
Unique identifier of this User. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.
The friendly name of this User, as shown on their profile.
The X handle (screen name) of this user.
Metadata about a user's affiliation.
The badge URL corresponding to the affiliation.
The description of the affiliation.
The URL, if available, to details about an affiliation.
Unique identifier of this User. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.
Returns detailed information about the relationship between two users.
follow_request_received
, follow_request_sent
, blocking
, followed_by
, following
, muting
Creation time of this User.
The text of this User's profile description (also known as bio), if the User provided one.
A list of metadata found in the User's profile 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, but it may be fuzzily evaluated when performing searches with location queries.
Unique identifier of this Tweet. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.
Unique identifier of this Tweet. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.
The URL to the profile banner for this User.
The URL to the profile image for this User.
Indicates if this User has chosen to protect their Posts (in other words, if this User's Posts are private).
A list of metrics for this User.
Number of Users who are following this User.
Number of Users this User is following.
The number of lists that include this User.
The number of Posts (including Retweets) posted by this User.
The number of likes created by this User.
Indicates if you can send a DM to this User
The X Blue subscription type of the user, eg: Basic, Premium, PremiumPlus or None.
Basic
, Premium
, PremiumPlus
, None
The URL specified in the User's profile.
Indicate if this User is a verified X User.
The X Blue verified type of the user, eg: blue, government, business or none.
blue
, government
, business
, none
Indicates withholding details for withheld content.