> For the complete documentation index, see [llms.txt](https://docs.exoclick.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.exoclick.com/rtb/ru/reklamodateli/exoclick-rtb/exoclick-rtb-advertiser-code-examples.md).

# Примеры ExoClick RTB

## Запрос рекламодателя ExoClick RTB

### JSON баннера

```json
{
    "id": "d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa",
    "ip": "131.34.123.159",
    "language": "en",
    "type": "banner",
    "remote_addr": "131.34.123.159",
    "x_forwarded_for": "",
    "ua": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36",
    "url": "https://sitedomain.com/page",
    "user_id": "57592f333f8983.043587162282415065",
    "export": "json",
    "keyword": "Образ жизни",
    "size": "300x250",
    "sub": 445566
}
```

### JSON попандера

```json
{
    "id": "d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa",
    "ip": "131.34.123.159",
    "language": "en",
    "type": "popunder",
    "remote_addr": "131.34.123.159",
    "x_forwarded_for": "120.52.73.97",
    "ua": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36",
    "url": "https://sitedomain.com/page",
    "user_id": "57592f333f8983.043587162282415065",
    "export": "json",
    "keyword": "Образ жизни",
    "sub": 445566
}
```

### Push-уведомления 720x480 JSON

```json
{
    "id": "d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa",
    "ip": "131.34.123.159",
    "language": "en",
    "type": "push_notification",
    "remote_addr": "131.34.123.159",
    "x_forwarded_for": "120.52.73.97",
    "ua": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36",
    "url": "https://sitedomain.com/page",
    "user_id": "57592f333f8983.043587162282415065",
    "export": "json",
    "keyword": "Образ жизни",
    "size": "720x480",
    "sub": 445566
}
```

### Push-уведомления 192 x 192 JSON

```json
{
    "id": "d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa",
    "ip": "131.34.123.159",
    "language": "en",
    "type": "push_notification",
    "remote_addr": "131.34.123.159",
    "x_forwarded_for": "120.52.73.97",
    "ua": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36",
    "url": "https://sitedomain.com/page",
    "user_id": "57592f333f8983.043587162282415065",
    "export": "json",
    "keyword": "Образ жизни",
    "size": "192x192",
    "sub": 445566
}
```

## Ответ рекламодателя ExoClick RTB

### JSON баннера

```json
{
    "bid": {
        "id" : "d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa",
        "imgUrl" : "http://mysite.com/images/myad.jpg",
        "clickUrl" : "http://mysite.com/landingpages/mypage",
        "bUrl": "https://mysite.com/my_billing_notification_url",
        "btype": 1,
        "value" : 0.34
    }
}
```

### JSON переходов по email

```json
{
    "bid": {
        "id": "d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa",
        "clickUrl": "http://mysite.com/landingpages/mypage?el={email_encoded}",
        "value": 0.07,
        "btype": 2,
        "nUrl": "http://network-domain.com/win-notification",
        "bUrl": "https://mysite.com/my_billing_notification_url"
    }
}
```

### JSON попандера

```json
{
    "bid": {
        "id" : "dd4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa",
        "url" : "http://mysite.com/landingpages/mypage",
        "btype": 1,
        "value" : 0.13,
        "bUrl": "https://mysite.com/my_billing_notification_url"
    }
}
```

### JSON push-уведомлений

```json
{
    "bid": {
        "id" : "d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa",
        "iconUrl" : "http://mysite.com/images/myadicon.jpg",
        "clickUrl" : "http://mysite.com/landingpages/mypage",
        "title": "Мой заголовок объявления",
        "description": "Текст описания моего объявления",
        "btype": 2,
        "value" : 0.13,
        "bUrl": "https://mysite.com/my_billing_notification_url",
        "imptrackers": [
            "https://mytracker.com"
        ]
    }
}
```

### XML баннера

```xml
<?xml version="1.0"?>
<result>
    <bid>
        <id>d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa</id>
        <clickUrl><![CDATA[http://mysite.com/landingpages/mypage]]></clickUrl>
        <imgUrl><![CDATA[http://mysite.com/images/myad.jpg]]></imgUrl>
        <btype>1</btype>
        <value>0.34</value>
        <bUrl><!CDATA[https://mysite.com/my_billing_notification_url]]></bUrl>
    </bid>
</result>
```

### XML прямой ссылки

```xml
<?xml version="1.0"?>
<result>
    <bid>
        <id><![CDATA[d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa]]></id>
        <clickUrl><![CDATA[http://mysite.com/landingpages/mypage]]></clickUrl>
        <value><![CDATA[0]]></value>
        <btype><![CDATA[2]]></btype>
        <nUrl><![CDATA[http://network-domain.com/win-notification]]></nUrl>
        <bUrl><!CDATA[https://mysite.com/my_billing_notification_url]]></bUrl>
    </bid>
</result>
```

### XML кликов по email

```xml
<?xml version="1.0"?>
<result>
    <bid>
        <id><![CDATA[d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa]]></id>
        <clickUrl><![CDATA[http://mysite.com/landingpages/mypage?el={email_encoded}]]></clickUrl>
        <value><![CDATA[0.07]]></value>
        <btype><![CDATA[2]]></btype>
        <nUrl><![CDATA[http://network-domain.com/win-notification]]></nUrl>
        <bUrl><!CDATA[https://mysite.com/my_billing_notification_url]]></bUrl>
    </bid>
</result>
```

### XML попандера

```xml
<?xml version="1.0"?>
<result>
    <bid>
        <id>d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa</id>
        <url><![CDATA[http://mysite.com/landingpages/mypage]]></url>
        <btype>1</btype>
        <value>0.13</value>
        <bUrl><!CDATA[https://mysite.com/my_billing_notification_url]]></bUrl>
    </bid>
</result>
```

### Push-уведомление XML

```xml
<?xml version="1.0"?>
<result>
    <bid>
        <id>d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa</id>
        <iconUrl><![CDATA[http://mysite.com/images/myad.jpg]]></iconUrl>
        <clickUrl><![CDATA[http://mysite.com/landingpages/mypage]]></clickUrl>
        <title>Мой заголовок объявления</title>
        <description>Текст описания моего объявления</description>
        <btype>2</btype>
        <value>0.13</value>
        <imptrackers><![CDATA[https://mytracker.com]]></imptrackers>
        <bUrl><!CDATA[https://mysite.com/my_billing_notification_url]]></bUrl>
    </bid>
</result>
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.exoclick.com/rtb/ru/reklamodateli/exoclick-rtb/exoclick-rtb-advertiser-code-examples.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
