Back to Bidders

Prebid Server


Bidder Code prebidServer Member no
Media Types display, video GDPR TCF Support yes
User IDs none USP/CCPA Support no
Supply Chain Support no COPPA Support no
Demand Chain Support no Safeframes OK check with bidder
Supports Deals check with bidder Prebid.js Adapter yes
IAB GVL ID check with bidder Prebid Server Adapter no
Floors Module Support no First Party Data Support check with bidder

"Send All Bids" Ad Server Keys

These are the bidder-specific keys that would be targeted within GAM in a Send-All-Bids scenario. GAM truncates keys to 20 characters.
hb_pb_prebidServer hb_bidder_prebidServ hb_adid_prebidServer
hb_size_prebidServer hb_source_prebidServ hb_format_prebidServ
hb_cache_host_prebid hb_cache_id_prebidSe hb_uuid_prebidServer
hb_cache_path_prebid hb_deal_prebidServer


The Prebid Server Adapter is a meta-adapter. It’s not an actual bidder, but rather a way to get a batch of bids from other bidders with one request. A request for the set of auctions is sent to Prebid Server, which performs all the auctions server side (S2S), responding in time for Prebid.js to send the results to the ad server. This lightens the performance load on the user’s device.

Bid Params

Bid params are sourced from the adapter configurations set for client side. These do not need to change for Prebid Server.

Errors in bidder parameters will cause Prebid Server to reject the entire request. The Prebid Server philosophy is to avoid silent failures – we assume you will test changes, and that it will be easier to notice a 4xx error coming from the server than a silent failure where it skips just the bad parameter.


To enable prebid server, set the following configuration.

    s2sConfig: {
        accountId : '12345',
        bidders : ['appnexus','pubmatic', 'rubicon'],
        defaultVendor: 'appnexus',
        timeout: 300

To use multiple prebid servers, just define s2sConfig as an array. The same bidder cannot be set in both configs. For example:

    s2sConfig: [
        accountId: '12345',
        bidders: ['appnexus','rubicon'],
        defaultVendor: 'appnexus',
        timeout: 300,
        accountId: '678910',
        bidders: ['pubmatic'],
        defaultVendor: 'rubicon',
        timeout: 300,

Configuration options

Field Type Required? Description
accountId String yes Prebid Server account ID.
bidders Array[String] yes List of bidder codes; must have been enabled during Prebid.js build.
defaultVendor String no Automatically includes all following options in the config with vendor’s default values. Individual properties can be overridden by including them in the config along with this setting.
enabled Boolean no Enables S2S; default: false (true when defaultVendor is set).
endpoint String no Set the endpoint. For example:
timeout Number no Bidder timeout, in milliseconds; default: 1000.
syncEndpoint String no Configures the user-sync endpoint. Highly recommended.
adapter String no Adapter code; default: "prebidServer".
secure Integer no Override Prebid Server’s determination of whether the request needs secure assets. Set to 1 to force secure assets on the response, or 0 for non-secure assets.
adapterOptions Object no Arguments will be added to resulting OpenRTB payload to Prebid Server.
extPrebid Object no Arguments will be added to resulting OpenRTB payload to Prebid Server.


Video (Outstream): Note that currently, outstream video rendering must be configured by the publisher. In the adUnit, a renderer object must be defined, which includes a url pointing to the video rendering script, and a render function for creating the video player. See for more information.

var adUnits = [{
    code: 'div-gpt-ad-1460505748561-0',
    mediaTypes: {
        video: {
            playerSize: [640, 480],
            context: 'outstream',
            mimes: ['video/mp4'],
            protocols: [1, 2, 3, 4, 5, 6, 7, 8],
            playbackmethod: [2],
            skip: 1
    bids: [
            bidder: 'appnexus',
            params: {
                placementId: 13232392

    renderer: {
        url: '',
        render: function (bid) {
            adResponse = {
                ad: {
                    video: {
                        content: bid.vastXml,
                        player_height: bid.playerHeight,
                        player_width: bid.playerWidth
            // push to render queue because ANOutstreamVideo may not be loaded yet.
            bid.renderer.push(() => {
                    targetId: bid.adUnitCode, // target div id to render video.
                    adResponse: adResponse

Back to Bidders