Get Started

This document explains how to start writing applications that bid for ad inventory in real time on the DoubleClick Ad Exchange.

Basics

Buyer applications that interact with Ad Exchange according to the supported RTB protocols can:

  • Evaluate any parameter of an impression available for auction prior to purchase.
  • Overlay their own targeting elements and data, including interest-based advertising or remarketing.
  • Use data that has been collected and stored in their own cookie space on the Ad Exchange.

This provides RTB applications the information they need to determine both the optimal creative to deliver and the bid amount.

Architecture diagram

The supported RTB protocols specify the following scenario for interaction between a buyer application and Ad Exchange:

  1. Google sends the buyer application a request that describes an impression being auctioned. The request is in the form of a BidRequest protocol buffer. To learn how your application should interpret the bid request, see Processing the Request.
  2. The buyer application sends Google a response that describes the bid and includes an HTML snippet for the associated creative. The response is in the form of a BidResponse protocol buffer. To learn how your application should create and return a response, see Building the Response.

    The application can customize how the creative is rendered in one of two ways—it may either include customizations in the HTML snippet directly or place macros in the snippet that Google will replace with appropriate values. For more information about these macros, see Specifying Macros.

  3. Google waits a fixed amount of time (100 ms) for the buyer application to respond. All responses not received within that amount of time will be ignored, and the auction will proceed using bids received from other applications.

When your application is complete, and you have tested it in-house, it must undergo a suite of standardized tests in which your Google account representative sends test requests to your servers. Once your application passes these tests, it is eligible for release. See Testing and Releasing Your Application.

RTB applications communicate through protocol buffers, an open-source format for representing and serializing structured information. Since protocol buffers are only supported in C++, Java, and Python, you must either use those languages directly or have an alternate solution for interpreting the requests without using those languages.

The RTB protocols are modified as new features are added and others become obsolete. Changes will be announced well before they take effect, which should give you sufficient time to remove any dependencies your application may have on fields that are scheduled for deprecation. For more information on handling deprecated fields, see Adapting as BidRequest Fields are Deprecated.

Select a protocol

We offer three protocols. When choosing which protocol to use, you should consider the following details about their implementation:

Ad Exchange RTB
Original Ad Exchange-proprietary protocol.
OpenRTB (protobuf and JSON)
Supports bid.burl in OpenRTB 2.5+; supports impression_tracking_url extension in all versions.
Doesn't support bid response feedback.

In addition, Google's implementation of the OpenRTB protocol includes some extensions provided in a separate proto. See the Ad Exchange OpenRTB Extensions guide for details.

Next steps

Browse the rest of the guides to learn how to:

  • Target ads based on information about the user, with Cookie Matching.
  • Pre-target impressions and use RTB publisher settings to filter the candidate ads for an impression, in configuring Targeting.
  • Monitor the performance of your application, or determine whether submitted creatives are approved, through the Reporting facility.
  • Help your application satisfy the latency restrictions of the RTB service by locating bidder instances close to multiple RTB data centers, by configuring Peering.
  • Meet the requirements for third-party ad serving.

Send feedback about...

Real-Time Bidding Protocol
Real-Time Bidding Protocol