> For the complete documentation index, see [llms.txt](https://docs.exads.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.exads.com/rtb/publishers/open-rtb/open-rtb-2p5-pub-request.md).

# Prebid / OpenRTB 2.5 Bid Request

## Suggested Bid Request Headers

* OpenRTB Version HTTP Header: x-openrtb-version: 2.5
* Keep-Alive HTTP Header: Connection: Keep-Alive
* Content JSON: Content-Type: application/json

The following objects should be sent encoded as JSON in the request body:

## Bid Request <a href="#bid-request" id="bid-request"></a>

| Attribute | Required? | Description                                                                                            |
| --------- | --------- | ------------------------------------------------------------------------------------------------------ |
| at        | Yes       | Auction type, first price = 1 (int)                                                                    |
| id        | Yes       | Unique bid request ID (string)                                                                         |
| imp       | Yes       | Array of Imp objects representing the impressions offered(object).                                     |
| site      | Yes       | Details via a Site object about the publisher’s website(object).                                       |
| device    | Yes       | Details via a Device object about the user’s device to which the impression will be delivered(object). |
| user      | No        | Details via a User object about the human user of the device; the advertising audience(object).        |
| ext       | No        | Placeholder for extensions to OpenRTB.                                                                 |

### imp <a href="#imp" id="imp"></a>

| Attribute | Required?            | Description                                                                                                                                                                                                                        |
| --------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| id        | Yes                  | Unique impression ID within this bid request (string)                                                                                                                                                                              |
| bidfloor  | No                   | Minimum bid for this impression (CPM) / click (CPC) and account currency, optional (float).                                                                                                                                        |
| banner    | Only for banner imps | A banner object ; required if this impression is offered as a banner ad opportunity(object).                                                                                                                                       |
| secure    | No; Recommended 1    | Flag to indicate if the impression requires secure HTTPS URL creative assets and markup, where 0 = non-secure, 1 = secure. If omitted, the secure state is unknown, but non-secure HTTP support can be assumed, optional (integer) |

### imp.banner <a href="#impbanner" id="impbanner"></a>

| Attribute | Required? | Description                    |
| --------- | --------- | ------------------------------ |
| w         | Yes       | Width of the banner (integer)  |
| h         | Yes       | Height of the banner (integer) |

## site <a href="#site" id="site"></a>

| Attribute | Required?   | Description                                                                                                                     |
| --------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------- |
| id        | Recommended | Unique Site ID (string)                                                                                                         |
| domain    | Recommended | Domain name of the site (string)                                                                                                |
| cat       | No          | IAB category ID (string array)                                                                                                  |
| page      | Recommended | Full URL of the page where the ad will be shown (string)                                                                        |
| pagecat   | No          | IAB category ID (string array)                                                                                                  |
| keywords  | No          | Keywords can be used to ensure ad zones get the right type of advertising. Keywords should be a string of comma-separated words |

## app <a href="#app" id="app"></a>

| Attribute | Required? | Description                                                                                                                              |
| --------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| id        | Required  | Unique App ID (string)                                                                                                                   |
| cat       | No        | IAB category ID (string array)                                                                                                           |
| pagecat   | No        | IAB category ID (string array)                                                                                                           |
| keywords  | No        | Keywords can be used to ensure ad zones get the right type of advertising. Keywords should be a string of comma-separated words (string) |
| publisher | No        | Details about the Publisher (object)                                                                                                     |

***

**Note**: Only one of the objects {site, app} should be present in each request.

***

### app.publisher <a href="#apppublisher" id="apppublisher"></a>

| Attribute | Required?   | Description                                                            |
| --------- | ----------- | ---------------------------------------------------------------------- |
| domain    | Recommended | Highest level domain of the publisher (e.g., "publisher.com") (string) |

## device <a href="#device" id="device"></a>

| Attribute | Required?     | Description                                                                               |
| --------- | ------------- | ----------------------------------------------------------------------------------------- |
| ua        | Yes           | Browser user agent (string)                                                               |
| geo       | No            | Location of the device assumed to be the user’s current location defined by a Geo object. |
| ip        | Conditional\* | IPv4 address of the user (string)                                                         |
| ipv6      | Conditional\* | IPv6 address of the user (string)                                                         |
| language  | Recommended   | Browser language using ISO-639-1-alpha-2 (string)                                         |
| os        | No            | Operating System name, without version (string). E.g. "iOS", "Android", "Windows"         |
| osv       | No            | Operating System version (string). E.g. "18", "14", "11"                                  |
| js        | No            | Support for JavaScript, where 0 = no, 1 = yes (integer)                                   |
| ext       | No            | Placeholder for exchange-specific extensions to OpenRTB                                   |

\*Condition: Exactly one of ip or ipv6 must be included in the request (not both).

### device.geo <a href="#devicegeo" id="devicegeo"></a>

| Attribute | Required? | Description  |
| --------- | --------- | ------------ |
| country   | No        | Country ISO3 |

### device.ext <a href="#deviceext" id="deviceext"></a>

| Attribute         | Required? | Description                                                         |
| ----------------- | --------- | ------------------------------------------------------------------- |
| remote\_addr      | No        | Main IP address of the user (string)                                |
| x\_forwarded\_for | No        | X-FORWARDED-FOR IP address of the user or empty if not set (string) |

## user <a href="#user" id="user"></a>

| Attribute | Required? | Description             |
| --------- | --------- | ----------------------- |
| id        | No        | Unique user ID (string) |

### user.ext <a href="#userext" id="userext"></a>

| Attribute | Description                                                                                                            |
| --------- | ---------------------------------------------------------------------------------------------------------------------- |
| consent   | **user.ext.consent**: This is the consent string required by the IAB standards. Negative consent only for now (string) |
| prebid    | Prebid Server specific data (object)                                                                                   |

### user.ext.prebid <a href="#userextprebid" id="userextprebid"></a>

| Attribute | Description                |
| --------- | -------------------------- |
| buyeruids | List of buyer uids (array) |

### regs.ext <a href="#regsext" id="regsext"></a>

| Attribute | Description                                                                                                                                                         |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| gdpr      | **regs.ext.gdpr**: This is 0 if the caller believes that the user is not under GDPR, and 1 if the user is under GDPR. If neither, this parameter will be undefined. |

## ext <a href="#ext" id="ext"></a>

| Attribute | Required? | Description                                                                                                    |
| --------- | --------- | -------------------------------------------------------------------------------------------------------------- |
| sub       | No        | The Sub ID. This should be a number between six and ten digits: Do not use zeroes at the beginning of Sub IDs. |

## Examples <a href="#examples" id="examples"></a>

### Banner <a href="#banner" id="banner"></a>

```json
{
    "id": "d4b5c697-41f3-4c1c-a3d5-5fd01b5ef2aa",
    "at":1,
    "imp": [
        {
            "id": "974090632",
            "banner": {
                "w": 300,
                "h": 250
            }
        }
    ],
    "site": {
        "id": "12345",
        "domain": "sitedomain.com",
        "cat": ["IAB25-3"],
        "page": "https://sitedomain.com/page",
        "keywords": "lifestyle, humour",
        "pagecat": ["IAB25-3"]
    },
    "device": {
        "ua": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.63 Safari/537.36",
        "ip": "131.34.123.159",
        "geo": {
            "country": "IRL"
        },
        "language": "en",
        "os": "Linux & UNIX",
        "osv": "",
        "js": 0,
        "ext": {
            "remote_addr": "131.34.123.159",
            "x_forwarded_for": "",
            "accept_language": "en-GB;q=0.8,pt-PT;q=0.6,en;q=0.4,en-US;q=0.2,de;q=0.2,es;q=0.2,fr;q=0.2"
        }
    },
    "user": {
        "id": "57592f333f8983.043587162282415065",
        "ext": {
            "consent": "CO9A8QHPAbnHWBcADBENBJCoAAAAAAAAAAqIHKJU9VybLh0Dq4A170B0OAEYN_r_v40zigeds-8Myd-X3DsX50M7vFy6pr4AuR4km3CBIQFkHOmcTUmw6IkVrRPsak2Mr7NKJ7PEinsbe2dYEHtfn9VTuZKZr97s___zf_-___3_75f__-3_3_vp9UAAAABA5QAkgkDYAKAQRAAJIwKhQAhAuJDoBAAUUIwtE1hASuCmYVAR-ggYAIDUBGAECDEEGIIIAAAAAkgiAkAPBAAgCIBAACAFSAhAARoAgsAJAwCAAUA0LACKAIQJCDI4KjlICAiRaKCeSMASi72MMIQSigAAAAAAAA",
            "prebid": {
                "buyeruids": {
                    "platform1": "C9446DA7-BB76-44B9-B260-77E16530AA03",
                    "platform2": "6372709574547581900",
                    "platform3": "456621142600017315",
                    "platform4": "3952063610783032691",
                    "platform5": "KX3KMRTI-11-ZMP",
                    "platform6": "402e4b19ff476fb23de2c97ebe62a47b",
                    "platform7": "bu7zD7LkVT2huSwTSvou"
                }
            }
        }
    },
    "ext": {
        "sub": 1221
    }
}
```

**Banner Bid Request Structure**

* [imp](#imp)
  * [imp.banner](#impbanner)
* [site](#site)
* [device](#device)
  * [device.geo](#devicegeo)
  * [device.ext](#deviceext)
* [user](#user)


---

# 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.exads.com/rtb/publishers/open-rtb/open-rtb-2p5-pub-request.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.
