Prebid Server

Prebid Server (PBS) is the open-source server-side header bidding engine maintained by Prebid.org, with Go and Java implementations. A host company runs it: PBS takes one OpenRTB request, fans it out to bidder adapters, and returns a merged response. This profile follows the documented /openrtb2/auction endpoint and the Go implementation, PBS-Go.

Direction and version

A client such as Prebid.js, a mobile SDK, or another server posts a request to the PBS /openrtb2/auction endpoint, and PBS returns one response that combines its bidders' bids.

OpenRTB 2.x JSON that accepts 2.5 and 2.6 fields; PBS moves 2.6 fields back to their 2.5 ext locations for bidders that only support 2.5. Prebid's own flags under ext.prebid are JSON true or false.

The RTBlint profile prebid-server checks requests and responses against the published contract.

Rules beyond the OpenRTB spec

  • PBS refuses wseat and bseat. A bidder only sees an impression that names it in imp.ext.prebid.bidder (or the deprecated imp.ext.{bidder}).
  • A stored request object in ext.prebid.storedrequest or imp.ext.prebid.storedrequest must carry a non-empty id. PBS merges the stored content into the request before the auction, so stored fields may be absent from the raw payload.
  • PBS-Go uses only the first currency in cur and drops the rest. A missing cur is treated as USD.
  • Multibid maxbids is clamped to 1 through 9. PBS-Go ignores multibid entries without maxbids or without a bidder selector.
  • ext.prebid.cache must ask for bids, vastxml, or both.
  • An alias in ext.prebid.aliases cannot map a bidder code to itself. Each key in ext.prebid.aliasgvlids must name a declared alias and carry a positive GVL ID.
  • Price granularity is a legacy name (low, med, medium, high, auto, dense) or a custom object with strictly increasing ranges and positive increments. PBS-Go accepts precision from 0 to 15.
  • bid.ext.prebid.type names the bid's media type. It must agree with bid.mtype and with a media object the impression offered.
  • PBS fills a missing Native request asset id from the asset's position in the array, so request assets may omit it.

Documented extensions

PathMeaning
imp.ext.prebid.bidderBidder parameters keyed by bidder code; it also selects which bidders get the impression.
ext.prebid.storedrequestID of a stored request that PBS merges into this one.
imp.ext.prebid.storedauctionresponseA stored response that replaces the live auction for the impression.
ext.prebid.targetingAd server targeting options such as price granularity and winner keys.
ext.prebid.cacheServer-side caching of bids or VAST XML.
ext.prebid.aliasesBidder aliases mapped to their adapter codes.
ext.prebid.multibidHow many bids a bidder may return per impression.
ext.prebid.currency.ratesCustom currency conversion rates for the request.
ext.prebid.channelIntegration channel, such as pbjs, with a required name.
user.ext.prebid.buyeruidsBidder user IDs keyed by bidder code.
bid.ext.prebid.typeMedia type of the bid: banner, video, native, or audio.
bid.ext.prebid.targetingAd server targeting keys PBS generated for the bid.

What the validator checks for this profile

Validate against this contract

Open the tester with the Prebid Server profile, or run:

rtblint validate --profile prebid-server request.json

Similar integrations