Native Requests
{
"id": "b214bb89bbdf45119dc8aa85fdaf50c1",
"cur": [
"USD"
],
"test": 0,
"ext": {
"pt": "net"
},
"imp": [
{
"id": "1",
"tagid": "165664",
"native": {
"ver": "1.1",
"request": "{\"ver\":\"1.1\",\"assets\":[{\"id\":0,\"required\":1,\"title\":{\"len\":50}},{\"id\":1,\"required\":1,\"img\":{\"wmin\":50,\"hmin\":50,\"type\":1}},{\"id\":2,\"required\":1,\"img\":{\"wmin\":150,\"hmin\":150,\"type\":3}},{\"id\":3,\"required\":1,\"data\":{\"len\":140,\"type\":1}},{\"id\":4,\"required\":1,\"data\":{\"len\":140,\"type\":2}},{\"id\":5,\"required\":0,\"data\":{\"len\":140,\"type\":12}},{\"id\":6,\"required\":0,\"video\":{\"mimes\":[\"video/mp4\"],\"minduration\":1,\"maxduration\":15,\"protocols\":[2,3]}}]}"
}
}
],
"device": {
"ip": "203.8.183.255",
"ua": "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko",
"language": "en",
"connectiontype": 3
},
"site": {
"page": "https://example.com",
"mobile": 1
},
"regs": {
"ext": {
"gdpr": 0
}
},
"user": {
"buyeruid": "3107014338069156182"
},
"source": {
"fd": 0,
"tid": "123e4567-e89b-12d3-a456-426614174000"
}
}
OpenRTB bid requests for native ads must specify the width and height for all images, such as the main image and the icon.
You can define the exact image measurements or, to attract more demand, you can provide ratios for image sizes, based on minimum width or height.
Important
Native requests without image dimensions won't generate impressions.
Example of an exact image size definition:
image: {
required: true,
sizes: [ 350, 300 ]
}
Example of a minimum width definition with a height and width ratio:
image: {
required: true,
aspect_ratios: [ {min_width: 300, ratio_width: 1, ratio_height: 0.5}]
}
Web Banner Requests
{
"id": "1d8652fb-26e6-5a5a-8bf3-f10e6e1df9fd",
"cur": [
"USD" ],
"test": 0,
"ext": {
"pt": "net" },
"imp": [
{
"id": "1",
"instl": 0,
"tagid": "165664",
"banner": {
"w": 300,
"h": 250,
"format": [
{
"w": 300,
"h": 250 },
{
"w": 728,
"h": 90 }
],
"pos": 1 }
}
],
"device": {
"ip": "203.8.183.255",
"lmt": 1,
"ua": "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko",
"language": "en",
"connectiontype": 3 },
"site": {
"page": "https://example.com",
"mobile": 0 },
"regs": {
"ext": {
"gdpr": 1 }
},
"user": {
"buyeruid": "3107014338069156182",
"ext": {
"eids": [
{
"source": "adserver.org",
"uids": [
{
"id": "a4c58216-1ade-51ca-9c18-9eae3b815acf",
"atype": 1 }
]
}
],
"consent": "COuCt0COuCt0CDNAFAENATDAANIAAAAAAAhoAZQAYAWgBkAAAAA" }
},
"source": {
"fd": 0,
"tid": "123e4567-e89b-12d3-a456-426614174000" }
}
In-App Banner Requests
{
"id": "1d8652fb-26e6-5a5a-8bf3-f10e6e1df9fd",
"cur": [
"USD"
],
"test": 0,
"ext": {
"pt": "net"
},
"imp": [
{
"id": "1",
"instl": 1,
"tagid": "165664",
"banner": {
"w": 320,
"h": 50
}
}
],
"device": {
"ip": "203.8.183.255",
"lmt": 0,
"ua": "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko",
"language": "en",
"connectiontype": 0,
"ifa": "8482988c-5ade-438b-98b2-5d07455d2264"
},
"app": {
"name": "Killer Sudoku by Sudoku.com - Free Number Puzzle",
"bundle": "com.easybrain.killer.sudoku.free",
"storeurl": "https://play.google.com/store/apps/details?id=com.easybrain.killer.sudoku.free&hl=en&gl=US%22",
"ver": "1.2.0",
"domain": ""
},
"regs": {
"ext": {
"gdpr": 0
}
},
"user": {
"buyeruid": "3107014338069156182"
},
"source": {
"fd": 1,
"tid": "1C8023C8DBDBE531"
}
}
Video Requests
{
"id": "b214bb89bbdf45119dc8aa85fdaf50c1",
"cur": [
"USD"
],
"test": 0,
"ext": {
"pt": "net"
},
"imp": [
{
"id": "1",
"tagid": "165664",
"video": {
"w": 640,
"h": 360,
"pos": 0
}
}
],
"device": {
"ip": "203.8.183.255",
"ua": "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko",
"language": "en",
"connectiontype": 3
},
"site": {
"page": "https://example.com",
"mobile": 1
},
"regs": {
"ext": {
"gdpr": 0
}
},
"user": {
"buyeruid": "3107014338069156182"
},
"source": {
"fd": 0,
"tid": "123e4567-e89b-12d3-a456-426614174000"
}
}
Bid request sample with DSA
{
"id": "80ce30c53c16e6ede735f123ef6e32361bfc7b22",
"at": 1,
"cur": [
"USD"
],
"regs": {
"ext": {
"dsa": {
"required": 3,
"pubrender": 0,
"datatopub": 2,
"transparency": [{
"domain": "platform1domain.com",
"params": [1]},
{"domain": "SSP2domain.com",
"params": [1,2]
}]
}
}
},
"imp": [{
"id": "1"
}],
"site": {
"id": "102855"
},
"user": {
"id": "55816b39711f9b5acf3b90e313ed29e51665623f"
}
}
Add label
Bidder Setups to Pass Keywords, Key-values, and Price Floors
Bidder Config Request With Keywords and Key-Values
pbjs.setBidderConfig({
bidders: ["adf"],
config: {
ortb2: {
site: {
keywords: "header", // keywords passed through oRTB request parameter site.keywords.
ext: {
data: {
pageType: "article", // key-value pair passed through oRTB request parameter site.ext.data as a single value under the key.
genres: ["rock", "jazz"] // key-value pairs passed through oRTB request parameter site.ext.data as an array of values under a single key.
}
}
},
user: {
keywords: "footer", // keywords passed through oRTB request parameter user.keywords.
ext: {
data: {
registered: "true", // key-value pair passed through oRTB request parameter user.ext.data as a single value under the key.
interests: ["cars", "racing"] // key-value pairs passed through oRTB request parameter user.ext.data as an array of values under a single key.
}
}
}
}
}
});
Global Config Request With Keywords and Key-Values
pbjs.setConfig({
ortb2: {
site: {
keywords: "index,homepage", // keywords passed through oRTB request parameter site.keywords.
ext: {
data: {
page: "anonymous" // key-value pair passed through oRTB request parameter site.ext.data.
}
}
},
user: {
keywords: "login", // keywords passed through oRTB request parameter user.keywords.
ext: {
data: {
user: ["registered","cart_empty"] // key-value pairs passed through oRTB request parameter user.ext.data as an array of values under a single key.
}
}
}
}
});
Config Request With Floor Price
pbjs.setConfig({
floors: {
enforcement: {
enforceJS: true, //default to true
enforcePBS: true, //default to false
floorDeals: true, //default to false
bidAdjustment: false //default to false
},
data: {
currency: 'USD',
skipRate: 0, //default to zero
modelVersion: "version",
schema: {
fields: ['mediaType', 'adUnitCode']
},
values: {
'banner:/19968336/header-bid-tag-0': 3,
'banner:/19968336/header-bid-tag-1': 5
},
default: 0.75
}
}
});