> 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/es/editores/exoclick-rtb/exoclick-rtb-publisher-code-examples.md).

# Ejemplos de RTB de ExoClick

## Solicitud RTB del editor de ExoClick

### POST JSON de banner

```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",
    "sub": 1234,
    "export": "json",
    "keyword": "estilo de vida, humor",
    "size": "300x250"
}
```

### POST JSON de popunder

```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",
    "sub": 4312,
    "export": "json",
    "keyword": "estilo de vida, humor"
}
```

### POST JSON de notificaciones push - 720 x 480

```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",
    "sub": 4312,
    "export": "json",
    "keyword": "estilo de vida, humor",
    "size": "720x480"
}
```

### POST JSON de notificaciones push 192 x 192

```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",
    "sub": 4312,
    "export": "json",
    "keyword": "estilo de vida, humor",
    "size": "192x192"
}
```

### POST JSON de push en página

```json
{
    "id": "5c2e180f3a1371d9256f6616c6792fb2c7a64772",
    "ip": "131.34.123.159",
    "language": "en",
    "type": "in_page_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",
    "sub": 1234,
    "export": "json",
    "keyword": "estilo de vida, humor"
}
```

### POST JSON de enlace directo

```json
{
    "id": "d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa",
    "ip": "131.34.123.159",
    "language": "en",
    "type": "direct_link",
    "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",
    "sub": 4312,
    "export": "json",
    "keyword": "estilo de vida, humor",
    "el": "dGVzdEBleGFkcy5jb20="
}
```

### POST JSON de clics de correo electrónico

```json
{
    "id": "d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa",
    "ip": "131.34.123.159",
    "language": "en",
    "type": "email_click",
    "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",
    "sub": 4312,
    "export": "json",
    "keyword": "estilo de vida, humor",
    "el": "dGVzdEBleGFkcy5jb20="
}
```

### URL de banner GET

```
https://rtb.{examplenetworkdomain}/rtb.php?idzone=2999625&fid=bc64cd7206ae2b2d4346f73629595660d3d117ac&id=d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa&ip=131.34.123.159&language=en&type=banner&remote_addr=131.34.123.159&ua=Mozilla/5.0%20(X11;%20Linux%20x86_64)%20AppleWebKit/537.36%20(KHTML,%20like%20Gecko)%20Chrome/66.0.3359.139%20Safari/537.36&url=https://sitedomain.com/page&user_id=57592f333f8983.043587162282415065&sub=1234&export=json&keyword=estilo de vida,humor&size=300x250
```

### URL de clics de correo electrónico GET

```
https://rtb.{networkdomain}/rtb.php?idzone=2999625&fid=bc64cd7206ae2b2d4346f73629595660d3d117ac&id=d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa&type=email_click&keyword=estilo de vida,humor&export=xml&ip=192.168.1.70&ua=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36&user_id=1&el=dGVzdGVAZW1haWwuY29t
```

### URL de popunder GET

```
https://rtb.{examplenetworkdomain}/rtb.php?idzone=2999625&fid=bc64cd7206ae2b2d4346f73629595660d3d117ac&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%20(X11;%20Linux%20x86_64)%20AppleWebKit/537.36%20(KHTML,%20like%20Gecko)%20Chrome/66.0.3359.139%20Safari/537.36&url=https://sitedomain.com/page&user_id=57592f333f8983.043587162282415065&sub=4312&export=json&keyword=estilo de vida,humor
```

### URL de notificaciones push 720 x 480 GET

```
https://rtb.{examplenetworkdomain}/rtb.php?idzone=2999625&fid=bc64cd7206ae2b2d4346f73629595660d3d117ac&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%20(X11;%20Linux%20x86_64)%20AppleWebKit/537.36%20(KHTML,%20like%20Gecko)%20Chrome/66.0.3359.139%20Safari/537.36&url=https://sitedomain.com/page&user_id=57592f333f8983.043587162282415065&sub=4312&export=json&keyword=estilo de vida,humor&size=720x480
```

### URL de notificaciones push 192 x 192 GET

```
https://rtb.{examplenetworkdomain}/rtb.php?idzone=2999625&fid=bc64cd7206ae2b2d4346f73629595660d3d117ac&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%20(X11;%20Linux%20x86_64)%20AppleWebKit/537.36%20(KHTML,%20like%20Gecko)%20Chrome/66.0.3359.139%20Safari/537.36&url=https://sitedomain.com/page&user_id=57592f333f8983.043587162282415065&sub=4312&export=json&keyword=estilo de vida,humor&size=192x192
```

### URL de notificaciones push en página GET

```
http://rtb.{examplenetworkdomain}/rtb.php?idzone=5307609&fid=bd1110cd7802712c5f7abb146954fb89748c236b&id=d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa&ip=131.34.123.159&language=en&type=in_page_push_notification&remote_addr=131.34.123.159&x_forwarded_for=120.52.73.97&ua=Mozilla/5.0%20(X11;%20Linux%20x86_64)%20AppleWebKit/537.36%20(KHTML,%20like%20Gecko)%20Chrome/66.0.3359.139%20Safari/537.36&url=https://sitedomain.com/page&user_id=57592f333f8983.043587162282415065&sub=4312&export=json&keyword=estilo de vida,humor&size=192x192
```

### URL de enlace directo GET

```
http://rtb.{examplenetworkdomain}/rtb.php?idzone=3206099&fid=326d931254f7552d8f3b80cf34e9e09a2924867c&ua=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36&ip=131.34.123.159&id=d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa&type=direct_link&keyword=estilo de vida,humor&export=xml&el=dGVzdGVAZW1haWwuY29t
```

## Respuesta RTB del editor de ExoClick

### JSON de banner

```json
{
    "bid": {
        "id" : "d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa",
        "imgUrl" : "http://mysite.com/images/myad.jpg",
        "clickUrl" : "http://mysite.com/landingpages/mypage",
        "nUrl": "http://network-domain.com/win-notification",
        "btype": 1,
        "value" : 12.34
    }
}
```

### JSON de enlace directo

```json
{
    "bid": {
        "id" : "d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa",
        "url" : "http://mysite.com/landingpages/mypage",
        "nUrl": "http://network-domain.com/win-notification",
        "btype": 2,
        "value" : 0
    }
}
```

### JSON de clics de correo electrónico

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

### JSON de popunder

```json
{
    "bid": {
        "id" : "d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa",
        "url" : "http://mysite.com/landingpages/mypage",
        "nUrl": "http://network-domain.com/win-notification",
        "btype": 1,
        "value" : 21.13
    }
}
```

### JSON de notificaciones push

```json
{
    "bid": {
        "id" : "d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa",
        "iconUrl" : "http://mysite.com/images/myadicon.jpg",
        "clickUrl" : "http://mysite.com/landingpages/mypage",
        "nUrl": "http://network-domain.com/win-notification",
        "title": "Mi título del anuncio",
        "description": "Mi texto de descripción del anuncio",
        "btype": 2,
        "value" : 0.13
    }
}
```

### JSON de push en página

```json
{
    "bid": {
        "id": "5c2e180f3a1371d9256f6616c6792fb2c7a64772",
        "value": 0.0035,
        "clickUrl": "http://mysite.com/landingpages/mypage",
        "imgUrl": "http://mysite.com/images/myad.jpg",
        "title": "Título",
        "description": "Descripción",
        "btype": 1,
        "nUrl": "http://network-domain.com/win-notification"
    }
}
```

### XML de banner

```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>
        <nUrl><![CDATA[http://network-domain.com/win-notification]]></nUrl>
        <btype>1</btype>
        <value>12.34</value>
    </bid>
</result>
```

### XML de enlace directo

```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>
    </bid>
</result>
```

### XML de clics de correo electrónico

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

### XML de popunder

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

### XML de notificaciones push

```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>
        <nUrl><![CDATA[http://network-domain.com/win-notification]]></nUrl>
        <title>Mi título del anuncio</title>
        <description>Mi texto de descripción del anuncio</description>
        <btype>2</btype>
        <value>0.13</value>
    </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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.exoclick.com/rtb/es/editores/exoclick-rtb/exoclick-rtb-publisher-code-examples.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
