OpenRTB SSP Integration 

The RTB-Stack platform supports OpenRTB versions 2.5 and 2.6, with a priority on version 2.6. For seamless integration, it is crucial that SSPs adhere to the OpenRTB protocol when sending bid requests. This guide outlines the required, recommended, and some optional but frequently used parameters that must be included in bid requests for compatibility with the RTB-Stack platform. For a comprehensive list of all supported parameters that could be included in the bid request, please refer to the IAB's OpenRTB API specifications for versions 2.5 and 2.6.

Bid Request Requirements

  • Request Method: POST
  • Request Header: Should contain Content-Type: application/json
  • Request Header: Specify the OpenRTB version being used (2.5 or 2.6): x-openrtb-version: 2.6
  • Request Body: The bid request must be included in the body of the POST request in JSON format.

Below are the required and recommended attributes for different objects within the bid request. Ensure that all required fields are present to avoid request rejections or filtering.

For invalid requests or those not meeting platform requirements, the RTB-Stack platform will return a JSON response with a NoBidReason ("nbr") code. You can find the detailed descriptions and meanings of these NBR codes in the corresponding article. 

Bid Request Object

The top-level bid request contains a globally unique bid request ID along with subordinate objects providing detailed data for potential buyers. The Site or App object must be included depending on the environment. Below are the required and recommended attributes for the bid request. For the full list of attributes, please check the Object: Bid Request section in OpenRTB Spec v2.6 or 2.5.

Attribute Type Description Status
id string Unique ID of the bid request, provided by the exchange. Required
imp object array Array of Imp objects representing impressions. At least one Imp object is required, and no more than 10 Imp objects are allowed. Required
site object Site object is required if no App object is present. Required
app object App object is required if no Site object is present. Required
tmax integer Maximum time in milliseconds to submit a bid to avoid timeout. Typically between 80ms and 1000ms. The minimum threshold is 50ms. Required
device object Device information where the ad will be displayed. Recommended
user object Information about the user of the device. Recommended
at integer Auction type: 1 = First Price, 2 = Second Price Plus. Default is 2. Recommended
wseat string array Allowed buyer seats to bid. Only one of wseat or bseat should be used. Recommended
bseat string array Blocked buyer seats from bidding. Only one of wseat or bseat should be used. Recommended
cur string array Allowed currencies for bids, specified in ISO-4217 codes. Recommended
wlang string array Allowed languages for creatives, using ISO-639-1 codes. Recommended
wlangb string array Allowed languages for creatives, using IETF BCP 47 codes. Recommended
bcat string array Blocked advertiser categories, using defined category taxonomy. Recommended
badv string array Blocked list of advertisers by their domains (e.g., "ford.com"). Recommended
bapp string array Blocked list of apps by their app store IDs. Recommended
source object Information about the inventory source. Recommended
regs object Regulatory information, including GDPR, CCPA. Recommended

Imp Object

The Imp (Impression) Object represents an ad placement or impression being auctioned. Each Imp object contains a unique ID and can describe various types of ad opportunities, including banner, video, audio, or native ads. It can also provide details about private marketplace deals (PMP) or specific requirements like secure creative assets, minimum bid floors, or interstitial ad formats. Multiple Imp objects can be included in a bid request, allowing publishers to auction several ad positions simultaneously. Each bid must adhere to the specific format (banner, video, etc.) specified in the Imp object for the impression. For the full list of attributes, please check the Object: Imp section in OpenRTB Spec v2.6 or 2.5.

Attribute Type Description Status
id string A unique identifier for this impression within the context of the bid request. Required
banner object A Banner object required if this impression is offered as a banner ad opportunity. Required
video object A Video object required if this impression is offered as a video ad opportunity. Required
audio object An Audio object required if this impression is offered as an audio ad opportunity. Required
native object A Native object, required if this impression is offered as a native ad opportunity. Required
pmp object A Pmp object containing any private marketplace deals in effect for this impression. Recommended
bidfloor float; default 0 Minimum bid for this impression, expressed in CPM (Cost Per Mille). By default, the platform enforces a maximum threshold of $50, but the "Bid floor is too high" filter can be toggled off. Recommended
displaymanager string Name of ad mediation partner, SDK technology, or player responsible for rendering the ad. Optional
displaymanagerver string Version of the ad mediation partner, SDK technology, or player responsible for rendering the ad. Optional
instl integer; default 0 Indicates if the ad is interstitial or full-screen, where 1 = interstitial and 0 = not. Optional
rwdd integer; default 0 Indicates whether the user receives a reward for viewing the ad, where 0 = no, 1 = yes. Typically used in video ad implementations. Optional
bidfloorcur string; default USD Currency for bid floor, specified using ISO-4217 alpha codes. Optional
clickbrowser integer Type of browser opened upon clicking the creative, where 0 = embedded and 1 = native. Optional

Site Object

The Site object provides details about the website where the impressions are served. This object is required if no App object is present. For the full list of attributes, please check the Object: Site section in OpenRTB Spec v2.6 or 2.5.

Attribute Type Description Status
domain string Domain of the website, required if Site object is present. Required
id string Exchange-specific site ID. Recommended
name string Site name, which may be aliased at the publisher’s request. Recommended
cattax integer Taxonomy in use, defaulting to IAB Content Category Taxonomy 1.0 if not specified. Optional
cat string array Array of IAB content categories describing the site’s content. Optional
sectioncat string array Array of IAB content categories describing the current section of the site. Optional
pagecat string array Array of IAB content categories describing the current page or view of the site. Optional
page string URL of the page where the impression will be shown. Optional
ref string Referrer URL that led to the current page. Optional
search string Search string that led to the current page. Optional
mobile integer Indicates if the site is optimized for mobile, where 0 = no, 1 = yes. Optional
privacypolicy integer Indicates if the site has a privacy policy, where 0 = no, 1 = yes. Optional
publisher object Details about the publisher of the site. Optional
content object Details about the content within the site. Optional
keywords string Comma-separated list of keywords about the site (cannot be used with ‘kwarray’). Optional
kwarray string array Array of keywords about the site (cannot be used with ‘keywords’). Optional

App Object

The App object provides details about the mobile application where impressions are served. This object is required if no Site object is present. The key field is the app bundle (package name). For the full list of attributes and their descriptions, please check the Object: App section in OpenRTB Spec v2.6 or 2.5.

Attribute Type Description Status
bundle string Application bundle or package name, required if App object is present. Required
id string Exchange-specific app ID. Recommended
name string App name (may be aliased at the publisher’s request). Recommended
domain string Domain of the app (e.g., “mygame.foo.com”). Recommended
storeurl string App store URL for the installed app (for IQG 2.1 compliance). Optional
cattax integer Taxonomy in use (defaulting to IAB Content Category Taxonomy 1.0). Optional
cat string array Array of IAB content categories for the app. Optional
sectioncat string array Array of IAB content categories describing the current section of the app. Optional
pagecat string array Array of IAB content categories describing the current page or view of the app. Optional
ver string Application version. Optional
privacypolicy integer Indicates if the app has a privacy policy, where 0 = no, 1 = yes. Optional
paid integer 0 = app is free, 1 = paid version. Optional
publisher object Details about the Publisher of the app. Optional
content object Details about the content within the app. Optional
keywords string Comma-separated list of keywords about the app (cannot be used with ‘kwarray’). Optional
kwarray string array Array of keywords about the app (cannot be used with ‘keywords’). Optional

Publisher Object

The Publisher object describes the entity that directly supplies inventory to and receives payment from the exchange. This could be a publisher, intermediary exchange, ad network, etc. For the full list of attributes and their descriptions, please check the Object: Publisher section in OpenRTB Spec v2.6 or 2.5.

Attribute Type Description Status
id string Exchange-specific seller ID. Must map to a single entity listed in the exchange’s sellers.json file. Required
name string Seller name, may be aliased at the seller’s request. Optional
cattax integer Taxonomy in use for categorizing content. Default is 1. Refer to AdCOM’s Category Taxonomies. Optional
cat string array IAB content categories describing the publisher. Uses taxonomy defined by cattax. Assumes IAB Content Category Taxonomy 1.0 if cattax is absent. Optional
domain string Highest level domain of the seller (e.g., “seller.com”). Optional

Source Object

The Source object describes the entity upstream from the exchange that is responsible for the bid request. This object is essential for defining post-auction decisioning when the exchange is not the final authority, such as in cases of header bidding or upstream ad servers. It can also be useful in understanding the payment chain and decision-making process when multiple parties are involved. For the full list of attributes, please check the Object: Source section in OpenRTB Spec v2.6 or 2.5.

Attribute Type Description Status
fd integer Entity responsible for the final impression sale decision, where 0 = exchange and 1 = upstream source. Recommended
tid string Transaction ID that must be common across all participants in the bid request (e.g., multiple exchanges). Recommended
pchain string Payment ID chain string that follows the TAG Payment ID Protocol v1.0 for tracking payment flows. Recommended
schain object Represents links in the supply chain and indicates if the supply chain is complete, as detailed via the SupplyChain object. Recommended

The Banner object provides details about banner ads, such as the width and height of the banner. This object is required for banner ad impressions. For the full list of attributes and their descriptions, please check the Object: Banner section in OpenRTB Spec v2.6 or 2.5.

Attribute Type Description Status
w integer Width of the banner in pixels. Required
h integer Height of the banner in pixels. Required
format object array Array of Format objects representing permitted banner sizes. If none are specified, then use of the h and w attributes is highly recommended. Recommended
btype integer array Blocked banner ad types. (1 = XHTML Text Ad, 2 = XHTML Banner Ad, etc.) Optional
battr integer array Blocked creative attributes. Refer to Creative Attributes in AdCOM 1.0. Optional
pos integer Ad position on the screen. Refer to Placement Positions in AdCOM 1.0. Optional
mimes string array Content MIME types supported (e.g., "image/jpeg", "image/gif"). Optional
topframe integer Indicates if the banner is in the top frame as opposed to an iframe, where 0 = no, 1 = yes. Optional
expdir integer array Directions in which the banner may expand. Refer to Expandable Directions in AdCOM 1.0. Optional
api integer array List of supported API frameworks for this impression. Refer to API Frameworks in AdCOM 1.0. Optional
id string Unique identifier for this banner object, usually for companion ads in video. Optional

Video Object

The Video represents an in-stream video impression, supporting the VAST standard and companion ads through optional Banner objects. If a Video object is part of an Imp object, the impression is offered as a video type, but may also be offered as banner, audio, or native. Bids must conform to one of the provided types. For the full list of attributes and their descriptions, please check the Object: Video section in OpenRTB Spec v2.6 or 2.5.

Attribute Type Description Status
w integer Width of the video player in pixels. Required
h integer Height of the video player in pixels. Required
mimes string array Content MIME types supported (e.g., "video/mp4"). Required
skip integer Indicates if the video is skippable (1 for yes, 0 for no). Recommended
minduration integer; default 0 Minimum video ad duration in seconds. Mutually exclusive with rqddurs. Recommended
maxduration integer Maximum video ad duration in seconds. Mutually exclusive with rqddurs. Recommended
startdelay integer Start delay in seconds for pre-roll, mid-roll, or post-roll ads. Recommended
maxseq integer Maximum number of ads in a dynamic video ad pod. Recommended
poddur integer Total duration of a dynamic video ad pod in seconds. Recommended
protocols integer array Array of supported video protocols. Refer to AdCOM 1.0 Creative Subtypes. Recommended
linearity integer Indicates if the impression must be linear or nonlinear. Defaults to all. Optional
skip integer Indicates if the video is skippable, where 0 = no, 1 = yes. Optional
skipmin integer; default 0 Number of seconds after which skipping is allowed. Optional
skipafter integer; default 0 Number of seconds the video must play before skipping is enabled. Optional
delivery integer array Supported delivery methods (e.g., streaming, progressive). Optional
pos integer Ad position on the screen. Optional
companionad object array Array of Banner objects representing companion ads. Optional
api integer array Supported API frameworks. Refer to AdCOM 1.0 API Frameworks. Optional
companiontype integer array Supported VAST companion ad types. Optional

Audio Object

This object represents an audio ad impression. While some fields are optional, they provide fine control when needed. Audio in OpenRTB is generally VAST-compliant, supporting companion ads via optional Banner objects. As a subordinate of the Imp object, Audio impressions may be offered alongside banner, video, or native types. However, any bid must adhere to one of the provided types. For the full list of attributes and their descriptions, please check the Object: Audio section in OpenRTB Spec v2.6 or 2.5.

Attribute Type Description Status
mimes string array Supported content MIME types (e.g., “audio/mp4”). Required
minduration integer Min audio ad duration in seconds. Exclusive with rqddurs. Recommended
maxduration integer Max audio ad duration in seconds. Exclusive with rqddurs. Recommended
poddur integer Total time for dynamic audio ad pods. Applies to dynamic portions only. Recommended
protocols integer array Supported audio protocols. See AdCOM 1.0 Creative Subtypes. Recommended
startdelay integer Start delay in seconds for ad placements. See AdCOM 1.0 Start Delay Modes. Recommended
rqddurs integer array Specific durations in seconds for audio creatives. Exclusive with minduration/maxduration. Optional
podid string Identifier for audio ad pods. Links multiple impressions to the same pod. Optional

Native Object

The Native object under the Imp object signifies a native type impression, designed to integrate seamlessly with the surrounding content, such as sponsored posts on social platforms like Twitter or Facebook. It allows for detailed control over ad rendering. Depending on the publisher's choice, this impression might also be presented as banner, video, or audio by including respective Imp subordinates. However, bids must align with one of the available impression types. For the full list of attributes and their descriptions, please check the Object: Native section in OpenRTB Spec v2.6 or 2.5.

Attribute Type Description Status
request string Request payload complying with the Native Ad Specification. For Native 1.0, a JSON-encoded string with a 'native' object. For Native 1.1+, a JSON string of the Native Markup Request Object. Required
ver string Version of the Dynamic Native Ads API for request compliance; crucial for efficient parsing. Recommended
api integer array Supported API frameworks for this impression. If an API is not listed, it is assumed unsupported. Refer to AdCOM's API Frameworks list. Optional
battr integer array Blocked creative attributes. Refer to AdCOM's Creative Attributes list. Optional

Pmp Object

The Pmp object serves as a container for direct deals in a private marketplace related to a specific impression. It includes a collection of Deal objects. For the full list of attributes and their descriptions, please check the Object: Pmp section in OpenRTB Spec v2.6 or 2.5.

Attribute Type Description Status
private_auction integer Indicator of auction eligibility to seats named in the Direct Deals object, where 0 = all bids are accepted, 1 = bids are restricted to the deals specified and the terms thereof. Default 0
deals object array Array of Deal objects that convey the specific deals applicable to this impression. Optional
ext object Placeholder for exchange-specific extensions to OpenRTB. Optional

Deal Object

The Deal object represents a specific deal pre-arranged between a buyer and a seller. Its inclusion in the Pmp collection signifies that the impression is available under the terms of that deal. For the full list of attributes and their descriptions, please check the Object: Deal section in OpenRTB Spec v2.6 or 2.5.

Attribute Type Description Status
id string A unique identifier for the direct deal. Required
bidfloor float Minimum bid for this impression expressed in CPM. Default 0
bidfloorcur string Currency specified using ISO-4217 alpha codes. This may be different from bid currency returned by bidder if allowed by the exchange. Default "USD"
at integer Optional override of the overall auction type of the bid request, where 1 = First Price, 2 = Second Price Plus, 3 = the value passed in bidfloor is the agreed upon deal price. Additional auction types can be defined by the exchange. Optional
wseat string array Allowed list of buyer seats (e.g., advertisers, agencies) allowed to bid on this deal. Omission implies no seat restrictions. Optional
wadomain string array Array of advertiser domains (e.g., advertiser.com) allowed to bid on this deal. Omission implies no advertiser restrictions. Optional

Format Object

The Format object defines permissible sizes (height and width combinations) or Flex Ad parameters for banner impressions. It is typically used in arrays to allow multiple sizes. It is recommended to specify either the width-height (w/h) pair or the width-height ratio set (wratio/hratio/wmin) for Flex Ads. For the full list of attributes and their descriptions, please check the Object: Format section in OpenRTB Spec v2.6 or 2.5.

Attribute Type Description Status
w integer Width in device independent pixels (DIPS). Optional
h integer Height in device independent pixels (DIPS). Optional
wratio integer Relative width when size is expressed as a ratio. Optional
hratio integer Relative height when size is expressed as a ratio. Optional
wmin integer Minimum width in DIPS when size is expressed as a ratio. Optional

Content Object

The Content object describes the content where the impression will appear, which could be either syndicated or non-syndicated. It is particularly useful for impressions within syndicated content that may not align with the publisher's typical content. Due to the nature of syndication, the exchange may not always know the specific page or device where the content is displayed, such as a video impression embedded in an iframe on an unspecified web property. For the full list of attributes and their descriptions, please check the Object: Content section in OpenRTB Spec v2.6 or 2.5.

Attribute Type Description Status
id string Unique identifier for the content. Optional
episode integer Episode number of the content. Optional
title string Title of the content. Optional
series string Series of the content. Optional
season string Season of the content. Optional
artist string Artist credited with the content. Optional
genre string Genre of the content. Optional
album string Album to which the content belongs. Optional
producer object Details about the content producer. Optional
url string URL of the content. Optional
cattax integer Taxonomy in use. Default is 1. Optional
cat string array IAB content categories describing the content. Optional
contentrating string Content rating. Optional
userrating string User rating of the content. Optional
qagmediarating integer Media rating per IQG guidelines. Optional
keywords string Comma-separated keywords describing the content. Optional
kwarray string array Array of keywords about the content. Optional
livestream integer Indicates if content is live (0 = no, 1 = yes). Optional
len integer Length of content in seconds. Optional
language string Content language (ISO-639-1-alpha-2). Optional
langb string Content language (IETF BCP 47). Optional
embeddable integer Indicates if content is embeddable (0 = no, 1 = yes). Optional

SupplyChain Object

The SupplyChain object represents details about the entities involved in serving an ad. While not always required, this object is recommended for transparency in the ad supply chain. For the full list of attributes and their descriptions, please check the Object: SupplyChain section in OpenRTB Spec v2.6.

Attribute Type Description Status
complete integer Indicates if the chain is complete (1 for yes, 0 for no). Required
nodes object array Array of SupplyChainNode objects in order. The first node is the initial advertising system and seller ID in a complete chain, or the first known node in an incomplete chain. The last node is the entity sending the bid request. Required
ver string Version of the supply chain specification in use, formatted as "major.minor" (e.g., "1.0"). Required

SupplyChainNode Object

This object is part of a SupplyChain object array, representing entities involved in the supply chain of a bid request. Each node defines the identity of a participant in the supply chain. For detailed implementation examples, visit: Supply Chain Object on GitHub. The SupplyChainNode object includes several attributes to detail these entities. For the full list of attributes and their descriptions, please check the Object: SupplyChainNode section in OpenRTB Spec v2.6 or.

Attribute Type Description Status
asi string The canonical domain name of the SSP, Exchange, Header Wrapper, etc. system that bidders connect to. Required
sid string The identifier associated with the seller or reseller account within the advertising system. Required
rid string The OpenRTB RequestId of the request as issued by this seller. Optional
name string The name of the company (the legal entity) that is paid for inventory transacted under the given seller_ID. Optional
domain string The business domain name of the entity represented by this node. Optional
hp integer Indicates whether this node will be involved in the flow of payment for the inventory. Optional

Device Object

The Device object provides key information about the user's device, including the IP address, user agent, and device identifiers. These attributes are crucial for identifying the user's environment and enabling proper targeting and ad tracking. For the full list of attributes and their descriptions, please check the Object: Device section in OpenRTB Spec v2.6 or 2.5.

Attribute Type Description Status
ip string IP address of the device. Required
ua string User agent string of the device. Required
ifa string Identifier for advertisers (e.g., IDFA for iOS devices, GAID for Android devices). The platform includes the "No advertising ID" filter that flags requests where the "ifa" is missing: this filter can be toggled off. Required
geo object Location of the device, defined by a Geo object. Recommended
dnt integer Do Not Track flag, where 0 = unrestricted, 1 = do not track. Recommended
lmt integer Limit Ad Tracking signal, where 0 = unrestricted, 1 = limited tracking. Recommended
ipv6 string IPv6 address closest to device. Optional
devicetype integer General type of device. Optional
make string Device make. Optional
model string Device model. Optional
os string Operating system. Optional
osv string Operating system version. Optional
hwv string Hardware version of the device. Optional
h integer Physical height of the screen in pixels. Optional
w integer Physical width of the screen in pixels. Optional
ppi integer Screen size as pixels per linear inch. Optional
pxratio float Ratio of physical pixels to device independent pixels. Optional
language string Browser language (ISO-639-1-alpha-2). Optional
langb string Browser language (IETF BCP 47). Optional
carrier string Carrier or ISP using exchange curated string names. Optional
connectiontype integer Network connection type. Optional

Geo Object

The Geo Object provides methods for specifying geographic locations. When linked to a Device object, it represents the device's location, which is assumed to be the user's current location. When linked to a User object, it represents the user's home base, which may differ from their current location. For the full list of attributes and their descriptions, please check the Object: Geo section in OpenRTB Spec v2.6 or 2.5.

Attribute Type Description Status
lat float Latitude from -90.0 to +90.0, where negative is south. Recommended
lon float Longitude from -180.0 to +180.0, where negative is west. Recommended
country string Country code using ISO-3166-1-alpha-3. Recommended
region string Region code using ISO-3166-2; 2-letter state code if USA. Recommended
city string City using United Nations Code for Trade & Transport Locations. Recommended
type integer Source of location data; recommended when passing lat/lon. Recommended
accuracy integer Estimated location accuracy in meters; recommended when lat/lon are derived from a device’s location services. Optional
ipservice integer Service used to determine geolocation from IP address if applicable. Optional
zip string ZIP or postal code. Optional

User Object

The User object holds information about the human user of the device, who is the target audience for advertising. The user ID, provided by the exchange, may change due to privacy policies but should remain stable enough to facilitate frequency capping and retargeting when available. For the full list of attributes and their descriptions, please check the Object: User section in OpenRTB Spec v2.6 or 2.5.

Attribute Type Description Status
id string Exchange-specific ID for the user. Recommended
buyeruid string Buyer-specific ID for the user as mapped by the exchange for the buyer. Recommended
geo object Location of the user’s home base defined by a Geo object. This is not necessarily their current location. Recommended
consent string When GDPR regulations are in effect, this attribute contains the Transparency and Consent Framework’s Consent String data structure. Recommended
keywords string Comma separated list of keywords, interests, or intent. Optional
kwarray string array Array of keywords about the user. Optional
customdata string Optional feature to pass bidder data that was set in the exchange’s cookie. Optional
data object array Additional user data. Each Data object represents a different data source. Optional
yob integer Year of birth as a 4-digit integer. (DEPRECATED) Deprecated
gender string Gender, where “M” = male, “F” = female, “O” = known to be other. (DEPRECATED) Deprecated

Regs Object

The Regs object includes any legal, governmental, or industry regulations applicable to the request as determined by the sender. For the full list of attributes and their descriptions, please check the Object: Regs section in OpenRTB Spec v2.6 or 2.5.

Attribute Type Description Status
coppa integer Flag indicating if this request is subject to the COPPA regulations established by the USA FTC, where 0 = no, 1 = yes.  Recommended
gdpr integer Flag that indicates whether or not the request is subject to GDPR regulations 0 = No, 1 = Yes, omission indicates Unknown.  Recommended
us_privacy string Communicates signals regarding consumer privacy under US privacy regulation. See US Privacy String specifications.  Recommended

Sample Banner Request Body

Expand to see the JSON data.

{
  "id": "unique-id-123",
  "imp": [
    {
      "id": "imp-001",
      "banner": {
        "format": [
          {
            "h": 100,
            "w": 320
          },
          {
            "h": 50,
            "w": 320
          }
        ],
        "w": 300,
        "h": 250,
        "topframe": 0,
        "instl": 0
      },
      "tagid": "tag-123",
      "bidfloor": 0.019,
      "bidfloorcur": "USD",
      "secure": 1,
      "rwdd": 0
    }
  ],
  "site": {
    "name": "example.com",
    "domain": "example.com",
    "page": "https://example.com/content/page",
    "id": "site-id-123",
    "publisher": {
      "domain": "example.com",
      "id": "publisher-id-123",
      "name": "Example Publisher",
      "ext": {}
    },
    "content": {
      "cat": [
        "IAB9"
      ],
      "ext": {
        "int_id": 591
      }
    }
  }
}
Updated on September 26, 2024