Examples of OpenRTB bid requests and responses

Bid request examples

The following are sample bid requests for various inventory types. Some optional parameters are included in the examples. For additional fields that may be passed, see List of Supported OpenRTB Bid Request Fields for Sellers.

Bid request: Banner

{
   "id":"2545D87B17C8853B",
   "badv":[
      "blocked-advertiser.com",
      "blocked-brand.com"
   ],
   "bcat":[
      "IAB23",
      "IAB25-2"
   ],
   "imp":[
      {
         "id":"1",
         "secure":0,
         "banner":{
            "w":728,
            "h":90,
            "pos":1,
            "topframe":0,
            "battr":[
               1,
               2,
               3
            ],   
	     "metric": [
	     	{
	   	    "type": "viewability",
	        "value": 0.70,
	        "vendor": "INDEXEXCHANGE"
	      	}
	    ],
         }
      }
   ],
   "site":{
      "id":"123",
      "cat":[
         "IAB3-7"
      ],
      "page":"http://www.example.com/page.html",
      "domain":"www.example.com",
      "ref":"http://referrer.com/index.html"
   },
   "device":{
      "ua":"Moxilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36",
      "language":"EN",
      "ip":"66.86.171.205",
      "devicetype":6
   },
   "user":{
      "buyeruid":"VTpXFcAoJ5MAADJVUTAAAAAw&047"
   },
   "at": 1,
   "regs":{
      "coppa":0
   },
   "ext":{
      "ssl":0
   }
}

Bid request: Video

{
   "id":"2545D87B17C8853B",
   "badv":[
      "blocked-advertiser.com",
      "blocked-brand.com"
   ],
   "bcat":[
      "IAB23",
      "IAB25-2"
   ],
   "imp":[
      {
         "id":"1",
         "secure":0,
         "video":{
            "minduration":1,
            "maxduration":30,
            "mimes":[
               "application/javascript",
               "video/mp4"
            ],
            "protocols":[
               2,
               3,
               5,
               6
            ],
            "w":640,
            "h":480,
            "maxbitrate":1500,
            "minbitrate":50,
            "boxingallowed":1,
            "linearity":1,
            "pos":1,
            "startdelay":0,
            "maxextended":2,
            "api":[1],
            "battr":[
               13,
               14
            ],
            "playbackmethod":[6],
            "plcmt":2,
            "delivery":[
               2
            ],
            "companiontype":[
               1,
               2
            ],
            "companionad":[
               {
                  "id":"companion-ad-1",
                  "topframe":1,
                  "battr":[
                     14
                  ],
                  "wmax":350,
                  "w":300,
                  "wmin":250,
                  "hmax":300,
                  "h":250,
                  "hmin":200,
                  "mimes":[
                     "application/javascript"
                  ],
                  "expdir":[
                     1
                  ],
                  "api":[
                     7
                  ]
               },
               {
                  "w":728,
                  "h":90
               }
            ]
         }
      }
   ],
   "site":{
      "id":"123",
      "cat":[
         "IAB3-7"
      ],
      "page": "http://www.example.com/page.html",
      "domain": "www.example.com",
      "ref":"http://referrer.com/index.html"     
   },
   "device":{
      "ua":"Moxilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36",
      "language":"EN",
      "ip":"66.86.171.205",
      "devicetype":6
   },
   "user":{
      "buyeruid":"VTpXFcAoJ5MAADJVUTAAAAAw&047"
   },
   "regs":{
      "coppa":0
   },
   "ext":{
      "ssl":0
   }
}

Bid request: Mobile App

{
   "id":"2545D87B17C8853B",
   "badv":[
      "blocked-advertiser.com",
      "blocked-brand.com"
   ],
   "bcat":[
      "IAB23",
      "IAB25-2"
   ],
   "imp":[
      {
         "id":"1",
         "secure":0,
         "banner":{
            "w":728,
            "h":90,
            "pos":1,
            "topframe":0,
            "battr":[
               1,
               2,
               3
         },	
		 "skadn": {
		   "version": "2.0",
			"versions": ["2.0", "2.1"],
			"sourceapp": "8800047117",
			"skadnetlist": {
			     "max": 306,
				 "excl": [2,8,10,55]
				 "addl": [
				    "cdkw7geqsh.skadnetwork",
				    "qyJfv329m4.skadnetwork"
			    ]
			}
		}
	   		
   ],
   "app":{
      "name":"my news app",
      "privacypolicy":1,
      "keywords":"keyword-a, keyword-b",
      "domain":"genericnews.ca",
      "id":"3447033",
      "bundle":"ca.genericnews.app",
      "ver":"1.2.3",
      "storeurl":"https://itunes.apple.com/id123456789",
      "paid":1
   },
   "device":{
      "ua":"Mozilla/5.0 (iPhone; CPU iPhone OS 6_1 like Mac OS X) AppleWebKit/53 4.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3",
      "language":"EN",
      "ip":"66.86.171.205",
      "devicetype":6,
      "geo":{
         "lat":40.7141667,
         "lon":-74.0063889,
         "country":"USA",
         "region":"NY",
         "regionfips104":"US36",
         "metro":"803",
         "city":"New York",
         "zip":"10001",
         "type":2,
         "utcoffset":-300
      },
      "ifa":"AA000DFE74168477C70D291f574D344790E0BB11",
      "dpidsha1":"7ad708d34a4b91e46a7d6892835cdacfdc7026c3",
      "dpidmd5":"db4f7bcdf48ecf468f858b3b19cb35d0",
      "carrier":"VERIZON",
      "h":2208,
      "w":1242,
      "pxratio":1.0,
      "make":"Apple",
      "model":"iPhone",
      "os":"iOS",
      "osv":"6.1",
      "ppi":326,
      "hwv":"5s",
      "lmt":0
   },
   "user":{
      "buyeruid":"VTpXFcAoJ5MAADJVUTAAAAAw&047"
   },
   "regs":{
      "coppa":0
   },
   "ext":{
      "ssl":0
   }
}

Bid request: SKAdNetwork Mobile App

{
  "imp": [
    {
      "ext": {
        "skadn": {
          "version": "2.0",
          "versions": ["2.0", "2.1"],
          "sourceapp": "880047117",
          "skadnetlist":{
              "max": 306,
              "excl": [2,8,10,55],
              "addl": [ 
                 "cdkw7geqsh.skadnetwork",
                 "qyJfv329m4.skadnetwork"
              ]
          }
        }
      }
    }
  ]
}

Bid request: Native video

{
  "app": {
    "bundle": "com.app.test",
    "cat": [
      "IAB22"
    ],
    "domain": "com.app.test",
    "id": "123456",
    "name": "TestApp",
    "publisher": {
      "id": "12345"
    },
    "storeurl": "https://play.google.com/store/apps/details?id=com.app.test"
  },
  "at": 1,
  "bcat": [
    "IAB7-41",
    "IAB11-4"
  ],
  "device": {
    "devicetype": 4,
    "geo": {
      "city": "New York",
      "country": "US"
    },
    "h": 640,
    "ip": "182.0.234.0",
    "make": "Xiaomi",
    "model": "Redmi Note 5A",
    "os": "Android",
    "osv": "7.1.2",
    "pxratio": 2,
    "ua": "Mozilla/5.0 (Linux; Android 7.1.2; Redmi Note 5A Build/N2G47H; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.106 Mobile Safari/537.36 (Mobile; afma-sdk-a-v204217020.204217020.0)",
    "w": 360
  },
  "id": "000000000000000",
  "imp": [
    {
      "bidfloor": 0.05,
      "id": "1",
      "native": {
        "request": "{\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":25}},{\"data\":{\"len\":15,\"type\":12},\"id\":2},{\"data\":{\"len\":25,\"type\":1},\"id\":3,\"required\":1},{\"id\":4,\"img\":{\"hmin\":100,\"type\":2,\"wmin\":100},\"required\":1},{\"id\":5,\"required\":1,\"video\":{\"mimes\":[\"video/mp4\"],\"minduration\":15,\"maxduration\":30,\"protocols\":[2,3,5,6]}}],\"context\":1,\"contextsubtype\":10,\"eventtrackers\":[{\"event\":1,\"methods\":[1]}],\"ext\":{},\"plcmttype\":1,\"ver\":\"1.2\"}"
      },
      "secure": 1,
      "tagid": "12345"
    }
  ]
}

Bid request: Outstream video

{
   "id":"2545D87B17C8853B",
   "badv":[
      "blocked-advertiser.com",
      "blocked-brand.com"
   ],
   "bcat":[
      "IAB23",
      "IAB25-2"
   ],
   "imp":[
      {
         "id":"1",
         "secure":0,
         "video":{
            "minduration":6,
            "maxduration":30,
	     "mimes":['video/mp4','application/javascript','video/webm'],
            "protocols":[2,3,5,6],
            "w":640,
            "h":480,
            "maxbitrate":1500,
            "minbitrate":50,
            "playbackmethod":[6],
            "skip":1,
            "plcmt":2,
            "startdelay":0,
            "maxextended":2,
            "api":[2,7]
}

Bid request: Multi-format (channel) impression object

"imp": [
      {
        "id": "2545D87B17C8853CD",
        "banner": {
          "format": [
            {
              "w": 300,
              "h": 250
            },
            {
              "w": 320,
              "h": 50
            }
          ],
          "w": 300,
          "h": 250,
          "pos": 3,
          "id": "1"
        },
        "video": {
          "mimes": [
            "video/mp4",
            "application/javascript"
          ],
          "startdelay": 0,
          "protocols": [
            1,
            4,
            2,
            5
          ],
          "w": 640,
          "h": 360,
          "placement": 3,
          "skip": 0,
          "api": [
            1,
            2
          ]
        },
        "native": {
          "request": "{\"ver\":\"1.2\",\"plcmttype\":1,\"plcmtcnt\":1,\"assets\":[{\"id\":5,\"required\":1,\"img\":{\"type\":3}},{\"id\":6,\"img\":{\"type\":1}},{\"id\":1,\"required\":1,\"title\":{\"len\":140}},{\"id\":2,\"data\":{\"type\":2}},{\"id\":3,\"data\":{\"type\":1}},{\"id\":4,\"data\":{\"type\":12}}],\"eventtrackers\":[{\"event\":1,\"methods\":[1,2]},{\"event\":2,\"methods\":[1,2]},{\"event\":3,\"methods\":[1,2]},{\"event\":4,\"methods\":[1,2]}]}",
          "ver": "1.2"
        },
        "bidfloor": 0.312797,
        "bidfloorcur": "USD"
      }
    ]

Bid request: Structured pod

{
    "id": "cj62dimonm9chvfnkopp0",
    "imp": [
        {
            "id": "520921_1",
            "video": {
                "mimes": [
                    "video/mp4",
                    "video/H264"
                ],
                "minduration": 1,
                "maxduration": 31,
                "protocols": [
                    2,
                    3,
                    5,
                    6
                ],
                "w": 1280,
                "h": 720,
                "startdelay": 0,
                "skip": 0,
                "placement": 1,
                "linearity": 1,
                "sequence": 1,
                "minbitrate": 240,
                "maxbitrate": 30000,
                "playbackmethod": [
                    1
                ],
                "delivery": [
                    1,
                    2
                ],
                "podid": "1",
                "podseq": 0
		   
               ...
              },
		"tagid": "520921_1",
            "bidfloor": 12.7,
            "secure": 1
	     ...
        },  
        {
            "id": "520921_2",
            "video": {
                "mimes": [
                    "video/mp4",
                    "video/H264"
                ],
                "minduration": 1,
                "maxduration": 31,
                "protocols": [
                    2,
                    3,
                    5,
                    6
                ],
                "w": 1280,
                "h": 720,
                "startdelay": 0,
                "skip": 0,
                "placement": 1,
                "linearity": 1,
                "sequence": 2,
                "minbitrate": 240,
                "maxbitrate": 30000,
                "playbackmethod": [
                    1
                ],
                "delivery": [
                    1,
                    2
                ],
                "podid": "1",
                "podseq": 0
		    ...
              },
		"tagid": "520921_2",
            "bidfloor": 12.7,
            "secure": 1
 		...
        },   
    ],
    ...

    "app": {
        "name": "PublisherName",
        "bundle": "123456",
        "domain": "PublisherName.com",
        "storeurl":https://appstore.streamingplatform.com/details/123456",
        "publisher": {
            "id": "987654"
        },
        "content": {
            "genre": "Sports",
            "prodq": 1,
            "context": 1,
            "contentrating": "TV-PG",
            "livestream": 1,
            "len": 1800,
            "language": "en"
            }
        }
    },
    "device": {
...
        }
    },
    "user": {
...
        }
    },
    "at": 1,
    "tmax": 1250,
    "badv": [
      "blocked-advertiser.com",
      "blocked-brand.com"
    ],
...

Bid request: Dynamic pod

{
    "id": "cj62dimonm9chvfnkqg0",
    "imp": [
        {
            "id": "25874_1",
            "video": {
                "mimes": [
                    "video/mp4",
                    "video/H264"
                ],
                "minduration": 1,
                "maxduration": 31,
                "protocols": [
                    2,
                    3,
                    5,
                    6
                ],
                "w": 1280,
                "h": 720,
                "startdelay": 0,
                "skip": 0,
                "placement": 1,
                "linearity": 1,
                "sequence": 1,
                "minbitrate": 240,
                "maxbitrate": 30000,
                "playbackmethod": [
                    1
                ],
                "delivery": [
                    1,
                    2
                ],
                "maxseq": 8,
                "poddur": 150,
                "podid": "1",
                "podseq": 0,
                "rqddurs": null
            },
            "bidfloor": 18.7,
            "secure": 1
        }
    ],
    "app": {
        "name": "PublisherName",
        "bundle": "123456",
        "domain": "PublisherName.com",
        "storeurl": "https://appstore.streamingplatform.com/details/123456",
        "publisher": {
            "id": "987654"
        },
        "content": {
            "genre": "Sports",
            "prodq": 1,
            "context": 1,
            "contentrating": "TV-PG",
            "livestream": 1,
            "len": 1800,
            "language": "en"
            }
        }
    },
    "device": {
...
        }
    },
    "user": {
...
        }
    },
    "at": 1,
    "tmax": 1250,
    "badv": [
      "blocked-advertiser.com",
      "blocked-brand.com"
    ],
    "source": {
        "tid": "cj62dimonm9chvfnkqgg"
    },
    "regs": {
        "ext": {
            "gdpr": 0,
            "us_privacy": "1YNY"
        }
    }
}

Bid response examples

The following are a few examples of a bid response An OpenRTB response that is sent by the DSP in response to the SSP's or ad exchange's bid request. It is an event directed back to the seller expressing a valuation for the request and conditions of sale. for various inventory types. To see the fields that may be sent, see List of Supported OpenRTB Bid Response Fields for Sellers.

Bid response: Deal

Note: The deal A private auction that allows publishers to offer specific inventory directly to selected buyers identified by a deal ID. Terms are negotiated and are agreed upon before the auction occurs. response in the following example shows the deal in two places:

{
   "seatbid":[
      {
         "bid":[
            {
               "id":"1",
               "crid":"12349876",
               "adomain":[
                  "http://advertiser.example.com"
               ],
               "adid":"12349876",
               "impid":"3225096236630306i1",
               "dealid":"77042015",
               "price":7.2,
               "ext":{
                  "deal":"20000",
                  "dealid":"77042015",
                  "dealname":"dealName",
                  "dspid":190
               },
               "adm":"<script type=\"text/javascript\" src=\"http://astest.casalemedia.com/pcreative?au=2&c=BC71B4&pcid=7A5E0001BE00 &pr=5A&r=7A5E0001&s=25765&t=553A6EB2&u=X2FjMTA2NTYzLU1BQ19fX19fX19fX19f&m=ccb d2ce214756ec8159255e3108e1b81&wp=320&cp=${AUCTION_PRICE}&aid=AE9A6E4017BCD001 &tid=30E4&dm=64&d=4E20&n=xivdb.com&epr=3225096236630306~1\">>"
            }
         ],
         "seat":"456"
      }
   ],
   "cur":"USD",
   "id":"3225096236630306~1",
   "ext":{
      "ssl":0
   }
}

Bid response: Mobile App

{
   "seatbid":[
      {
         "bid":[
            {
               "id":"1",
               "bundle":"foo.com.mygame",
               "crid":"12349876",
               "adomain":[
                  "http://advertiser.example.com"
               ],
               "adid":"12349876",
               "impid":"3225096236630306i1",
               "dealid":"77042015",
               "price":7.2,
               "ext":{
                  "dspid":190
               },
               "adm":"<script type=\"text/javascript\" src=\"http://astest.casalemedia.com/pcreative?au=2&c=BC71B4&pcid=7A5E0001BE00 &pr=5A&r=7A5E0001&s=25765&t=553A6EB2&u=X2FjMTA2NTYzLU1BQ19fX19fX19fX19f&m=ccb d2ce214756ec8159255e3108e1b81&wp=320&cp=${AUCTION_PRICE}&aid=AE9A6E4017BCD001 &tid=30E4&dm=64&d=4E20&n=xivdb.com&epr=3225096236630306~1\">>"
            }
         ],
         "seat":"456"
      }
   ],
   "cur":"USD",
   "id":"3225096236630306~1",
   "ext":{
      "ssl":0
   }
}

Bid response: SKAdNetwork Mobile App

{
 "id": "A92AF4241C4A8FF6",
  "seatbid": [
    {
      "bid": [
        {
		  "id": "93587a2a-d0b3-11e4-9a5c-d5086b3235de",
		  "bundle": "foo.com.mygame",
		  "impid": "1",
		  "price": 300.0,
		  "attr": [3],
		  "adomain": ["www.genericcar.ca"],
		  "adm":"<script type=\"text/javascript\" src=\"http://p3.location.com/ed/3/?5045740&cid=12622&tid=5045740&oid=A92AF4241C4A8FF6&vid=vE4OjdHt54QAAEhFcacAAACq&p=${AUCTION_PRICE}&bd=k1h6KtCzEeSaXNUIazI13gY9gN1dCbmXnCjTIg&rnd=-546237489339<,7372747\"</script>",		
          "ext": {	
            "skadn": {
              "version": "2.0",
              "network": "cdkw7geqsh.skadnetwork",
              "campaign": "45",
              "itunesitem": "123456789",
              "nonce": "473b1a16-b4ef-43ad-9591-fcf3aefa82a7",
              "sourceapp": "880047117",
              "timestamp": "1594406341",
              "signature": "MEQCIEQlmZRNfYzKBSE8QnhLTIHZZZWCFgZpRqRxHss65KoFAiAJgJKjdrWdkLUOCCjuEx2RmFS7daRzSVZRVZ8RyMyUXg=="
            }
          }
        }
      ],
	  "seat": "339"			
    }
  ]
}

Bid response: Native video

{
  "cur": "USD",
  "id": "s9x0vc09sdj9e3",
  "seatbid": [
    {
      "bid": [
        {
          "adid": "82347892173",
          "adm": "{\"native\":{\"assets\":[{\"id\":1,\"title\":{\"text\":\"Native Example Ad\"}},{\"data\":{\"value\":\"Are we having fun yet???\"},\"id\":2},{\"data\":{\"value\":\"Tap here\"},\"id\":12},{\"id\":5,\"video\":{\"vasttag\":\"<VAST version=\\\"4.0\\\"><Ad id=\\\"preroll-1\\\"><InLine><AdSystem>4.0<\/AdSystem><AdTitle>5748406<\/AdTitle><Impression id=\\\"blah\\\"><![CDATA[ https:\/\/blah.casalemedia.com\/ifnotify?blah=10 ]]><\/Impression><Creatives><Creative><Linear><Duration>00:00:30<\/Duration><TrackingEvents\/><VideoClicks><ClickThrough id=\\\"scanscout\\\"><![CDATA[ https:\/\/kb.indexexchange.com\/IX_Library\/About_IX_Library.htm ]]><\/ClickThrough><\/VideoClicks><MediaFiles><MediaFile height=\\\"396\\\" width=\\\"600\\\" bitrate=\\\"496\\\" type=\\\"video\/mp4\\\" delivery=\\\"progressive\\\"><![CDATA[ https:\/\/sandbox.ht.indexexchange.com\/ht\/ixLibraryVideoMedia.mp4 ]]><\/MediaFile><\/MediaFiles><\/Linear><\/Creative><Creative\/><\/Creatives><\/InLine><\/Ad><\/VAST>\"}},{\"id\":4,\"img\":{\"h\":100,\"url\":\"https:\/\/test.com?asset=iconImage\",\"w\":100}}],\"imptrackers\":[\"https:\/\/test.com?link=impressionTracker\"],\"link\":{\"url\":\"https:\/\/test.com?link=clickThroughUrl\"},\"ver\":\"1.1\"}}",
          "adomain": [
            "testSite.com"
          ],
          "cid": "123456",
          "crid": "123456",
          "h": 1,
          "id": "1",
          "impid": "1",
          "price": 10.00,
          "w": 1
        }
      ],
      "seat": "1"
    }
  ]
}

Bid response: Structured pod

{
    "id": "cj5cnhamuq7o1c4upkl0",
    "seatbid": [
        {
            "bid": [
                {
                    "id": "1",
                    "impid": "520921_1",
                    "price": 19.71,
                    "adid": "1234567890",
                    "adm": "<VAST version=\"4.0\"><Ad id=\"1\"><Wrapper><AdSystem>..."
                    "adomain": [
                        "testDomain.com"
                    ],
                    "cid": "222222",
                    "crid": "111111",
                    "dur": 30,
                    "ext": {
                        "dspid": 1234
                    }
                }              
            ],
            "seat": "123123"
        },
        {
            "bid": [
                {
                    "id": "2",
                    "impid": "520921_3",
                    "price": 19.5,
                    "adid": "987654320",
                    "adm": "<VAST version=\"4.0\"><Ad id=\"1\"><Wrapper><AdSystem>..."
                    "adomain": [
                        "testDomain2.com"
                    ],
                    "cid": "111111",
                    "crid": "222222",
                    "dealid": "Deal123",
                    "dur": 30,
                    "ext": {
                        "dspid": 1234
                    }
                },
            ],
            "seat": "32321"
        }
    ],
    "cur": "USD",
}

Bid response: Dynamic pod

{
    "id": "cj5cnhamuq7o1c4upkl0",
    "seatbid": [
        {
            "bid": [
                {
                    "id": "1",
                    "impid": "25874_1",
                    "price": 13,
                    "adid": "1234567890",
                    "adm": "<VAST version=\"4.0\"><Ad id=\"1\"><Wrapper><AdSystem>..."
                    "adomain": [
                        "advertiserA.com"
                    ],
                    "cid": "222222",
                    "crid": "111111",
                    "dur": 30,
                    "ext": {
                        "dspid": 1234
                    	}
                }],
            "seat": "123123"
        },
        {
            "bid": [
                {
                    "id": "2",
                    "impid": "25874_1",
                    "price": 10,
                    "adid": "987654320",
                    "adm": "<VAST version=\"4.0\"><Ad id=\"1\"><Wrapper><AdSystem>..."
                    "adomain": [
                        "advertiserB.com"
                    ],
                    "cid": "333333",
                    "crid": "4444444",
                    "dur": 15,
                    "ext": {
                        "dspid": 1234
                    	}
                }],
            "seat": "123123"
        },
                {
            "bid": [
                {
                    "id": "3",
                    "impid": "25874_1",
                    "price": 12.85,
                    "adid": "987654320",
                    "adm": "<VAST version=\"4.0\"><Ad id=\"1\"><Wrapper><AdSystem>..."
                    "adomain": [
                        "advertiserC.com"
                    ],
                    "cid": "5555555",
                    "crid": "6666666",
                    "dealid": "Deal123",
                    "dur": 30,
                    "ext": {
                        "dspid": 4321
                    	}
                }],
            "seat": "321321"
        }
    ],
    "cur": "USD",
}