> 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/advertisers/open-rtb/open-rtb-advertisers-request-2p5.md).

# Prebid / OpenRTB 2.5 Bid Request

## Prebid Server / OpenRTB 2.5

This implementation supports both the regular OpenRTB 2.5 implementation and the Prebid Server implementation. In order to use the Prebid Server implementation, the campaign needs to be created with the Prebid Server template.

The Prebid Server implementation has an `ext.prebid.storedrequest` field where the id of the StoredRequest is provided. An example can be found in the specs below.

You can find more examples [here](https://docs.prebid.org/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html).

## Additional Privacy Fields <a href="#additional-privacy-fields" id="additional-privacy-fields"></a>

Additional privacy fields, `regs.ext.gdpr` and `user.ext.consent`, are included and comply with the [IAB privacy specifications](https://iabtechlab.com/wp-content/uploads/2018/02/OpenRTB_Advisory_GDPR_2018-02.pdf) (in the Advised Extensions section). There is more information about this [here](https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/v1.1%20Implementation%20Guidelines.md).

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

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

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

When requesting bids for a specific context, the platform performs an HTTP request with a timeout of **300ms** and sends the following object encoded as JSON in the request body. **HTTP** is recommended due to extra latency when using HTTPS.

| Attribute | Description                                                                                            |
| --------- | ------------------------------------------------------------------------------------------------------ |
| id        | Unique bid request ID (string)                                                                         |
| site      | Details via a Site object about the publisher’s website(object).                                       |
| device    | Details via a Device object about the user’s device to which the impression will be delivered(object). |
| user      | Details via a User object about the human user of the device; the advertising audience(object).        |
| ext       | Placeholder for extensions to OpenRTB.                                                                 |

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

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

### site.ext <a href="#siteext" id="siteext"></a>

| Attribute   | Description                        |
| ----------- | ---------------------------------- |
| exchangecat | Custom EXADS category ID (integer) |
| idzone      | Custom EXADS Ad Zone ID (integer)  |
| keyword     | Matching keyword if any (string)   |

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

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

\*Condition: Exactly one of ip or ipv6 will be present in the bid request.

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

| Attribute | Description  |
| --------- | ------------ |
| country   | Country ISO3 |

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

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

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

| Attribute | Description             |
| --------- | ----------------------- |
| id        | 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) |

**ext.prebid.storedrequest**

| Attribute | Description                                                                         |
| --------- | ----------------------------------------------------------------------------------- |
| id        | Used for stored request matching on partners servers format: sr\_odadsrv\_ (string) |

### 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. |

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

### Banner (Stored Request) <a href="#banner-stored-request" id="banner-stored-request"></a>

```json
{
    "id": "c1218af9-65fc-4d55-9ad6-8795c2daad25",
    "site": {
        "domain": "bbakire.com",
        "page": "https:\/\/bbakire.com",
        "id": "776186",
        "cat": ["IAB25-3"],
        "ext": {
            "exchangecat": 508,
            "idzone": 4068539
        }
    },
    "device": {
        "ua": "Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/88.0.4324.96 Safari\/537.36",
        "ip": "10.42.0.1",
        "ipv6": "10.42.0.1",
        "geo": {
            "country": "XXX"
        },
        "language": "en",
        "os": "MacOS",
        "osv": "",
        "js": 1,
        "ext": {
            "remote_addr": "10.42.0.1",
            "x_forwarded_for": ""
        }
    },
    "regs": {
        "ext": {
            "gdpr": 0
        }
    },
    "user": {
        "id": "5fc94d61a66a37.821612521136907401",
        "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"
                }
            }
        }
    },
    "tmax": 3000,
    "ext": {
        "prebid": {
            "storedrequest": {
                "id": "sr_odadsrv_zone_<idzone>"
            }
        }
    }
}
```

**Banner Bid Request Structure**

* [site](#site)
  * [site.ext](#siteext)
* [device](#device)
  * [device.geo](#devicegeo)
  * [device.ext](#deviceext)
* [regs.ext](#regsext)
* [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/advertisers/open-rtb/open-rtb-advertisers-request-2p5.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.
