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

# ExoClick RTB の例

## ExoClick RTB パブリッシャーリクエスト

### POST バナー 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",
    "sub": 1234,
    "export": "json",
    "keyword": "lifestyle, humour",
    "size": "300x250"
}
```

### POST ポップアンダー 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",
    "sub": 4312,
    "export": "json",
    "keyword": "lifestyle, humour"
}
```

### POST プッシュ通知 - 720 x 480 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",
    "sub": 4312,
    "export": "json",
    "keyword": "lifestyle, humour",
    "size": "720x480"
}
```

### POST プッシュ通知 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",
    "sub": 4312,
    "export": "json",
    "keyword": "lifestyle, humour",
    "size": "192x192"
}
```

### POST インページプッシュ JSON

```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": "lifestyle, humour"
}
```

### POST ダイレクトリンク JSON

```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": "lifestyle, humour",
    "el": "dGVzdEBleGFkcy5jb20="
}
```

### POST メールクリック JSON

```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": "lifestyle, humour",
    "el": "dGVzdEBleGFkcy5jb20="
}
```

### GET バナー URL

```
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=lifestyle,humour&size=300x250
```

### GET メールクリック URL

```
https://rtb.{networkdomain}/rtb.php?idzone=2999625&fid=bc64cd7206ae2b2d4346f73629595660d3d117ac&id=d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa&type=email_click&keyword=lifestyle,humour&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
```

### GET ポップアンダー URL

```
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=lifestyle,humour
```

### GET プッシュ通知 720 x 480 URL

```
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=lifestyle,humour&size=720x480
```

### GET プッシュ通知 192 x 192 URL

```
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=lifestyle,humour&size=192x192
```

### GET インページプッシュ通知 URL

```
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=lifestyle,humour&size=192x192
```

### GET ダイレクトリンク URL

```
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=lifestyle,humour&export=xml&el=dGVzdGVAZW1haWwuY29t
```

## ExoClick RTB パブリッシャー応答

### バナー JSON

```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

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

### メールクリック JSON

```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

```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

```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": "マイ広告タイトル",
        "description": "マイ広告の説明文",
        "btype": 2,
        "value" : 0.13
    }
}
```

### インページプッシュ JSON

```json
{
    "bid": {
        "id": "5c2e180f3a1371d9256f6616c6792fb2c7a64772",
        "value": 0.0035,
        "clickUrl": "http://mysite.com/landingpages/mypage",
        "imgUrl": "http://mysite.com/images/myad.jpg",
        "title": "タイトル",
        "description": "説明",
        "btype": 1,
        "nUrl": "http://network-domain.com/win-notification"
    }
}
```

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

### メールクリック XML

```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

```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

```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>マイ広告タイトル</title>
        <description>マイ広告の説明文</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/ja/paburissh/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.
