Bid request

Bid request

Bid Request is a snippet of code sent to advertisers, proposing to purchase an ad impression for a specific user on a specific advertising platform. It contains all the necessary data for displaying relevant advertising: user information (location and device type), publisher details (website category, content type), and ad parameters (format and dimensions). Every time a user visits a site with the installed code, the system automatically generates such a request.

Typically, a bid request uses JSON format, but it can also be transmitted in other formats: XML, Protobuf, or even through GET requests.

It is essential to distinguish a bid request from an ad request—they are different concepts. An ad request is generated each time a website requests an advertisement and determines the number of requests for impressions.

How Does It Work?

The process starts when a user visits a website with advertisements. At that moment, the system automatically generates a bid request containing data about the user and the parameters of the available ad impression.

The request is sent to an SSP, which forwards the information to potential buyers (usually various DSPs). Advertisers bid (bid response), after which the ad server determines the auction winner. The winner receives a notification (win notification) and provides their ad creative, which is then displayed in the ad slot.

A single page may have several ad slots, and a separate bid request is created for each slot. Thus, advertisers compete for each ad space independently.

The entire process usually takes no more than 100 milliseconds.

What Does It Contain?

What information is transmitted in the bid request? It may include the following data:

  • Cookies: Fragments of user data collected by the website via the browser.
  • Browsing History: Information about the websites visited by the user.
  • IP Address: A unique address of the device on the internet.
  • Device Identifier: A unique identifier of a specific device.
  • Demographic and Geolocation Data: User's age, gender, location, and other parameters.
  • Impression Time: The exact time of the ad request.
  • Platform Information: Number of available impressions, inventory data, and other parameters.
  • Tags: Pixels used to collect information about site visitors and their actions.
  • Application Information: For mobile apps—app ID, publisher, and content type.

It is important to note that not every request contains all the listed data types. For example, if location information is missing, an ad with geotargeting is unlikely to participate in the auction.

Advertising Laboratory

Example of Bid Request Contents

{
"id": "123456789", // Unique request identifier
"imp": [ // List of available ad placements
  {
    "id": "1", // Ad placement identifier
    "banner": {
      "w": 300, // Banner width
      "h": 250, // Banner height
      "format": [ // List of acceptable formats
        { "w": 300, "h": 250 },
        { "w": 728, "h": 90 }
      ]
    },
    "video": { // If this is a video ad
      "mimes": ["video/mp4", "video/webm"], // Supported formats
      "minduration": 5, // Minimum video duration (seconds)
      "maxduration": 30, // Maximum video duration (seconds)
      "protocols": [2, 3], // Supported protocols (e.g., VAST 2.0)
      "startdelay": 0 // Video starts without delay
    },
    "native": { // If this is a native ad
      "request": "{\"assets\":[{\"id\":1,\"required\":1,\"title\":{\"len\":25}}]}"
    },
    "bidfloor": 0.5, // Minimum bid for the impression
    "bidfloorcur": "USD" // Currency for the minimum bid
  }
],
"site": { // Information about the website hosting the ad
  "id": "site123",
  "name": "Example Site",
  "domain": "example.com",
  "cat": ["IAB1", "IAB1-2"], // Website categories according to IAB
  "page": "https://example.com/page1",
  "ref": "https://referrer.com", // Page referrer
  "keywords": "tech, gadgets, reviews" // Keywords
},
"device": { // Information about the user’s device
  "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0 Safari/537.36", // User-Agent
  "ip": "192.168.1.1", // User’s IP address
  "geo": { // Geolocation data
    "lat": 37.7749, // Latitude
    "lon": -122.4194, // Longitude
    "country": "USA",
    "region": "CA",
    "city": "San Francisco",
    "zip": "94103"
  },
  "devicetype": 2, // Device type (1 — mobile, 2 — desktop)
  "os": "Windows",
  "osv": "10", // OS version
  "make": "Dell",
  "model": "XPS 13"
},
"user": { // Information about the user
  "id": "user123", // User ID
  "buyeruid": "buyer456", // Unique buyer identifier
  "yob": 1990, // Year of birth
  "gender": "M", // Gender
  "keywords": "tech, gaming" // User interests
},
"bcat": ["IAB25"], // Blocked ad categories
"badv": ["competitor.com"], // Blocked advertiser domains
"regs": { // Regulatory constraints
  "coppa": 0 // Indicator for children’s audience (0 — no, 1 — yes)
},
"source": { // Request source
  "fd": 1, // Direct request (1 — yes, 0 — no)
  "tid": "trans123" // Transaction ID
},
"ext": { // Additional parameters
  "debug": 1 // Is debug mode enabled?
}
}
The Race for Ad Space

Cookies!

  1. What are cookies and their role in advertising?

    Cookies are small fragments of data that a website saves in the user’s browser. They allow websites to "remember" user actions and preferences. In programmatic advertising, cookies are used to identify users and personalize ads.

  2. Collecting and storing data through cookies

    When a user visits a website:

    • The website sets a unique identifier in the cookies. For instance, it could look like cookie_id=abcdef123456.
    • During user interaction with the site, additional data is added to the cookies:
      • History of visited pages
      • User interests (via analytics systems or trackers)
      • Technical specifications of the device

    This data becomes the basis for ad targeting.

  3. How are cookies transmitted in a bid request?

    When a user visits a site with an ad code:

    • Request Initialization: The system creates a bid request to propose the ad slot.
    • Extracting Data from Cookies: The SSP retrieves data from the user’s browser cookies.
    • Adding Data to the Request Structure: Data from the cookies is transmitted in a JSON structure. For example:
    {
          "user": {
              "id": "user123",
              "buyeruid": "buyer456",
              "cookie": "abcdef123456",
              "keywords": "sports, travel",
              "customdata": "session_id_7890"
          },
          "device": {
              "ip": "192.168.1.1",
              "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)"
          }
    }
  4. Here, the cookie field contains the unique user identifier assigned through cookies.

  5. How does the DSP use this data?

    When the bid request reaches the DSP:

    • Data Matching: The DSP checks for matches of the transmitted cookie identifier in its database. If the user has previously been observed by the system, the DSP can use their history.
    • Personalizing Proposals: Based on cookie data, the DSP makes decisions about bidding and creative selection. For instance, it may show retargeting ads for a product the user viewed or added to their cart.
  6. Limitations
    • Expiration of Cookies: Cookies have a limited lifespan—usually 30 days. After expiration, they can no longer be used.
    • Cookie Blocking: Modern browsers like Safari and Firefox restrict the use of third-party cookies, making data transmission more challenging.
    • Regulations: Under GDPR and CCPA, explicit user consent is required for data use. SSPs and DSPs must ensure that only user-approved data is used in bid requests.
  7. The Future Without Cookies

    As third-party cookies are gradually phased out:

    • Contextual Targeting: Using page content data instead of user data.
    • Universal Identifiers: Solutions like Unified ID 2.0 allow user identification based on first-party data (e.g., hashed email).
    • Machine Learning: Predicting user interests and behavior without cookies.