---
metadata:
  - name: generator
    content: Diplodoc Platform v5.56.0
alternate:
  - https://yandex.com/dev/rtb/doc/en/ssp/banner-ads.md
  - https://yandex.com/dev/rtb/doc/ru/ssp/banner-ads.md
  - href: https://yandex.com/dev/rtb/doc/en/ssp/banner-ads.md
    type: text/markdown
    title: Markdown version
  - href: https://yandex.com/dev/rtb/doc/en/llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/rtb/doc/en/llms.txt

# Banner ads

Banner ads aren't always static images. They usually serve as containers, such as an iframe on the web or a WebView in mobile apps, running HTML, CSS, and JavaScript to power HTML5 banners, interactive content, and animations. Banner ads support MRAID versions 2.0 and 3.0.

When sending a request to DSP, you need to accurately describe the ad unit. Here are the main fields for the `banner` object:

#|
|| **Parameter** | **Description**||
|| `format` | Dimensions: `w` for width and `h` for height. ||
|| `mimes` | MIME types: Used to indicate file formats the ad platform supports. For example: `["image/jpeg", "image/png", "text/html", "application/javascript"]`. If the publisher doesn't support HTML5, they won't pass text/html. ||
|| `pos` | Screen position: Parameter used to evaluate viewability. Possible values:
- `1`: Viewable portion of the screen without scrolling (ATF, above the fold).
- `3`: Requires scrolling down (BTF, below the fold).
- `7`: Fullscreen. ||
|| `battr` | Blocked attributes: Publishers can block specific creative types, such as: 
- `1`: Creatives with audio. 
- `8`: Creatives that trigger pop-ups. 
- `3/4/5`: Expandable creatives. ||
|| `api` | Supported frameworks: Used to pass supported standards. Possible values: 
- `3`: MRAID 1.0.
- `5`: MRAID 2.0.
- `6`: MRAID 3.0.
- `7`: OMID 1.0 for measuring viewability. ||
|#

For details on `banner` field parameters, see the [IAB documentation](https://github.com/InteractiveAdvertisingBureau/AdCOM/blob/main/AdCOM%20v1.0%20FINAL.md#list--creative-attributes-).

### Sample request

Let's say a publisher (mobile app) requests a banner. The ad unit supports two sizes, sits above the fold, supports HTML5 and MRAID, and blocks ads with audio:

``` json
{
  "id": "req-89b-432a-99ef-12345",
  "imp": [
    {
      "id": "imp-1",
      "bidfloor": 1.50, 
      "bidfloorcur": "USD",
      "banner": {
        "format": [
          { "w": 300, "h": 250 },
          { "w": 320, "h": 250 }
        ],
        "mimes": [
          "image/jpeg",
          "image/png",
          "text/html"
        ],
        "pos": 1,
        "battr": [ 1, 8 ], 
        "api": [ 3, 5, 7 ] 
      }
    }
  ],
  "app": {
    "bundle": "com.developer.coolgame",
    "name": "Cool Puzzle Game",
    "publisher": { "id": "pub-99" }
  },
  "device": {
    "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 16_4 like Mac OS X)...",
    "ip": "192.168.1.1",
    "ifa": "00000000-0000-0000-0000-000000000000",
    "os": "iOS",
    "osv": "16.4"
  }
}
```

### Sample response:

The DSP evaluates the request, matches a suitable advertiser, and submits a bid. The response must include the actual creative (banner code), the price the DSP is willing to pay, and the advertiser domain.

``` json
{
  "id": "req-89b-432a-99ef-12345",
  "seatbid": [
    {
      "seat": "dsp-seat-42",
      "bid": [
        {
          "id": "bid-98765",
          "impid": "imp-1",
          "price": 2.10,
          "w": 300,
          "h": 250,
          "adomain": [ "domain.com" ],
          "crid": "creative-shoes-300x250",
          "adm": "<!-- Start of ad code --><a href='https://click.dsp.com/track?bid=98765' target='_blank'><img src='https://cdn.dsp.com/nike-banner-300x250.jpg' width='300' height='250' border='0'></a><img src='https://imp.dsp.com/track?bid=98765' width='1' height='1' style='display:none;'><!-- End of ad code -->"
        }
      ]
    }
  ],
  "cur": "USD"
}
```

{% cut "Examples of display banners" %}

![](../_images/banner_billboard2_example.png)

![](../_images/banner_billboard_example.png)

![](../_images/banner_horiz_example.png)

![](../_images/banner_square_example.png)

{% endcut %}


