---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.com/dev/direct/doc/dg-v4/en/live/AdImage_GetLimits.md
  - https://yandex.com/dev/direct/doc/dg-v4/ru/live/AdImage_GetLimits.md
  - href: en/live/AdImage_GetLimits.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/direct/doc/dg-v4/en/llms.txt

# GetLimits
Returns the total number of images that the client can upload, as well as the number of images that have already been uploaded or are currently in the upload queue.
## Input data

The input data structure in JSON is shown below.

```javascript
{
   "method": "AdImage",
   "param": {
      /* AdImageRequest */
      "Action": (string),
      "SelectionCriteria": {
         /* AdImageSelectionCriteria */
         "Logins": [
            (string)
            ...
         ]
      }
   }
}
```

Parameters are described below.


#|
||
**<sup >Parameter</sup>**
|
**<sup >Description</sup>**
|
**<sup >Required</sup>**
||

||
**<sub >AdImageRequest object</sub>**
||
||
`Action`
|
Action: GetLimits.
|
Yes
||
||
`SelectionCriteria`
|
The `AdImageSelectionCriteria` object, which contains criteria for selecting usernames.
|
For agencies
||

||
**<sub >AdImageSelectionCriteria object</sub>**
||
||
`Logins`
|
For agencies, an array containing the usernames of clients (no more than 1000) to get the number of images for.

For advertisers, this parameter is ignored.
|
For agencies
||
|#

## Output data

The output data structure in JSON is shown below.

```javascript
{
   "data": {
      /* AdImageResponse */
      "AdImageLimits": [
         {  /* AdImageLimit */
            "Login": (string),
            "Capacity": (int),
            "Utilized": (int)
         }
         ...
      ]
   }
}
```

Parameters are described below.


#|
||
**<sup >Parameter</sup>**
|
**<sup >Description</sup>**
||

||
**<sub >AdImageResponse object</sub>**
||
||
`AdImageLimits`
|
Array of AdImageLimit objects.
||

||
**<sub >AdImageLimit object</sub>**
||
||
`Login`
|
Client username.
||
||
`Capacity`
|
The total number of images the client can upload.
||
||
`Utilized`
|
The number of uploaded images, plus the number of upload tasks with the "Pending" status.
||
|#

## Examples of input data

# Python

```python
{
   'Action': 'GetLimits',
   'SelectionCriteria': {
      'Logins': ['agrom','larry']
   }
}
```

# PHP

```php
array(
   'Action' => 'GetLimits',
   'SelectionCriteria' => array(
      'Logins' => array('agrom','larry')
   )
)
```

# Perl

```perl
{
   'Action' => 'GetLimits',
   'SelectionCriteria' ={
      'Logins' => ['agrom','larry']
   }
}
```

