---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.com/dev/direct/doc/dg-v4/en/live/AdImage_Get.md
  - https://yandex.com/dev/direct/doc/dg-v4/ru/live/AdImage_Get.md
  - href: en/live/AdImage_Get.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

# Get
Returns a list of images.
## Restrictions

The method response may contain no more than 10,000 images.

The total number of images that meet the specified criteria is shown in the TotalObjectsCount output parameter. If the total is more than 10,000, you must use the Limit and Offset parameters to set up paged selection in order to get all the images.

## Input data

The input data structure in JSON is shown below.

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

Parameters are described below.


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

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

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

For advertisers, this parameter is ignored.
|
For agencies
||
||
`AdImageHashes`
|
Array containing the hashes of images (no more than 10,000).
|
No
||
||
`Assigned`
|
Array of strings containing filters for selecting images based on whether they are associated with ads:

- If it contains the string "Yes", associated images are selected.
- If it contains the string "No", unassociated images are selected.
- If it contains both strings or an empty array, filtering is not used, and all images are selected.
|
No
||
||
`Limit`
|
The number of images in the response. The maximum allowed value is 10,000. If omitted, the limit is 10,000.

When combined with the `Offset` parameter, this allows you to organize paginated selections from the database.
|
No
||
||
`Offset`
|
The number of images that should be skipped when getting the selection. If omitted, 0 is assumed.

When combined with the `Limit` parameter, this allows you to organize paginated selections from the database.
|
No
||

||
**Notes**
||
||
1. For advertisers: If the `SelectionCriteria` structure is empty, you will get all the images (up to 10,000).
1. If the `SelectionCriteria` structure has more than one criterion set, you will get the images that simultaneously match all the criteria. For example, if an agency has set the parameters `Logins` and `Assigned` with the "Yes" string, you will get the images belonging to the specified usernames that are associated with ads.
||
|#

## Output data

The output data structure in JSON is shown below.

```javascript
{
   "data": {
      /* AdImageResponse */
      "AdImages": [
         {  /* AdImage */
            "Login": (string),
            "AdImageHash": (string),
            "AdImageURL": (string),
            "Name": (string),
            "Assigned": (string)
         }
         ...
      ],
      "TotalObjectsCount": (int)
   }
}
```

Parameters are described below.


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

||
**<sub >AdImageResponse object</sub>**
||
||
`AdImages`
|
Array of `AdImage` objects containing information about images.
||
||
`TotalObjectsCount`
|
The total number of images that match the set criteria (without the `Limit` parameter).
||

||
**<sub >AdImage object</sub>**
||
||
`Login`
|
Username of the image's owner.
||
||
`AdImageHash`
|
Hash of the image.
||
||
`AdImageURL`
|
The link to the uploaded image.
||
||
`Name`
|
Caption (description) for the image.
||
||
`Assigned`
|
Whether the image is assigned to at least one of the client's ads — Yes/No.
||
|#

## Examples of input data

# Python

```python
{
   'Action': 'Get',
   'SelectionCriteria': {
      'Logins': ['agrom','larry'],
      'Assigned': ['Yes'],
      'Limit': 20,
      'Offset': 60
   }
}
```

# PHP

```php
array(
   'Action' => 'Get',
   'SelectionCriteria' => array(
      'Logins' => array('agrom','larry'),
      'Assigned' => array('Yes'),
      'Limit' => 20,
      'Offset' =60
   )
)
```

# Perl

```perl
{
   'Action' => 'Get',
   'SelectionCriteria' ={
      'Logins' => ['agrom','larry'],
      'Assigned' => ['Yes'],
      'Limit' => 20,
      'Offset' =60
   }
}
```


