> ## Documentation Index
> Fetch the complete documentation index at: https://x-preview-mintlify-1d19a122.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> The v2 Post counts endpoint will eventually replace the enterprise Search API’s counts endpoint. Reference for the Enterprise X API tier covering migrate.

## Comparing X API’s Post counts endpoints

The v2 Post counts endpoint will eventually replace the [enterprise Search API’s counts endpoint](/x-api/enterprise-gnip-2.0/fundamentals/search-api#counts-requests-post-count). If you have code, apps, or tools that use an older version of a Post counts endpoint and are considering migrating to the newer X API v2 endpoints, then this guide is for you.

***

## Recent Post counts comparison

The enterprise version of the Post counts endpoints allow you to pull counts for either 30 days or from the full-archive. Therefore, the v2 recent Post counts endpoint, which looks at a 7 day time period, is not a direct replacement for either of the aforementioned endpoints.

However, to help with comparisons, we will look at how the v2 recent Post counts endpoint compares to the enterprise 30-day endpoint.

The following table compares the various types of recent Post counts endpoints:

| **Description**                                                                                                                                                    | **Enterprise**                                                                                                                                                | **X API v2**                                                                                       |
| :----------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------- |
| Host domain                                                                                                                                                        | [https://gnip-api.x.com](https://gnip-api.x.com)                                                                                                              | [https://api.x.com](https://api.x.com)                                                             |
| Endpoint path                                                                                                                                                      | /search/30day/accounts/:account\_name/:label/counts.json                                                                                                      | /2/tweets/counts/recent                                                                            |
| [Authentication](/resources/fundamentals/authentication)                                                                                                           | Basic authentication                                                                                                                                          | OAuth 2.0 Bearer Token                                                                             |
| Timestamp format                                                                                                                                                   | YYYYMMDDhhmm                                                                                                                                                  | YYYY-MM-DDTHH:mm:ssZ  <br />[ISO 8601 / RFC 3339](https://tools.ietf.org/html/rfc3339#section-5.6) |
| Returns counts of Posts that are no older than                                                                                                                     | 31 days                                                                                                                                                       | 7 days                                                                                             |
| HTTP methods supported                                                                                                                                             | GET                                                                                                                                                           | GET                                                                                                |
| Default request rate limits                                                                                                                                        | 20 requests per 1 sec, aggregated across search data and counts requests  <br />The per minute rate limit will vary by partner as specified in your contract. | 180 requests per 15 min per user  <br />450 requests per 15 min per App                            |
| Supports filtering using [annotations](/x-api/fundamentals/post-annotations)                                                                                       |                                                                                                                                                               | ✔                                                                                                  |
| Supports filtering using [conversation\_id](/x-api/fundamentals/conversation-id)                                                                                   |                                                                                                                                                               | ✔                                                                                                  |
| JSON key name for Post data array                                                                                                                                  | results                                                                                                                                                       | data                                                                                               |
| Time granularity                                                                                                                                                   | Day, hour, or minute                                                                                                                                          | Day, hour, or minute                                                                               |
| Timezone                                                                                                                                                           | UTC                                                                                                                                                           | UTC                                                                                                |
| Request parameters for selecting time period                                                                                                                       | fromDate  <br />toDate                                                                                                                                        | start\_time  <br />end\_time                                                                       |
| Request parameters for navigating by Post ID                                                                                                                       |                                                                                                                                                               | since\_id  <br />until\_id                                                                         |
| Requires the use of credentials from a [developer App](/resources/fundamentals/developer-apps) associated with a [project](/resources/fundamentals/developer-apps) |                                                                                                                                                               | ✔                                                                                                  |

### Full-archive Post counts comparison

The following table compares the various types of full-archive search endpoints:

| Description                                                                                                                                                                                                                                | Enterprise                                                                                               | X API v2                                                                                           |
| :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------- |
| Host domain                                                                                                                                                                                                                                | [https://gnip-api.x.com](https://gnip-api.x.com)                                                         | [https://api.x.com](https://api.x.com)                                                             |
| Endpoint path                                                                                                                                                                                                                              | /search/fullarchive/accounts/:account\_name/:label/counts                                                | /2/tweets/counts/all                                                                               |
| [Authentication](/resources/fundamentals/authentication)                                                                                                                                                                                   | Basic auth                                                                                               | OAuth 2.0 Bearer Token                                                                             |
| Timestamp format                                                                                                                                                                                                                           | YYYYMMDDHHMM                                                                                             | YYYY-MM-DDTHH:mm:ssZ  <br />[ISO 8601 / RFC 3339](https://tools.ietf.org/html/rfc3339#section-5.6) |
| Returns Post counts that are no older than                                                                                                                                                                                                 | The full archive since March 2006                                                                        | The full archive since March 2006                                                                  |
| HTTP methods supported                                                                                                                                                                                                                     | GET  <br />POST                                                                                          | GET                                                                                                |
| Default request rate limits                                                                                                                                                                                                                | The per minute rate limit will vary by partner as specified in your contract.  <br />20 requests per sec | 300 requests per 15 min per App  <br />1 request per 1 sec per App                                 |
| Granularity                                                                                                                                                                                                                                | Day, hour, minute                                                                                        | Day, hour, minute                                                                                  |
| Supports filtering using [annotations](/x-api/fundamentals/post-annotations)                                                                                                                                                               |                                                                                                          | ✔                                                                                                  |
| Supports filtering using [conversation\_id](/x-api/fundamentals/conversation-id)                                                                                                                                                           |                                                                                                          | ✔                                                                                                  |
| JSON key name for Post data array                                                                                                                                                                                                          | results                                                                                                  | data                                                                                               |
| Request parameters for selecting time period                                                                                                                                                                                               | fromDate  <br />toDate                                                                                   | start\_time  <br />end\_time                                                                       |
| Request parameters for navigating by Post ID                                                                                                                                                                                               |                                                                                                          | since\_id  <br />until\_id                                                                         |
| JSON key name for pagination                                                                                                                                                                                                               | next                                                                                                     | meta.next\_token                                                                                   |
| Request parameter for pagination                                                                                                                                                                                                           | next\_token                                                                                              | next\_token or pagination\_token                                                                   |
| Timezone                                                                                                                                                                                                                                   | UTC                                                                                                      | UTC                                                                                                |
| Requires the use of credentials from a [developer App](/resources/fundamentals/developer-apps) associated with a [Project](/resources/fundamentals/developer-apps) that has [Academic Research access](/x-api/getting-started/about-x-api) |                                                                                                          | ✔                                                                                                  |

### Filtering operator comparison

The two different versions (enterprise, and v2) of Post counts differ in which operators are available, and also have varying levels of operator availability within each version, which are explained below.

Enterprise

* There are no sub-tiers of enterprise operators. All enterprise operators are available to all enterprise users.

X API v2

* **Core:** These operators are available to any v2 user.
* **Advanced:** These operators are only available to users that have been approved for Academic Research access.

You can learn more about each of these sets of operators in their respective guides:

* [Enterprise operators](/x-api/enterprise-gnip-2.0/fundamentals/search-api#building-search-queries)
* [X API v2 operators](/x-api/posts/search/integrate/build-a-query)

Now that we understand these different operator levels within X API v2, here is the table that maps out operator availability for Post counts (note that if the cell is left blank, the operator is not available):

|                   | Enterprise | v2                                       |
| :---------------- | :--------- | :--------------------------------------- |
| keyword           | Available  | Core                                     |
| emoji             | Available  | Core                                     |
| “exact phrase”    | Available  | Core                                     |
| #                 | Available  | Core                                     |
| \$                | Available  | Advanced                                 |
| @                 | Available  | Core                                     |
| from:             | Available  | Core                                     |
| to:               | Available  | Core                                     |
| url:              | Available  | Core                                     |
| retweets\_of:     | Available  | Core                                     |
| context:          |            | Core                                     |
| entity:           |            | Core - Only available with recent search |
| conversation\_id: |            | Core                                     |
| place:            | Available  | Advanced                                 |
| place\_country:   | Available  | Advanced                                 |
| point\_radius:    | Available  | Advanced                                 |
| bounding\_box:    | Available  | Advanced                                 |
| is:retweet        | Available  | Core                                     |
| is:reply          | Available  | Core                                     |
| is:quote          | Available  | Core                                     |
| is:verified       | Available  | Core                                     |
| -is:nullcast      | Available  | Advanced                                 |
| has:hashtags      | Available  | Core                                     |
| has:cashtags      | Available  | Advanced                                 |
| has:links         | Available  | Core                                     |
| has:mentions      | Available  | Core                                     |
| has:media         | Available  | Core                                     |
| has:images        | Available  | Core                                     |
| has:videos        | Available  | Core                                     |
| has:geo           | Available  | Advanced                                 |
| lang:             | Available  | Core                                     |
| list:             |            | Advanced                                 |
| has:profile\_geo  | Available  |                                          |
| profile\_country  | Available  |                                          |
| profile\_locality | Available  |                                          |
| profile\_region   | Available  |                                          |
| proximity         | Available  |                                          |

**Other migration resources**

[X API migration hub](/x-api/migrate/overview)

[Check out some sample code for these endpoints](https://github.com/xdevplatform/Twitter-API-v2-sample-code "Check out some sample code for these endpoints")

[Post counts: Enterprise to X API v2](/x-api/posts/counts/migrate/overview)
