The Real-Time Bidding (RTB) Protocol specifies how your application can evaluate and bid on each impression as it becomes available in real time, in response to bid requests from an ad exchange. We'll show you how to handle requests, construct bids, and take full advantage of the protocol.
This guide explains how to start writing applications that bid for ad inventory in real time using Authorized Buyers.
Applications that interact with Authorized Buyers 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 under Authorized Buyers.
This provides RTB applications the information they need to determine both the optimal creative to deliver and the bid amount.
The supported RTB protocols specify the following scenario for interaction between a buyer application and Authorized Buyers:
- Google sends the buyer application a request that describes an impression
being auctioned. The request is in the form of a
BidRequestprotocol buffer. To learn how your application should interpret the bid request, see Processing the Request.
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
BidResponseprotocol 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.
Google waits a fixed amount of time for the buyer application to
respond. (The response deadline can range from 120 to 300 ms—check the
response_deadline_msfield in the bid request for the exact value.) All responses not received within the deadline 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:
- Authorized Buyers RTB
- Original Authorized Buyers-proprietary protocol.
- OpenRTB (protobuf and JSON)
bid.burlin OpenRTB 2.5+; supports
impression_tracking_urlextension in all versions.
In addition, Google's implementation of the OpenRTB protocol includes some extensions provided in a separate proto. See the Authorized Buyers OpenRTB Extensions guide for details.
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.