get_rate_limits
Check remaining VK Ads API quota before making requests, combining live throttling data with cached rate-limit headers to diagnose HTTP 429 errors.
Instructions
Report remaining VK Ads API quota for diagnostics.
Combines two sources of throttling information:
A live
GET /throttling.jsoncall returning the API's current view of remaining requests per second, per hour, and per day (throttling).The last
X-RateLimit-*header values observed on any prior request, cached on the shared client (last_seen).
Use this to check how much API budget is left before issuing further listing or statistics requests, or to debug HTTP 429 rate-limit errors.
Returns: A dict with two keys:
* ``throttling``: the decoded ``/throttling.json`` body (remaining and
limit values for rps/hourly/daily quotas, as returned by the API).
* ``last_seen``: the most recent rate-limit header values observed by
the client (``rps_remaining``, ``hourly_remaining``,
``daily_remaining``); values are ``None`` until a request has run.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||