Skip to content

Banner: OpenRTB example ​

Hosts are placeholders; the example uses OpenRTB 2.6 unless stated otherwise. Fields are described in the specification.

Request ​

json
{
  "at": 1,
  "badv": [
    "blocked-brand.example"
  ],
  "bcat": [
    "IAB25",
    "IAB26"
  ],
  "cur": [
    "USD"
  ],
  "device": {
    "devicetype": 2,
    "ip": "203.0.113.10",
    "language": "de",
    "os": "Windows",
    "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36"
  },
  "id": "req-banner-1",
  "imp": [
    {
      "banner": {
        "format": [
          {
            "h": 250,
            "w": 300
          },
          {
            "h": 280,
            "w": 336
          }
        ],
        "pos": 1
      },
      "bidfloor": 0.5,
      "bidfloorcur": "USD",
      "id": "1",
      "secure": 1,
      "tagid": "zone-top-300x250"
    }
  ],
  "regs": {
    "gdpr": 1
  },
  "site": {
    "cat": [
      "IAB12"
    ],
    "domain": "publisher.example",
    "id": "site-1",
    "page": "https://publisher.example/news/article-1",
    "publisher": {
      "ext": {
        "subid": "sub-42"
      },
      "id": "pub-1"
    }
  },
  "tmax": 300,
  "user": {
    "buyeruid": "b-456",
    "consent": "CP_EXAMPLE_TCF_STRING",
    "id": "u-123"
  }
}

Response ​

json
{
  "id": "req-banner-1",
  "seatbid": [
    {
      "bid": [
        {
          "id": "0b9c2f4e-1111-4a2b-9c3d-000000000001",
          "impid": "1",
          "price": 0.82,
          "adid": "1001",
          "nurl": "https://notify.example.com/wn?id=0b9c2f4e-1111-4a2b-9c3d-000000000001&t=tk-notice&price=${AUCTION_PRICE}",
          "burl": "https://notify.example.com/bn?id=0b9c2f4e-1111-4a2b-9c3d-000000000001&t=tk-notice&price=${AUCTION_PRICE}",
          "lurl": "https://notify.example.com/ln?id=0b9c2f4e-1111-4a2b-9c3d-000000000001&t=tk-event&price=${AUCTION_PRICE}&loss=${AUCTION_LOSS}&mtw=${AUCTION_MIN_TO_WIN}",
          "adm": "<div id='ytrgt-container-dcvp236ap6zs'  style='width: 300px; height: 250px;'></div><script>!function(w,d,s,o,f,js,fjs){  w[o]=w[o]||function(){(w[o].q=w[o].q||[]).push(arguments)};  w[o].q=w[o].q||[];  js=d.createElement(s);fjs=d.getElementsByTagName(s)[0];  js.async=1;js.src=f;fjs.parentNode.insertBefore(js,fjs);}(window,document,'script','ytrgt','https://ads.example.com/js/ytrgt.js');ytrgt('ad:create', '#ytrgt-container-dcvp236ap6zs');ytrgt('ad:load', '#ytrgt-container-dcvp236ap6zs', 'https://notify.example.com/bi?creative_id=c1001&id=0b9c2f4e-1111-4a2b-9c3d-000000000001&t=tk-event');ytrgt('sync:pixels', []);</script>",
          "adomain": [
            "advertiser.example"
          ],
          "cid": "501",
          "crid": "1001",
          "cat": [
            "IAB3"
          ],
          "w": 300,
          "h": 250,
          "langb": "de",
          "mtype": 1
        }
      ],
      "seat": "77"
    }
  ],
  "cur": "USD"
}

banner.format has two sizes: w and h in the response show the chosen one; not every bid has lurl.

© Youtarget