---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.1
alternate:
  - https://yandex.com/dev/adfox/doc/en/v.1/pagination.md
  - https://yandex.com/dev/adfox/doc/ru/v.1/pagination.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/adfox/doc/en/llms.txt

# Pagination

Split the response into several pages. Available in all Adfox API versions. Pagination is used in all requests.

## Request format {#section_kjl_g1p_qjb}

You can set up pagination using two parameters:

```
https://adfox.yandex.com/api/v1
  ? [[offset](*offset)=<integer>]
  & [[limit](*limit)=<integer>]
```

#|
||
`offset`
| Number of objects in the list to skip.

{% include notitle [Default value](../_includes/shorts.md#defaultzero) %} ||
||
`limit`
| Number of objects per page.

The default value is `10`. The maximum value is `1000`. ||
|#

{% note alert %}

Pagination is used in all requests. If the `limit` value isn't passed in the request, the default value of `10` is applied.

{% endnote %}

> **Example**
>
> Request a list of all campaigns, with 25 campaigns per page.
>
> ```
> https://adfox.yandex.com/api/v1?object=account&action=list&>actionObject=campaign&offset=0&limit=25
> ```
>
> Request to view the second page with 25 campaigns:
>
> ```
> https://adfox.yandex.com/api/v1?object=account&action=list&>actionObject=campaign&offset=25&limit=25
> ```
>

## Response format

A pagination block has been added in the response to the request. It has information about the total number of pages, which page the response is currently on, the total number of objects, the number of objects on this page, and links to the first, previous, next, and last pages.

Sample pagination block in the response:

```xml
...
<links>
 <first>
  <![CDATA[
   https://adfox.yandex.com/api/v1?object=account&action=list&actionObject=campaign&offset=0&limit=5
  ]]>
 </first>
 <prev>
  <![CDATA[
   https://adfox.yandex.com/api/v1?object=account&action=list&actionObject=campaign&offset=0&limit=5
  ]]>
 </prev>
 <next>
  <![CDATA[
   https://adfox.yandex.com/api/v1?object=account&action=list&actionObject=campaign&offset=10&limit=5
  ]]>
 </next>
 <last>
  <![CDATA[
   https://adfox.yandex.com/api/v1?object=account&action=list&actionObject=campaign&offset=80&limit=5
  ]]>
 </last>
<limit>5</limit>
<offset>5</offset>
<total_pages>17</total_pages>
<page>2</page>
<total_rows>85</total_rows>
<rows>5</rows>
...
```

## Pagination block parameters

#|
||
`first`
| Link to the first page. ||
||
`prev`
| Link to the previous page. ||
||
`next`
| Link to the next page. ||
||
`last`
| Link to the last page. ||
||
`total_pages`
| Total number of pages. ||
||
`page`
| Number of the current page. ||
||
`total_rows`
| Total number of objects. ||
||
`rows`
| Number of objects displayed on the page. ||
|#

[*offset]: Number of objects in the list to skip.
    
Default value: `0`.

[*limit]: Number of objects per page.
    
The default value is `10`. The maximum value is `1000`.
{% included (../_includes/shorts.md) %}
<!-- Эти инклюды могут использоваться и как самостоятельный текст на md-страницах, и как часть текста в v.1.md с таким же тегом в заголовке -->

### {#account}

User account.

### {#actionType}

Description of actions performed by the intermediary representative.

Acceptable values:

- `0`: Other.
- `1`: Actions related to ad distribution.
- `2`: Conclusion of contracts.
- `3`: Commercial representation.

### {#actionObjectID-get}

To get data for only one object, specify its ID.

### {#advertiserID}

Advertiser ID.

### {#advertiserID-read}

Read also:

- [Create an advertiser](https://yandex.com/dev/adfox/doc/en/v.1/account/account-add-advertiser.md)
- [Get a list of advertisers](https://yandex.com/dev/adfox/doc/en/v.1/account/account-list-advertiser.md)

### {#assistantID}

ID of the [assistant](https://yandex.com/support/adfox-sites/users/assistant-api.html?lang=en) who will be allowed access to the object according to their permissions.

### {#assistantID-read}

Read also:

- [Create an assistant](https://yandex.com/dev/adfox/doc/en/v.1/account/account-add-assistant.md)
- [Get a list of assistants](https://yandex.com/dev/adfox/doc/en/v.1/account/account-list-assistant.md)

### {#bannerID}

Banner ID.

### {#bannername}

Banner name.

### {#bannerTypeID}

Banner type ID.

### {#categoryID}

Category ID.

### {#contractID}

ID of a direct or primary contract.

### {#criteriaID}

User characteristic ID.

### {#criteriaName}

User characteristic name.

### {#criteriaTargetingName}

The name of the tab for targeting by user characteristics for an ad campaign and banner.

### {#criteriaReportName}

The name of the user characteristic targeting report.

### {#format-datetime}

Date and time transmission format: `YYYY-MM-DD HH:mm`.

### {#format-date}

Date format: `YYYY-MM-DD`.

### {#format-time}

Time format: `HH:mm`.

### {#format-sec}

Time format with seconds: `HH:mm:ss`.

### {#dateStart}

Ad running start date.

### {#dateEnd}

Delivery end date.

### {#defaultzero}

Default value: `0`.

### {#defaultone}

Default value: `1`.

### {#defaulthundred}

Default value: `100`.

### {#defaultminusone}

Default value: `-1`.

### {#defaultCode}

Backup ad.

### {#delete}

ID of the object to delete.

### {#impressionsSmoothTypeID}

- `4`: Maximum at the beginning of campaign delivery. Impressions are distributed unevenly: the system schedules more impressions in the first days of placement and gradually decreases them toward the end of the campaign. This reduces the risk of campaign underdelivery if the available inventory gets unexpectedly limited at the end of the campaign period.
    Make sure to specify the maximum number of impressions (`maxImpressions`) and the ad campaign end date (`dateEnd`).

### {#isRegReport}

The contractor is responsible for registering and submitting ad creatives.

### {#markingSelectedRegions}

ID of the ad impression region.

### {#markingCommonDescription}

General description of the advertised item.

### {#markingSendRegionsType}

Display region.

### {#maxImpressionsPerDay}

Maximum number of impressions per day.

### {#maxImpressionsPerHour}

Maximum number of impressions per hour.

### {#maxClicks}

Maximum total number of click-throughs.

### {#maxClicksPerDay}

Maximum number of clicks per day.

### {#maxClicksPerHour}

Maximum number of clicks per hour.

### {#mediaData}

Array of creative's media data. This field is required if the `textData` and `sendToErir<ParameterN>` parameters were omitted.

The URL is checked for accessibility before saving. The `description` field is optional.

{% cut "Example" %}

```
mediaData[]={"url": "https://avatars.mds.yandex.net/get-adfox-content/2462621/221121_adfox_2033661_5594482.379ba05374bcd6b6339273f47b5a1b64.jpeg/optimize.webp", "description": "Text_string"}
```

{% endcut %}

### {#objectID-user}

Characteristic value ID.

### {#campaignID}

Campaign ID.

### {#placeID}

Placement ID.

### {#platformType}

Acceptable values:

- `0`: App.
- `1`: Site.
- `2`: Information system (no longer used, deprecated).
- `3`: Smart TV.
- `4`: HbbTV.

### {#publisherContractID}

ID of the final contract.

### {#roles}

The roles the counterparty can assume when entering into a contract.

Acceptable values:

- `0`: Contractor.
- `1`: Customer.

### {#sample}

{% cut "Example" %}

- For the standard template:

    ```css
    ٭site.com/index.php
    ```

- For POSIX.2:

    ```css
    homer-simpson-tv\.blog4ever\.com|forum\.rojadirecta\.org|^hidan\.eklablog\.com.٭|^aniworld\.spb\.ru\/.٭\/adfox\/.٭s$
    ```

{% endcut %}

### {#separator-comma}

Use a comma to separate object IDs in the list.

### {#separator-line}

To pass multiple values, use a vertical bar `|` as a separator without spaces.

### {#separator-words}

Recording format:

- Use a comma to separate phrases.
- Use a space or comma to separate keywords.

### {#subjectType}

Subject matter of the contract.

Acceptable values:

- `0`: Other.
- `1`: Ad distribution contract.
- `2`: Contract to organize ad distribution.
- `3`: Mediation.
- `4`: Representation.

### {#templateID}

Banner template ID.

### {#targetingProfileID}

[Targeting profile](https://yandex.com/support/adfox-sites/settings/profiles.html?lang=en) ID.

### {#textData}

Array of creative's text data. This field is required if the `mediaData` and `sendToErir<ParameterN>` parameters were omitted.

### {#values}

Acceptable values: Integers from `1` to `2147483647`.

### {#values-on-off}

Acceptable values:

- `on`: Enable placement.
- `off`: Disable placement.

### {#values-0-1}

Acceptable values:

- `0`: disabled.
- `1`: enabled.

### {#values-no-yes}

Acceptable values:

- `0`: No.
- `1`: Yes.

### {#values-code}

Acceptable values:

- `0`: HTML.
- `1`: JavaScript.

### {#frequencyType}

Acceptable values:
    
- `0`: Not set.
- `1` 1 hour.
- `2`: 4 hours.
- `3`: 6 hours.
- `4`: 12 hours.
- `5`: 24 hours.
- `6`: A week.
- `7`: A month.
- `8`: Other period.
- `9`: 14 days.

### {#values-all-required}

An entry can contain Russian and Latin letters, numbers, and any special characters

### {#values-users}

An entry can contain Russian and Latin letters, numbers, and any special characters

If you're enabling a new characteristic, this parameter is required.

### {#video-duration}

Video duration in seconds.

### {#uniquePeriodImpressions}

If your impression frequency is set to `other period` (`frequencyTypeImpressions`=`8`), enter a custom period in hours and minutes for banner impressions per user.

### {#url}

Website or video resource domain, blog URL, or app download link. Ad labeling parameter.

{% endincluded %}