The Search Ads 360 Reporting API enforces limits on API operations to ensure
optimal system performance for all users.

## Pricing

Use of the Search Ads 360 Reporting API is included in the overall pricing of
Search Ads 360. There are no additional fees for using the API.

## Query Limits

The following limits apply to query operations performed through the Search or
SearchStream methods.

- 3,000 queries per minute per project per user
- 3,000 queries per minute per project
- 150,000 queries per day per project

## Daily API operation limits

Daily API usage limits are based on the number of API operations made per Google
Cloud project.

A single query or report is counted as one operation, regardless of the results
being streamed through
[`SearchAds360Service.SearchStream`](https://developers.google.com/search-ads/reporting/api/reference/rpc/google.ads.searchads360.v0.services.md.txt#google.ads.searchads360.v0.services.SearchAds360Service.SearchStream)
or paged from a
[`SearchAds360Service.Search`](https://developers.google.com/search-ads/reporting/api/reference/rpc/google.ads.searchads360.v0.services.md.txt#google.ads.searchads360.v0.services.SearchAds360Service.Search)
call. [Learn more](https://developers.google.com/search-ads/reporting/concepts/streaming.md.txt#rate_limits).

The following table gives some examples of the accounting:

| API request | Operations counted towards Daily Limit |
|---|---|
| Operation: `Search` Count: 53 ad groups Service: `SearchAds360Service` | 1 |
| Operation: `SearchStream` Count: 45 campaigns Service: `SearchAds360Service` | 1 |

Requests that violate these limits are rejected with the error:
[`RESOURCE_EXHAUSTED`](https://developers.google.com/search-ads/reporting/api/reference/rpc/google.ads.searchads360.v0.errors.md.txt#quotaerror).

## Search requests

A `Search` or `SearchStream` request counts as one operation against the user's
daily operation quota. One `SearchStream` request counts as one API operation
irrespective of the number of batches.

## gRPC limitations

All of the Search Ads 360 Reporting API
[client libraries](https://developers.google.com/search-ads/reporting/client-libraries/client-libraries.md.txt) use [gRPC](https://grpc.io/) for
generating requests and responses. By default, gRPC has a message size of 4 MB.

Responses must not exceed this limit. For example, a search request that
includes a lot of fields may generate a response that exceeds 4 MB in size. To
avoid this limit, you can reduce the number of selected fields, reduce the page
size, or use [streaming](https://developers.google.com/search-ads/reporting/concepts/streaming.md.txt).

Requests that violate this limitation will *not* generate a
[`SearchAds360Error`](https://developers.google.com/search-ads/reporting/api/reference/rpc/google.ads.searchads360.v0.errors.md.txt#searchads360error),
but will generate a `429 Resource Exhausted` gRPC error. Refer to the
[list of gRPC error codes and messages](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md).

## Paginated requests

Paginated requests (for example, requests that contain a valid
`next_page_token`) are not counted against a user's daily operation quota.
However, pagination requests that contain an expired or invalid page token will
generate an exception and will count against the daily operation quota.

Requests that are paginated, such as search requests, are also subject to the
`Page size cannot exceed 10,000 rows` limitation and are rejected if it violates
this limit, with the error:
[`INVALID_PAGE_SIZE`](https://developers.google.com/search-ads/reporting/api/reference/rpc/google.ads.searchads360.v0.errors.md.txt#requesterror).

For more details on pagination, refer to
[Paging through results](https://developers.google.com/search-ads/reporting/concepts/pagination.md.txt).

## Requests that return API exceptions

Requests that are rejected with a
[`SearchAds360Failure`](https://developers.google.com/search-ads/reporting/api/reference/rpc/google.ads.searchads360.v0.errors.md.txt#searchads360failure)
still count against the user's daily operation quota.

Requests that fail but don't return a
[`SearchAds360Failure`](https://developers.google.com/search-ads/reporting/api/reference/rpc/google.ads.searchads360.v0.errors.md.txt#searchads360failure),
such as from an error at the network level, won't count against the user's daily
operation quota since the requests would never reach the service. An example of
this is a network connectivity failure.

## Other types of limits

A repeated field, such as a list of operations, that has too many items in a
request can incur the error:
[`REQUEST_SIZE_LIMIT_EXCEEDED`](https://developers.google.com/search-ads/reporting/api/reference/rpc/google.ads.searchads360.v0.errors.md.txt#google.ads.searchads360.v0.errors.SizeLimitErrorEnum).
This same error message can also be due to other issues.

When making a [Search Ads 360 Query Language](https://developers.google.com/search-ads/reporting/query/query-language.md.txt) query,
the maximum number of items within an `IN` clause is 20,000. If you exceed that
limit, a
[`FILTER_HAS_TOO_MANY_VALUES`](https://developers.google.com/search-ads/reporting/api/reference/rpc/google.ads.searchads360.v0.errors.md.txt#google.ads.searchads360.v0.errors.QueryErrorEnum.QueryError)
error is returned.