> 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/guang-gao-zhu/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": "バナー",
    "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": "ポップアンダー",
    "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
}
```

### プッシュ通知 720x480 JSON

```json
{
    "id": "d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa",
    "ip": "131.34.123.159",
    "language": "en",
    "type": "プッシュ通知",
    "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
}
```

### プッシュ通知 192 x 192 JSON

```json
{
    "id": "d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa",
    "ip": "131.34.123.159",
    "language": "en",
    "type": "プッシュ通知",
    "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

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

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

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

### プッシュ通知 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>My Ad Title</title>
        <description>My Ad Description Text</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/ja/guang-gao-zhu/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.
