You are here: Demand Partners > Real-time bidding APIs > OpenRTB API > Display examples

Display examples

Last updated on May 17, 2017

The following example bid requestWhen OpenX Ad Exchange receives an ad request, its communication to selected real-time bidders, which contains details about the impression and solicits bids for it. for a web-based display includes required and optional fields.

BidRequest example


{
    "id" : "eb85349d-03c3-44f4-a77b-824f7221d116",
    "imp": [
        {
        "id": "eb85349d-03c3-44f4-a77b-824f7221d116",
        "banner": {
            "h": 250,
            "w": 300,
            "battr": [2,3],
            "btype": [1,3]
            }
        }
    ],
    "site": {
        "id": "102855",
        "name": "Example Site Name",
        "domain": "http://www.example.com",
        "cat" : [ "IAB15", "IAB15-10" ],
        "page": "http://easy.example.com/easy?cu=13824;cre=mu;target=_blank",
        "ref" : "http://refer+url",
        "publisher": {
            "id": "qqwer1234xgfd",
            "name": "site_name",
            "domain": "my.site.com"
        }
    },
    "device": {
        "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13  (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2",
        "ip": "192.168.5.5",
        "geo": {
            "lat": 37.789,
            "lon": -122.394,
            "country": "USA",
            "city": "San Francisco",
            "region": "CA",
            "zip" : "94105",
            "type": 2
        }
    },
    "user": {
    	"buyeruid" : "89776897686798fwe87rtryt8976fsd7869678",
        "id": "55816b39711f9b5acf3b90e313ed29e51665623f",
        "gender": "M",
        "yob": 1975,
        "customdata": "Data-asdfdwerewr",
        "data": [{
            "id": "pub-demographics",
            "name": "data_name",
            "segment": [{
                "id" : "345qw245wfrtgwertrt56765wert",
                "name" : "segment_name",
                "value": "segment_value"
            }]
        }]
    }
}

The following sample bid responseAfter evaluating a bid request, a real-time bidder’s communication to OpenX Ad Exchange, indicating if they’re interested in the impression, and if so, how much they’re willing to pay for it. for web-based display contains a single SeatBid object.

BidResponse example


{
    "id": "eb85349d-03c3-44f4-a77b-824f7221d116",
    "seatbid": [{
        "bid": [{
            "id": "bid1",
            "impid": "eb85349d-03c3-44f4-a77b-824f7221d116",
            "price": 0.1,
            "adm": "<div>Ad Creative</div>",
            "adomain": [
                "http://www.example.com/clickthrough"
            ],
            "crid": "crid_value",
            "nurl": "http://example.com/winnotice?impid={AUCTION_IMP_ID}&auction=${AUCTION_ID}&price=${AUCTION_PRICE}&bidid=${AUCTON_BID_ID}"&bidcur=${AUCTION_CURRENCY}",
            "ext": {
                "brand_id": "brand_val",
                "buyer_id": "buyer_val",
            }
        }]
    }]
}
{
    "id": "eb85349d-03c3-44f4-a77b-824f7221d116",
    "seatbid": [{
        "bid": [{
            "id": "32a69c6ba388f110487f9d1e63f77b22d86e916b",
            "impid": "eb85349d-03c3-44f4-a77b-824f7221d116",
            "price": 0.60000,
            "adid": "529833ce55314b19e8796116",
            "nurl": "http://example.com/win/529833ce55314b19e8796116?won=${AUCTION_PRICE}&impid={AUCTION_IMP_ID}&auction=${AUCTION_ID}&bidid=${AUCTON_BID_ID}",
            "adm": "<iframe src=\"http://example.com/render/529833ce55314b19e8796116\" width=\"300\" height=\"250\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" topmargin=\"0\" leftmargin=\"0\"></iframe>",
            "adomain": [
                "openx.ads.com"
            ],
            "cid": "529833ce55314b19e8796116",
            "crid": "529833ce55314b19e8796116_1385706446"
        }],
        "seat": "772"
    }],
    "cur": "USD"
}

Field definitions:

Important: Your bidding application must return a valid response even if you do not want to place a bid. For example, you can return a 204 No Content or a 200 OK response with an empty body, which will be treated as a bid of zero.

Feedback form