OpenRTB Ad Request Parameters
Last updated on November 30, 2020
To better characterize your inventory, you can send additional data about your ad units to buyers in the OpenX Ad Exchange using OpenRTB values. You do not need to pass all OpenRTB values because OpenX automatically identifies and passes certain OpenRTB fields for you.
on this page
- Sample JSON Object Including OpenRTB Values
- Recommended OpenRTB Fields
- OpenRTB Fields Set by OpenX
- OpenRTB Fields Passed by Publishers
The openrtb
ad request parameter supports a percent-encoded string generated from JSON objects with supported OpenRTB values.
Sample openrtb parameter included in an ad request
The following ad request shows how you can include various ad request parameters, including the openrtb
parameter, which specifies a percent-encoded string.
http://delivery_server_domain/w/1.0/acj?
o=7889550390&callback=OX_7889550390&auid=537627288&res=320x568x32&plg=qt%2Cpm&ch=UTF-8&tz=420&ws=320x50&sd=1&openrtb=%7B%22cur%22%3A%20%5B%22USD%22%5D%2C%20%22site%22%3A
%20%7B%22publisher%22%3A%20%7B%
22domain%22%3A%20%22foobar.com%22%2C%20%22cat%22%3A%20%5B%22IAB3-1%22%5D%2C%20%22id%22%3A
%20%228953%22%2C%20%22name%22%
3A%20%22foobar.com%22%7D%2C%20%22domain%22%3A%20%22www.example.com%22%2C%20%22page%22%3A%20%22http
%3A//www.example.com/
1234.html%20%22%2C%20%22id%22%3A%20%22102855%22%2C%20%22cat%22%3A%20%5B%22IAB3-1%22%5D%7D%2C
%20%22imp%22%3A%20%5B%7B%
22banner%22%3A%20%7B%22h%22%3A%20250%2C%20%22pos%22%3A%200%2C%20%22w%22%3A%20300%7D%2C%20%22id
%22%3A%20%221%22%2C%20%
22bidfloor%22%3A%200.03%7D%5D%2C%20%22at%22%3A%201%2C%20%22device%22%3A%20%7B%22ip%22%3A
%20%22123.145.167.10%22%2C%20%
22ua%22%3A%20%22Mozilla/5.0%20%28Macintosh%3B%20Intel%20Mac%20OS%20X
%2010_6_8%29%20AppleWebKit/537.13%20%28KHTML%2C%
20like%20Gecko%29%20Version/5.1.7%20Safari/534.57.2%22%7D%2C%20%22id%22%3A
%20%2280ce30c53c16e6ede735f123ef6e32361bfc7b22
%22%2C%20%22user%22%3A%20%7B%22id%22%3A%20%2255816b39711f9b5acf3b90e313ed29e51665623f%22%7D%7D
Parameter | Description |
---|---|
http | The protocol. If your ad space uses SSL/TLS, use https instead. |
delivery_server_domain | The hostname of your OpenX delivery server. |
/w | Indicates the web delivery medium. |
/1.0 | Indicates version 1.0 of the OpenX ad request protocol. |
/acj | Asynchronous chain JSON, an asynchronous ad request to serve a structured JSON delivery response which supports chaining. |
? | Separates the ad request from the ad request parameters. |
auid | The ad unit ID. |
& | Separates each parameter. |
&openrtb= | Indicates the OpenRTB values that follow in a percent-encoded string. |
Sample JSON object including OpenRTB values
The following JSON object shows the structure of the OpenRTB data before removing unnecessary white space and before percent encoding.
{'cur': ['USD'],
'device': {'ip': '123.145.167.10',
'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'},
'id': '80ce30c53c16e6ede735f123ef6e32361bfc7b22',
'imp': [{'banner': {'h': 250, 'pos': 0, 'w': 300},
'bidfloor': 0.03,
'id': '1'}],
'site': {'cat': ['IAB3-1'],
'domain': 'www.example.com',
'id': '102855',
'page': 'http://www.example.com/1234.html ',
'publisher': {'cat': ['IAB3-1'],
'domain': 'example.com',
'id': '8953',
'name': 'example.com'}}}
}
Parameter | Description |
---|---|
cur | The BidRequest.cur field, which specifies that the currency is in U.S. dollars. |
device | The BidRequest.device field, which specifies a Device object array. |
id | The BidRequest.id field, which specifies the unique ID of the bid request. |
imp | The BidRequest.imp field, which specifies an Imp (impression) object array, which in turn specifies various Banner object fields. |
site | The BidRequest.site field, which specifies a Site object array, which in turn specifies the Publisher object. |
To improve performance, remove all unneeded white space and line breaks from your JSON object before generating a percent-encoded version of it as shown in the following example.
JSON string prepared for percent-encoding
{"cur": ["USD"], "site": {"publisher": {"domain": "example.com", "cat": ["IAB3-1"], "id": "8953", "name": "example.com"}, "domain":
"www.example.com", "page": "http://www.example.com/1234.html ", "id": "102855", "cat": ["IAB3-1"]}, "imp": [{"banner": {"h": 250,
"pos": 0, "w": 300}, "id": "1", "bidfloor": 0.03}], "device": {"ip": "123.145.167.10", "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"}, "id": "80ce30c53c16e6ede735f123ef6e32361bfc7b22"}
You can pass as many supported OpenRTB fields as you find useful to characterize your inventory except for those that cannot be passed by publishers.
Recommended OpenRTB fields
The following OpenRTB fields are recommended because they provide the most value to buyers.
- For a complete list of fields that you can pass, see OpenRTB fields passed by publishers.
- To understand which fields-are auto-detected or, for other reasons, cannot be passed by publishers, see OpenRTB fields not passed from publishers.
Click to expand the OpenRTB fields that are recommended
Object name | Field name | Data type | Description |
---|---|---|---|
app | bundle | string | The unique ID of the app’s package (Android), bundle (iOS), or its AppStore ID. For example: com.demo.openx or 123456789 |
app | cat | array (string ) | The list of IAB content categories for the app. |
app | domain | string | The domain of the app. For example: yourapp.com |
app | keywords | string | A comma-separated list of keywords describing the app. |
app | name | string | The name of the app. |
app | storeurl | string | The app store URL for this app. |
app.content | keywords | string | A comma-separated list of keywords describing the app’s content. |
app.content | cat | string | A comma-separated list of IAB content categories. |
app.content | len | integer | The duration in seconds of the presented video content. |
app.content | title | string | The title of the publisher’s presented video content. |
device | carrier | string | The mobile carrier for the user’s device as derived from the IP address and expressed by the mobile country code (MCC) and mobile network code (MCC-MNC). For example: 310-410 Ad Exchange buyers will expect an MCC-MNC code, so sending the name of the carrier may not be parsed correctly by the buyer’s system. |
device | connectiontype | integer | Indicates the detected data connection type for the user’s device as defined in OpenRTB 2.5 specification. |
device | devicetype | integer | Indicates the detected device category for the user’s device as defined in OpenRTB 2.5 specification. Note: OpenX OpenRTB uses a devicetype value of 1001 to indicate text (SMS). |
device | didsha1 | string | The SHA-1 hash identifier for the user’s device, such as the UDID for an iOS device. For example: 2b6f0cc904d137be2e1730235f5664094b831186 |
device | dpidmd5 | string | The MD5 hash of the Android ID for the end-user’s mobile device. |
device | dpidsha1 | string | The SHA-1 hash of the Android ID for the end-user’s mobile device. |
device | ifa | string | ID for advertisers (also referred to as “IDFA”). This is the ID sanctioned for advertiser use in the clear (not hashed). |
device | lmt | integer | If the user’s mobile device is set for private browsing, the LMT (limit tracking) flag is passed. • 0 = false • 1 = true (the user does not want to be tracked.) |
device | macmd5 | string | The MD5 hash of the device’s MAC address. |
device | macsha1 | string | The SHA-1 hash of the device’s MAC address. |
device.geo | lat | float | The device’s latitude. For example: 33.68424 |
device.geo | lon | float | The device’s longitude. For example: -117.79312 |
device.geo | type | integer | Indicates the source of the user’s geographic location details, as defined in OpenRTB 2.5 specification. For example, this field can indicate whether the lat or lon is derived from the device’s GPS location or an IP address. |
imp | displaymanager | string | The name of the mediation partner or other third party responsible for rendering the ad. |
imp.native | api | array ( integer ) | One of the supported API standards or frameworks: • 2 - VPAID 2.0• 3 - MRAID 1.0• 4 - ORMMA• 5 - MRAID 2.0• 6 - MRAID 3.0• 7 - OMID-1For example: 2 |
regs | coppa | integer | Indicates whether the request is subject to Children’s Online Privacy Protection Act (COPPA) regulations. • 0 = false • 1 = true (the request is subject to COPPA) |
regs.ext | sb568 | integer | Indicates whether the request is subject to California’s SB-568 regulations. • 0 = false • 1 = true (the request is subject to SB-568) |
regs.ext | gdpr | integer | Indicates whether the request is subject to the General Data Protection Regulation GDPR). • 0 = false • 1 = true (the request is subject to GDPR) |
site | keywords | string | A comma-separated list of keywords describing the site. |
site.content | keywords | string | A comma-separated list of keywords describing the site’s content. |
user | keywords | string | A comma-separated list of keywords describing the user’s interests. |
user.geo | lat | float | The user’s latitude. For example: 37.530676 |
user.geo | lon | float | The user’s longitude. For example: -122.262447 |
user.geo | type | integer | Indicates the source of the user’s geographic location details. For example, this field can indicate whether the lat or lon is derived from the device’s GPS location or an IP address. |
user.ext.consent | consent | string | Indicates that the user has consented to having his or her data collected by the publisher’s site, as mandated by the GDPR. See the IAB’s GDPR Consent String Specification for more information. |
For more details, refer to the IAB’s OpenRTB 2.5 specification.
OpenRTB Fields Set by OpenX
Last updated on November 6, 2020
OpenX passes certain OpenRTB fields to OpenX Ad Exchange buyers. You cannot set or override these fields. For example:
- Values that are automatically detected, such as location data for a mobile device.
- Values that are set by OpenX to characterize or structure the bid request.
Click to expand the OpenRTB field values you cannot set as a publisher
Object | Field name | Data type | Description |
---|---|---|---|
BidRequest | allimps | integer | Indicates whether the impressions offered represent all of the impressions available for the ad space context, such as all impressions on the webpage or all pre-, mid-, and post-roll video impressions. Values include: • 0 = No or unknown (the default)• 1 = Yes, all of the impressions are available for the ad space.OpenX does not currently support the allimps field because only one impression is supported per bid request, so this value will be ignored. |
BidRequest | at | integer | Auction type, which can be one of the following: • 1 = First price• 2 = Second price (the default) |
BidRequest | cur | array (string ) | The allowed currencies for bids expressed as ISO-4217 values. OpenX does not support the BidRequest .cur field because Ad Exchange does not support multiple currencies, so this field is ignored. |
BidRequest | id | string | A unique ID for the request, which OpenX Ad Exchange uses to identify the auction. For example: 888b4a7a-d259-11e0-9912-000c29b0c11a |
BidRequest | tmax | integer | The maximum interval, in milliseconds, to submit a bid and avoid a timeout. |
BidRequest | wseat | array (string ) | Allowlist of buyer seats allowed to bid on the impression, expressed as seat IDs. OpenX does not currently support the wseat field, so it is ignored. |
BidRequest.app | domain | string | The app’s domain, such as example.domain.com . |
BidRequest.app | id | string | The ID for the app associated with the inventory purchase. |
BidRequest.content | contentrating | string | A content rating, such as a Motion Picture Association of America (MPAA) value. |
BidRequest.content | id | string | A unique identifier for the content. |
BidRequest.content | qagmediarating | integer | A quality assurance guidelines (QAG) rating. |
BidRequest.imp | bidfloorcur | string | The currency of the bid floor expressed as ISO-4217 values. |
BidRequest.imp | id | string | A unique ID for the request, which Ad Exchange uses to identify the auction. |
BidRequest.imp | iframebuster | array (string ) | A list of iframe busters. |
BidRequest.imp.banner | h | integer | The height of the ad unit, in pixels, in which the ad of the winning bidder will display, such as 250. |
BidRequest.imp.banner | id | string | The unique ID of the banner. |
BidRequest.imp.banner | pos | integer | Indicates whether the impression is above the fold. |
BidRequest.imp.banner | w | integer | The width of the ad unit, in pixels, in which the ad of the winning bidder will display, such as 300. |
BidRequest.imp | pmp | Pmp object | An object that provides custom fields for any private marketplace deals in place for the impression. |
BidRequest.imp.pmp | deals | array (Deal objects) | array of Deal objects that specify the deals for this impression. |
BidRequest.imp.pmp | private_auction | integer | Indicates a private auction where: • 0 = All bids are accepted• 1 = Bids are restricted to the specified seats and terms |
BidRequest.imp.pmp.deal | at | integer | Auction type override, which can be one of the following: • 1 = First price• 2 = Second price• 3 = The value of the BidRequest.imp.pmp.deal.bidfloor field is the agreed upon deal price. |
BidRequest.imp.pmp.deal | bidfloor | float | The minimum bid for the impression in CPM. The default value is 0 . |
BidRequest.imp.pmp.deal | bidfloorcur | string | The bid floor’s currency expressed as an ISO-4217 value. The default value is USD. |
BidRequest.imp.pmp.deal | id | string | The deal ID. |
BidRequest.imp.pmp.deal | wadomain | array (string ) | Allowlist of advertiser domains allowed to bid on the deal. |
BidRequest.imp.pmp.deal | wseat | array (string ) | Allowlist of buyer seats allowed to bid on the deal, expressed as seat IDs. |
BidRequest.imp.publisher | domain | string | The top-level domain of the publisher, such as example.com. |
BidRequest.imp.publisher | id | string | The publisher ID. |
BidRequest.imp.publisher | name | string | The name of the publisher. |
BidRequest.imp.regs | coppa | integer | Indicates whether the request is subject to Children’s Online Privacy Protection Act (COPPA) regulations. • 0 = false• 1 = true (the request is subject to COPPA) |
BidRequest.imp.video | companionad | array (Banner) | An array of Banner objects if companion ads are available. |
BidRequest.imp.video | companiontype | array (integer ) | An array of supported VAST companion ad types if companionad specifies companion Banner objects. |
BidRequest.imp.video | h | integer | Height of the player (in pixels). |
BidRequest.imp.video | pos | integer | Indicates whether the impression is above the fold. |
BidRequest.imp.video | protocol | integer | Video bid response protocol. OpenX supports a value of 5, which indicates a VAST 2.0 wrapper. |
BidRequest.imp.video | sequence | integer | The sequence used for coordinated delivery of multiple creatives if the bid request offers multiple impressions. |
BidRequest.imp.video | skip | integer | Always sent for opt-in video (rewarded video). Indicates if the player will allow the video to be skipped, where 0 = No and 1 = Yes. Opt-in video will always be sent with imp.video.skip set to 0 for better monetization of opt-in video inventory. |
BidRequest.imp.video | w | integer | Width of the player (in pixels). |
BidRequest.publisher | domain | string | The publisher’s top-level domain (for example, example.com ). |
BidRequest.publisher | id | string | The exchange-specific publisher ID. |
BidRequest.publisher | name | string | The name of the publisher. |
BidRequest.site | cat | array (string ) | The list of IAB content categories for the site as defined in the IAB’s OpenRTB 2.5 specification. |
BidRequest.site | domain | string | The site domain (for example, example.com ), which maps to the domain of the bid request URL. |
BidRequest.site | id | string | The ID for the site associated with this inventory purchase. |
BidRequest.site | name | string | The name of the site. |
BidRequest.user | buyeruid | string | Custom, bidder-specific data that the bidder had stored in the exchange (≤ 200 bytes). |
BidRequest.user | customdata | string | Custom, bidder-specific data that the bidder had stored in the exchange (≤ 200 bytes). |
BidRequest.user | id | string | The ID of the user. |
OpenRTB Fields Passed by Publishers
Last updated on January 16, 2019
You can pass as many supported OpenRTB values as you find useful to characterize your inventory except for those that cannot be passed by publishers. However, passing too many fields can negatively impact the performance of the ad request, so only add fields that will help buyers to target your inventory.
BidRequest fields
Expand details
Field name | Data type | Description |
---|---|---|
app | App | An object containing properties that describe the app where the ad will display if the bid request is for an impression within a mobile app. A bid request can only have an App or a Site object. |
badv | array (string ) | The list of top-level advertiser domains blocked for this publisher as derived from the click URL. Domains are not case-sensitive. For example: blockeddomain.com |
bcat | array (string ) | The list of advertiser categories that the publisher wants to block for the ad request. Use the IAB categories listed in the IAB’s OpenRTB 2.5 specification in this field. For example: bcat : [ "IAB17-18", "IAB24", "IAB25", "IAB25-3", ] , |
device | Device object | An object containing properties that describe the device through which the impression is viewed, such as on a specific type of mobile phone. |
imp | array Imp object | An object containing properties that describe the ad impression. OpenX supports only one impression per bid request, which is expressed as an array with a single Imp object. This is because OpenX handles each ad unit as a separate ad request. |
regs | Regs object | An object containing properties that describe any regulations applicable to the request. |
site | Site object | An object containing properties that describe the website where the ad will display if the bid request is for an impression on a website. The bid request can only have a Site or an App object. |
test | integer | Indicates test mode (1 ), which is not billable. The default is 0 , which indicates that the auction is billable. |
user | User object | An object containing properties that describe the user viewing the impression. |
Site fields
BidRequest.site
Expand details
If the available impression is on a website, OpenX Ad Server may include a Site object to describe the website. A BidRequest
can only contain a single Site or App object, not both. A Site object can reference the Publisher object.
For more details, refer to the IAB’s OpenRTB 2.5 specification.
Field name | Data type | Description |
---|---|---|
content | Content object | An object containing properties that describe the site’s content. |
keywords (recommended) | string | A comma-separated list of keywords describing the site’s content. |
mobile | integer | Indicates whether the site has been programmed to optimize layout when viewed on mobile devices. • 0 = false (the default)• 1 = true (the site uses responsive web design) |
page | string | The URL of the webpage where the impression will display. |
pagecat | array (string ) | The list of IAB content categories for the webpage. |
privacypolicy | integer | Indicates whether the site has a privacy policy (1 ) or not (0 ). |
publisher | Publisher object | An object containing properties that describe the publisher of the Site or App for this impression opportunity. |
ref | string | The referrer URL that navigated the end-user to the current page. |
search | string | The search string The search string that brought the end-user to the current page (if available). |
sectioncat | array (string ) | The list of IAB content categories for the site section. |
App fields
BidRequest.app
Expand details
If the available impression is within a mobile app, the BidRequest
includes the App object to describe the mobile app. A BidRequest
can only contain a single App or Site object, not both.
For more details, refer to the IAB’s OpenRTB 2.5 specification.
Field name | Data type | Description |
---|---|---|
bundle (strongly recommended) | string | The unique ID of the app’s package (Android), bundle (iOS), or its AppStore ID. For example: com.demo.openx or 123456789 |
cat (recommended) | array (string ) | The list of IAB content categories for the app. |
content | Content object | An object containing properties that describe the app’s content. |
keywords (recommended) | string | A comma-separated list of keywords describing the app’s content. |
name (strongly recommended) | string | The name of the app. |
pagecat | array (string ) | The list of IAB content categories for the current page of the app. |
paid | integer | Indicates whether the app is a paid version (1 ) or free (0 ). |
privacypolicy | integer | Indicates whether the app has a privacy policy (1 ) or not (0 ). |
publisher | Publisher | An object containing properties that describe the publisher of the app. |
sectioncat | array (string ) | The list of IAB content categories for the current section of the app. |
storeurl (recommended) | string | The app store URL for this app. |
ver | string | The version of the app. |
Publisher fields
BidRequest.app.publisher
or BidRequest.site.publisher
Expand details
The Publisher object describes the seller of the ad space (for the App or Site) in which the ad will be displayed.
For more details, refer to the IAB’s OpenRTB 2.5 specification.
Field name | Data type | Description |
---|---|---|
cat | array (string ) | The list of IAB content categories for the publisher. |
Content fields
BidRequest.app.content
or BidRequest.site.content
Expand details
The Content object describes the type of content of the App or Site in which the ad will be displayed.
For more details about the Content object, refer to the IAB’s OpenRTB 2.5 specification.
Field name | Data type | Description |
---|---|---|
cat | string | The list of IAB content categories for the content. |
context | string | The type of content. |
embeddable | integer | Indicates whether the content is embeddable (1 ) or not (0 ). |
episode | integer | An episode number. |
keywords (recommended) | string | A comma-separated list of keywords describing the content. |
language | string | Content language using ISO-639-1-alpha-2. |
len | integer | The length of the content in seconds (if applicable). |
livestream | integer | • 0 = Not a live stream• 1 = Content is a live stream |
season | string | The content’s season. |
series | string | The content’s series. |
sourcerelationship | integer | • 0 = Indirect relationship• 1 = Direct relationship |
title | string | The title of the content. |
url | string | The URL where the content is located. |
userating | string | User rating of the content. |
videoquality | integer | The video quality classification. |
Device fields
BidRequest.device
Expand details
Each BidRequest
object may contain a Device object, which provides details about the end-user’s computing environment.
The Device object can reference the Geo object. Passing device.geo
data can provide valuable information to buyers about where the device (and therefore, the user) is currently located.
For more details, refer to the IAB’s OpenRTB 2.5 specification.
Field name | Data type | Description |
---|---|---|
ua | string | The HTTP user agent, which typically indicates the user’s browser. For example: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-us) |
geo | geo object | An object containing properties that describe the geographic location of the user as derived from the device. |
dnt | integer | Do not track flag. If the user’s web browser is set for private browsing, a dnt value of 1 is passed. If dnt has a value of 0 , the browser is not set for private browsing. |
lmt (recommended) | integer | If the user’s mobile device is set for private browsing, the LMT (limit tracking) flag is passed. • 0 = false • 1 = true (the user does not want to be tracked.) |
ip | string | The ipv4 address closest to the user’s device. For example: 238.122.7.1 |
ipv6 | string | The ipv6 address closest to the user’s device. |
devicetype (recommended) | integer | Indicates the detected device category for the user’s device. Note: OpenX OpenRTB uses a devicetype value of 1001 to indicate text (SMS). |
make | string | The make for the user’s device. For example: Apple |
model | string | The model for the user’s device. For example: iPhone |
os | string | The operating system for the user’s device. |
osv | string | The version number for the user’s operating system. |
hwv | string | The device’s hardware version. For example: 5S (for iPhone 5S) |
h | integer | The height of the device’s screen, in pixels. |
w | integer | The width of the device’s screen, in pixels. |
ppi | integer | The size of the device’s screen expressed in pixels per inch. |
pxratio | float | The ratio of device pixels to device-independent pixels. |
js | integer | Indicates whether the device supports JavaScript (1 ) or not (0 ). |
flashver | string | The version of Flash supported by the device’s browser. |
language | string | The two letter code (ISO 639-1) for the user’s preferred browsing language on their device. For example: “en” |
carrier (recommended) | string | Carrier or ISP using exchange-curated string names. For example: “VERIZON” |
mccmnc (recommended) | string | Mobile carrier as the concatenated mobile country code-mobile network code, or MCC-MNC (for example, “310-005” identifies Verizon Wireless CDMA in the USA). Note that the dash between the MCC and MNC parts is required to remove parsing ambiguity. For a user-friendly list of codes, see Mobile country code. |
connectiontype (recommended) | integer | Indicates the detected data connection type for the user’s device. |
ifa (recommended) | string | ID for advertisers (also referred to as “IDFA “). This is the ID sanctioned for advertiser use in the clear (not hashed). |
didsha1 (recommended) | string | The SHA-1 hash identifier for the user’s device, such as the UDID for an iOS device. For example: 2b6f0cc904d137be2e1730235f5664094b831186 |
dpidsha1 (recommended) | string | The SHA-1 hash of the Android ID for the end-user’s mobile device. |
dpidmd5 (recommended) | string | The MD5 hash of the Android ID for the end-user’s mobile device. |
macsha1 (recommended) | string | The SHA-1 hash of the device’s MAC address. |
macmd5 (recommended) | string | The MD5 hash of the device’s MAC address. |
Geo fields
BidRequest.device.geo
or BidRequest.user.geo
Expand details
The Geo object provides details about the device’s current location (via the Device object) or the location according to user-provided data (via the User object). Pass these values as device.geo
or user.geo
depending on which type of geo data you have.
Field name | Data type | Description |
---|---|---|
city | string | City location (United Nations Code for Trade and Transport Locations). For example: los angeles |
country | string | Country location expressed as an ISO 3166-1 alpha-3 code. For example: USA |
lat (recommended) | float | Latitude. For example: 33.684 |
lon (recommended) | float | Longitude. For example: -117.793 |
metro | string | Google metro code, which are similar to DMA codes. |
region | string | Region code per ISO-3166-2 or the two-character state code in the U.S. For example: CA |
type (recommended) | integer | Use this parameter to indicate the source of your lat and lon parameter values:• 1 (GPS/location services)• 2 (IP address)• 3 (user-provided) |
utcoffset | integer | Device time as a positive or negative offset, in minutes, from UTC. |
zip | string | Postal code location. Values are not restricted to the U.S. For example: 92602 |
BidRequest.user
Each BidRequest
object can contain a User object, which provides details about the end-user.
Expand details
The User object can reference the user’s Geo according to user-provided data about their location.
Field name | Data type | Description |
---|---|---|
data | array ( data object) | An array of Data objects to provide details about the user. |
gender | string | The end-user’s gender (M , F , or O ). |
geo | geo object | An object containing properties that describe the user’s primary location. User geo data should be used for user-provided location data. For the device’s current location, use device.geo . |
keywords (recommended) | string | A comma-separated list of keywords describing the user’s interests. |
yob | integer | The end-user’s four digit year of birth. For example: 1972 |
User extensions object fields
BidRequest.user.ext
Expand details
The optional Extensions object can provide additional user details.
Field name | Data type | Description |
---|---|---|
consent | string | Indicates that the user has consented to having his or her data collected by the publisher's site, as mandated by the GDPR. See the IAB’s GDPR Consent String Specification for more information. |
Data fields
Expand details
The Data object provides details about the user.
Field name | Data type | Description |
---|---|---|
id | string | A unique OpenX identifier for the data provider. You can pass a value that may be included in the BidRequest.data.id field if its value is either publisher or it is prefixed with pub- followed by any value of your choosing.For example: pub-12345678 .Note: The conventions used by this field will change as OpenX supports additional sources of data. |
name | string | The name of the data provider. |
segment | array ( segment object) | A collection of Segment objects, each describing a particular data point available from this data provider. |
Segment fields
BidRequest.user.data.segment
Expand details
The Segment object provides data about the user.
Field name | Data type | Description |
---|---|---|
id | string | The ID of the data segment specific to the data provider. |
name | string | The name of the data segment specific to the data provider. For example: gender , dma , or age |
value | string | A string representation of the data segment value. |
Regs object fields
BidRequest.regs
Expand details
The Regs object provides details about any regulations applicable to the request.
Field name | Data type | Description |
---|---|---|
coppa | integer | Indicates whether the request is subject to Children’s Online Privacy Protection Act (COPPA) regulations. • 0 = false • 1 = true (the request is subject to COPPA) |
ext | Extensions object | An object containing properties that describe custom fields for additional regulations. |
Regs extensions object fields
BidRequest.regs.ext
Expand details
The optional Extensions object can provide additional regulatory details.
Field name | Data type | Description |
---|---|---|
sb568 | integer | Indicates whether the request is subject to California’s SB-568 regulations. • 0 = false • 1 = true (the request is subject to SB-568) |
gdpr | integer | Indicates whether the request is subject to the General Data Protection Regulation (GDPR). • 0 = false • 1 = true (the request is subject to GDPR) |