Enterprise compared to Twitter API v2
- Endpoint URLs
- App and Project requirement
- Available time periods
- Response data format
- HTTP methods
- Request time formats
- Request parameters
- Filtering operators
While v2 has additional pagination features (new pagination parameters that allow you to navigate using Tweet IDs with
until_id), both enterprise and v2 allow you to paginate using time (
toDate with enterprise, and
end_time for v2).
As noted in the pagination section, you can navigate different pages of data using time for both enterprise and v2. In both cases, you will be using UTC as the timezone when using these parameters.
- Enterprise endpoints:
- 30 day -
- Full-archive -
- 30 day -
- Twitter API v2 endpoints
- Recent (7 day) -
- Full-archive -
- Recent (7 day) -
App and Project requirement
The Twitter API v2 endpoints require that you use credentials from a Project when authenticating your requests. All Twitter API v1.1 endpoints can use credentials from standalone Apps or Apps associated with a Project.
Available time periods
Both the enterprise API and Twitter API v2 offer endpoints that allow you to retrieve filtered Tweet data for the full-archive of Tweets.
However, the Twitter API v2 does not offer a 30 day time period endpoint like the enterprise API does. Instead it offers the aforementioned full-archive, or a 7 day time period, which align with the Native Enriched to v2 and Activity Streams to v2 which can help you map enterprise fields to the newer v2 fields. This guide will also provide you the specific expansion and field parameter that you will need to pass with your v2 request to return specific fields.
Response data format
For the enterprise Search API, you receive many of the response fields by default, and then have the option to use parameters to identify which fields or sets of fields should return in the payload.
The Twitter API v2 version only delivers the Tweet
text fields by default. To request any additional fields or objects, you will need to use the fields and expansions parameters. Any Tweet fields that you request from these endpoints will return in the primary Tweet object. Any expanded user, media, poll, or place objects and fields will return in an
includes object within your response. You can then match any expanded objects back to the Tweet object by matching the IDs located in both the Tweet and the expanded object.
We encourage you to read more about these new parameters in their respective guides, or by reading our guide on how to use fields and expansions.
- At the JSON root level, the standard endpoints return Tweet objects in a
statusesarray, while Twitter API v2 returns a
- Instead of referring to Retweeted and Quoted "statuses", Twitter API v2 JSON refers to Retweeted and Quoted Tweets. Many legacy and deprecated fields, such as
user.translator_typeare being removed.
- Instead of using both
favorites(in Tweet object) and
favourites(in user object), Twitter API v2 uses the term like.
- Twitter is adopting the convention that JSON values with no value (for example,
null) are not written to the payload. Tweet and user attributes are only included if they have non-null values.
We also introduced a new set of fields to the Tweet object including the following:
- A conversation_id field
- Two new annotations fields, including context and entities
- Several new metrics fields
- A new
reply_settingfield, which shows you who can reply to a given Tweet
And one last note. The premium response includes a
requestParameters object at the root level, which contains the parameters that you included in your request. The v2 version instead contains a
meta object that lives at the root level which includes the
next_token if there is an additional page of results.
The enterprise version of the API allows you to pass the request as either a POST HTTP method with a JSON body, or a GET HTTP method with a query string.
V2 only allows you to use the GET HTTP method with a query string.
Request time formats
The enterprise version of this endpoint uses the following date/time format in both the pagination parameters and the
timePeriod response field:
The v2 endpoint uses ISO 8601/RFC 3339 date/time format in both the pagination parameters and the
end response fields:
The following is a table of the request parameters for enterprise and Twitter API v2:
|Enterprise||Search Tweets v2|
|fromDate (YYMMDDHHmm)||start_time (YYYY-MM-DDTHH:mm:ssZ)|
|toDate (YYMMDDHHmm)||end_time (YYYY-MM-DDTHH:mm:ssZ)|
|next||next_token or pagination_token|
While the operators between enterprise and Twitter API v2 are mostly the same, there are some differences in operator availability and some new operators that were introduced to just the Twitter API v2 version.
To see a full table of the operators that are available for Twitter API v2, enterprise, and even premium and standard, please visit the Search Tweets migration landing page.