// Protocol version: v.333
import "google/protobuf/struct.proto";
// This is the message that Google uses to request bids. A BidRequest
// includes the ad slot from a single impression.
message BidRequest {
// Unique request id generated by Google. This is 16 bytes long.
required bytes id = 2;
// -----------------------------------------------------------
// This section lists information that we know about the user.
//
// The first 3 bytes of the IP address in network byte order for IPv4, or the
// first 6 bytes for IPv6. Note that the number and position of the bytes
// included from IPv6 addresses may change later.
optional bytes ip = 4;
// Reasons for special treatment of user data (google_user_id,
// hosted_match_data, IDFA, etc).
enum UserDataTreatment {
// The current request should be treated as child-directed for purposes of
// the Children's Online Privacy Protection Act. See
// https://support.google.com/admanager/answer/4442399 for more information.
TAG_FOR_CHILD_DIRECTED_TREATMENT = 0;
}
// Deprecated. This will be removed in March 2024.
// When user_data_treatment is set, the user's cookie/id data is cleared from
// the request and is not sent in callout.
// The impacted fields are:
// * google_user_id
// * hosted_match_data
// * mobile.encrypted_advertising_id
// * mobile.encrypted_hashed_idfa
// * session_id
repeated UserDataTreatment user_data_treatment = 49 [deprecated = true];
// The Google ID for the user. This field is the unpadded web-safe base64
// encoded version of a binary cookie id. See the "Base 64 Encoding with URL
// and Filename Safe Alphabet" section in RFC 3548 for encoding details. This
// field may be the same as the Google ID returned by the cookie matching
// service. Not set if there is one or more user_data_treatment value.
optional string google_user_id = 21;
// The version number of the google_user_id. We may sometimes change the
// mapping from cookie to google_user_id. In this case the version will be
// incremented.
optional uint32 cookie_version = 20;
// The time in seconds since the google_user_id was created.
// This number may be quantized.
optional int32 cookie_age_seconds = 31;
// Match data stored for this google_user_id through the cookie matching
// service. If a match exists, then this field holds the decoded data that
// was passed in the google_hm parameter.
// Not set if there is one or more user_data_treatment value.
optional bytes hosted_match_data = 37;
// Represents a short-lived user session on CTV/OTT devices,
// with a maximum session duration of 6 hours.
// The use of session_id is never allowed for ads personalization.
// session_id may only be used for frequency capping, competitive exclusions
// or related purposes.
optional string session_id = 65;
// Time in seconds since the first ad request in a given app or site session.
// The session is reset after a sufficiently long break in user activity.
// Currently, the field is only supported for mobile app requests.
optional int32 session_duration_seconds = 83;
// A pseudonymized identifier created and controlled by the publisher for use
// in frequency capping, audience segmentation and targeting, and sequential
// ad rotation. See https://support.google.com/admanager/answer/2880055.
optional string publisher_provided_id = 79;
// Publisher first-party identifier scoped to a single site, app or vendor.
message PublisherFirstPartyId {
// Specifies how an ID is scoped and the type of requests it is used with.
enum IdType {
// A default value that should not be used.
UNKNOWN = 0;
// A site-scoped cookie for requests from web browsers.
SITE_SCOPED_COOKIE = 1;
}
// The type of the ID. This specifies how it is scoped and the type of
// requests it is used with.
optional IdType id_type = 1;
// The value of the ID.
optional string id = 2;
}
optional PublisherFirstPartyId publisher_first_party_id = 85;
// A string that identifies the browser and type of device that sent the
// request. Certain data may be redacted or replaced.
optional string user_agent = 6;
// Information about privacy treatments that apply to an ad opportunity
// offered through this request.
message PrivacyTreatments {
// Generalization that can be applied to the BidRequest.ip field.
enum IpGeneralization {
// The BidRequest.ip field is truncated, /24 for IPv4 and /48 for IPv6.
// IPv4 addresses are truncated to 3-byte strings, representing the
// first three octets of an IP address. IPv6 addresses are truncated to
// 6-byte strings, representing the first 6 octets of an IP address.
IP_TRUNCATED = 0;
// The BidRequest.ip field is redacted.
IP_REDACTED = 2;
}
// Generalization for the BidRequest.ip field.
optional IpGeneralization ip = 1;
// Generalization that can be applied to the user_agent and user_agent_data
// fields.
enum UserAgentGeneralization {
// The user_agent and user_agent_data fields are both provided in full.
USER_AGENT_FULL = 0;
// The user_agent and user_agent_data fields are generalized, which can
// include limiting browser and OS version information to major versions
// only and other changes to protect user privacy.
USER_AGENT_COARSE = 1;
}
// Generalization that was applied to the user_agent and user_agent_data
// fields, if any.
optional UserAgentGeneralization user_agent = 2;
// Specifies the reasons that ads returned in response to this request
// should not be personalized. This signal does not reflect user decisions
// on surfaces including iOS App Tracking Transparency
// (https://developer.apple.com/documentation/apptrackingtransparency) or
// Android advertising ID
// (https://support.google.com/googleplay/android-developer/answer/6048248).
// See BidRequest.device.limit_ad_tracking and
// BidRequest.device.app_tracking_authorization_status fields for more
// information.
enum NonPersonalizedAdsReason {
UNKNOWN = 0;
// The publisher has declared that this request should serve
// non-personalized ads independent of other signals.
// https://support.google.com/admanager/answer/9005435#npa
PUBLISHER_DECLARED_NPA = 1;
// The publisher has requested restricted data processing for this
// request. https://support.google.com/authorizedbuyers/answer/11121285
RESTRICT_DATA_PROCESSING = 2;
// The user has opted out of ads personalization.
USER_OPT_OUT = 3;
}
repeated NonPersonalizedAdsReason non_personalized_ads_reason = 6 [packed =
true];
// True if publisher grants the permission to allow the bidder to use bid
// request data to build user profiles for uses such as interest-based ads
// and remarketing. To use this data to build user profiles, a bidder must
// also win a given impression.
// Learn more about data collection controls:
// https://support.google.com/admanager/answer/11956152
optional bool allow_user_data_collection = 7;
// Reasons why on-device storage access could be restricted during the
// delivery of a winning ad.
enum DeviceStorageRestrictionReason {
DEVICE_STORAGE_RESTRICTION_UNKNOWN = 0;
// This request is subject to user consent requirements to allow for
// device storage access for advertising use cases such as ads
// measurement, frequency capping, or profiling, but consent was
// insufficient or not provided.
INSUFFICIENT_USER_CONSENT = 1;
}
// Indicates the reason why access of local device storage during winning ad
// rendering and measurement is restricted.
optional DeviceStorageRestrictionReason device_storage_restriction_reason =
8;
}
optional PrivacyTreatments privacy_treatments = 71;
// Data segments that describe the content or audience.
message SegmentData {
// The Google assigned ID of the data provider. For the list of data
// providers, see
// https://storage.googleapis.com/adx-rtb-dictionaries/data_providers.txt.
optional string id = 5;
// Exchange-specific name for the signal provider.
optional string name = 1;
// Segment objects contain segment IDs that can be used with the taxonomy
// type to access first party data.
message Segment {
// ID of the data segment specific to the signal provider.
optional string id = 1;
}
repeated Segment segment = 2;
// Identifies the taxonomy that the segment IDs belong to.
enum TaxonomyType {
TAXONOMY_TYPE_UNKNOWN = 0;
// https://github.com/InteractiveAdvertisingBureau/Taxonomies/blob/main/Audience%20Taxonomies/Audience%20Taxonomy%201.1.tsv
IAB_AUDIENCE_1_1 = 4;
// https://github.com/InteractiveAdvertisingBureau/Taxonomies/blob/main/Content%20Taxonomies/Content%20Taxonomy%202.2.tsv
IAB_CONTENT_2_2 = 6;
// https://github.com/InteractiveAdvertisingBureau/Taxonomies/blob/main/Content%20Taxonomies/Content%20Taxonomy%203.0.tsv
IAB_CONTENT_3_0 = 7;
}
// The taxonomy in use for segment IDs.
optional TaxonomyType type = 3;
}
// Data segments for Publisher Provided Signals:
// https://support.google.com/admanager/answer/12451124
repeated SegmentData segment_data = 75;
// Structured user agent information, which can be used when a client
// supports User-Agent Client Hints: https://wicg.github.io/ua-client-hints/
//
// Note: When available, fields are sourced from Client Hints HTTP headers
// or equivalent JavaScript accessors from the NavigatorUAData interface.
// For agents that have no support for User-Agent Client Hints, an exchange
// can also extract information from the parsed User-Agent header, so this
// object can always be used as the source of the user agent information.
message UserAgent {
// Identifies a device's browser or similar software component, and the
// user agent's execution platform or operating system.
message BrandVersion {
// A brand identifier, for example, "Chrome" or "Windows". The value may
// be sourced from the User-Agent Client Hints headers, representing
// either the user agent brand (from the Sec-CH-UA-Full-Version header)
// or the platform brand (from the Sec-CH-UA-Platform header).
optional string brand = 1;
// A sequence of version components, in descending hierarchical order
// (major, minor, micro, ...).
repeated string version = 2;
}
// Each BrandVersion object identifies a browser or similar software
// component. Exchanges should send brands and versions derived from
// the Sec-CH-UA-Full-Version-List header.
repeated BrandVersion browsers = 8;
// Identifies the user agent's execution platform / OS. Exchanges should
// send a brand derived from the Sec-CH-UA-Platform header, and version
// derived from the Sec-CH-UAPlatform-Version header.
optional BrandVersion platform = 2;
// True if the agent prefers a "mobile" version of the content if
// available, meaning optimized for small screens or touch input. False
// if the agent prefers the "desktop" or "full" content. Exchanges should
// derive this value from the Sec-CH-UAMobile header.
optional bool mobile = 3;
// Device's major binary architecture, for example, "x86" or "arm".
// Exchanges should retrieve this value from the Sec-CH-UA-Arch header.
optional string architecture = 4;
// Device's bitness, for example, "64" for 64-bit architecture. Exchanges
// should retrieve this value from the Sec-CH-UA-Bitness header.
optional string bitness = 9;
// Device model. Exchanges should retrieve this value from the
// Sec-CH-UAModel header.
optional string model = 5;
// Possible sources for User-Agent data. In the case of Client Hints headers
// the source also distinguishes between requests that are restricted to
// the low-entropy headers and requests that don't have that restriction;
// see wicg.github.io/client-hints-infrastructure/#low-entropy-hint-table.
enum Source {
UNKNOWN_SOURCE = 0;
// User-Agent Client Hints (only low-entropy headers were available).
CLIENT_HINTS_LOW_ENTROPY = 1;
// User-Agent Client Hints (with high-entropy headers available).
CLIENT_HINTS_HIGH_ENTROPY = 2;
// Parsed from User-Agent header.
USER_AGENT_STRING = 3;
}
// The source of data for the User Agent information.
optional Source source = 10;
}
// Structured user agent information. If both BidRequest.ua and
// BidRequest.sua are present, BidRequest.sua should be considered the
// more accurate representation of the device attributes. This is because
// BidRequest.ua may contain a frozen or reduced user agent string.
optional UserAgent user_agent_data = 63;
// The billing address country of the publisher. This may be different from
// the detected country of the user in geo_criteria_id or the hosting country
// of the website. For a complete list of country codes, refer to
// https://developers.google.com/google-ads/api/data/codes-formats#country_codes
optional string publisher_country = 55;
// The ID of the host publisher. When populated, indicates that the host
// publisher participated in revenue sharing, and the ID can be used to
// authorize ads.txt.
optional string host_publisher_id = 73;
// The domain of the partner (of the site/app owner) with ownership
// of some portion of ad inventory on the site/app. The partner's ads.txt or
// app-ads.txt file will be hosted here. More detail at
// http://iabtechlab.com/wp-content/uploads/2021/03/ctv-app-ads-explainer-guide.pdf
optional string inventory_partner_domain = 72;
// Location of the end user. Uses a subset of the codes used in the Google
// Ads API. See the geo-table.csv table in the technical documentation for a
// list of IDs. The geo_criteria_id field replaces the deprecated country,
// region, city, and metro fields.
// It is recommended that BidRequest.geo be used instead of this field.
// See Geotargeting Guide:
// https://developers.google.com/authorized-buyers/rtb/geotargeting
optional int32 geo_criteria_id = 39;
// The user's approximate geographic location. All location information is
// IP geolocation-derived. The lat/lon fields may be a reference position
// (for example, centroid) for the IP geolocation-derived location that's also
// carried by the other fields (for example, a city), and accuracy will be the
// radius of a circle with the approximate area of that location. Location and
// its accuracy will be fuzzified as necessary to protect user privacy. See
// Geotargeting Guide:
// https://developers.google.com/authorized-buyers/rtb/geotargeting
message Geo {
// Latitude from -90.0 to +90.0, where negative is south.
optional double lat = 1;
// Longitude from -180.0 to +180.0, where negative is west.
optional double lon = 2;
// Country using ISO-3166-1 Alpha-3.
optional string country = 3;
// Region code using ISO-3166-2; 2-letter state code if USA.
optional string region = 4;
// Google metro code; similar to but not exactly Nielsen DMAs.
optional string metro = 6;
// City using United Nations Code for Trade & Transport Locations.
// (https://www.unece.org/cefact/locode/service/location.htm).
optional string city = 7;
// Zip/postal code.
optional string zip = 8;
// Estimated location accuracy in meters.
optional int32 accuracy = 11;
// Local time as the number +/- of minutes from UTC.
optional int32 utcoffset = 10;
}
optional Geo geo = 62;
// Deprecated. This field will be removed in Q3 2023. It is recommended that
// BidRequest.geo.zip be used instead. See Geotargeting Guide:
// https://developers.google.com/authorized-buyers/rtb/geotargeting
// Detected postal code of the appropriate type for the country of the end
// user (for example, zip code if the country is "US"). The postal_code_prefix
// field is set when accuracy is too low to imply a full code, otherwise the
// postal_code field is set.
optional string postal_code = 33 [deprecated = true];
// Deprecated. This field will be removed in Q3 2023. It is recommended that
// BidRequest.geo.zip be used instead. See Geotargeting Guide:
// https://developers.google.com/authorized-buyers/rtb/geotargeting
optional string postal_code_prefix = 34 [deprecated = true];
// Deprecated. This field will be removed in Q3 2023. It is recommended that
// BidRequest.geo is used instead. See Geotargeting Guide:
// https://developers.google.com/authorized-buyers/rtb/geotargeting
// Encrypted hyperlocal targeting signals.
optional bytes encrypted_hyperlocal_set = 40 [deprecated = true];
// Coarse geolocation information approximated based on the IP address of the
// device the ad request originated from.
message Hyperlocal {
// A location on the Earth's surface.
message Point {
optional float latitude = 1;
optional float longitude = 2;
}
// The device can be at any point inside the geofence polygon defined by a
// list of corners. Currently, the polygon is always a parallelogram with 4
// corners.
repeated Point corners = 1;
}
message HyperlocalSet {
// This field currently contains at most one hyperlocal polygon.
repeated Hyperlocal hyperlocal = 1;
// The approximate geometric center of a geofence area. It is calculated
// exclusively based on the geometric shape of the geofence area and in no
// way indicates the mobile device's actual location within the geofence
// area. If multiple hyperlocal polygons are specified above then
// center_point is the geometric center of all hyperlocal polygons.
optional Hyperlocal.Point center_point = 2;
}
// Deprecated. This field will be removed in Q3 2023. It is recommended that
// BidRequest.geo is used instead. See Geotargeting Guide:
// https://developers.google.com/authorized-buyers/rtb/geotargeting
// Unencrypted version of encrypted_hyperlocal_set. This field is only set
// when using an SSL connection.
optional HyperlocalSet hyperlocal_set = 53 [deprecated = true];
// Deprecated. This field will be removed in Q3 2023. It is recommended that
// BidRequest.geo is used instead. See Geotargeting Guide:
// https://developers.google.com/authorized-buyers/rtb/geotargeting
// The offset of the user's time from GMT in minutes. For example, GMT+10 is
// timezone_offset = 600.
optional int32 timezone_offset = 25 [deprecated = true];
// This field is not populated by default. We recommend that bidders instead
// store and look up list ids using either google_user_id or hosted_match_data
// as keys.
message UserList {
// The user list id.
optional int64 id = 1;
// The time in seconds since the user was added to the list.
optional int32 age_seconds = 2;
}
repeated UserList user_list = 32;
// -----------------------------------------------------------
// This section lists information that we know about the web page or mobile
// application where the impression originates.
//
// The publisher ID as defined by the publisher code suffix of
// the web property code. For instance, "pub-123" is the publisher code of web
// property code "ca-pub-123" (ca- is the product specific prefix of the web
// property).
optional string publisher_id = 56;
// Deprecated. This field will be removed in Q2 2024.
// The seller network id. See seller-network-ids.txt file in the technical
// documentation for a list of ids. This is only set if the site is not
// anonymous and the publisher allows site targeting.
optional int32 seller_network_id = 41 [deprecated = true];
// Id for the partner that provides this inventory. This is only set when
// seller_network_id is also set and further partner information beyond the
// seller_network_id is also available. The value of the partner_id is not
// meaningful beyond providing a stable identifier.
optional fixed64 partner_id = 52;
// The URL of the page with parameters removed. This is only set if the
// publisher allows site targeting. This always starts with a protocol (either
// http or https).
optional string url = 11;
// Indicates that the request is using semi-transparent branding,
// which means only a truncated version of the request URL will
// be provided. This decision is made by the publisher, see
// https://support.google.com/admanager/answer/4584891#urls for context.
optional bool is_semi_transparent_request = 67;
// Detected user languages, based on the language of the web page, the browser
// settings, and other signals. The order is arbitrary. The codes are 2 or 5
// characters and are documented at
// https://developers.google.com/google-ads/api/data/codes-formats#languages
repeated string detected_language = 12;
// One or more detected verticals for the page as determined by Google.
message Vertical {
// The vertical id. See the publisher-verticals.txt file in the technical
// documentation for a list of ids.
required int32 id = 1;
// Weight for this vertical, in the (0.0, 1.0] range. More relevant
// verticals have higher weights.
required float weight = 2;
}
// Unordered list of detected content verticals. See the
// publisher-verticals.txt file in the technical documentation for a list of
// ids.
repeated Vertical detected_vertical = 13;
// List of detected content labels. See content-labels.txt file in the
// technical documentation for a list of ids.
repeated int32 detected_content_label = 26 [packed = true];
// The production quality of the content. See
// https://github.com/InteractiveAdvertisingBureau/AdCOM/blob/master/AdCOM%20v1.0%20FINAL.md#list--production-qualities-
// for details.
enum ProductionQuality {
QUALITY_UNKNOWN = 0;
// Content that is usually created or produced by media and entertainment
// companies using professional-grade equipment, talent, and production
// crews that hold or maintain the rights for distribution and syndication.
PROFESSIONAL = 1;
// Consumer or user-generated content that has professional or industrial
// qualities (e.g. shot with professional-grade equipment, using
// professional talent, etc.).
PROSUMER = 2;
// Publicly available video content that is created or produced by
// end users.
USER_GENERATED = 3;
}
// The production quality of the content where an ad can be shown, as
// determined by the publisher.
optional ProductionQuality production_quality = 80 [default =
QUALITY_UNKNOWN];
// The rating of the content. See
// https://support.google.com/admanager/answer/12451124#content-rating for
// details.
enum ContentRating {
RATING_UNKNOWN = 0;
// Content suitable for general audiences.
GENERAL_AUDIENCES = 1;
// Content suitable for most audiences with parental guidance.
PARENTAL_GUIDANCE = 2;
// Content suitable for teen and older audiences.
TEEN = 3;
// Content suitable only for mature audiences.
MATURE_AUDIENCES = 4;
}
// The rating of the content where an ad can be shown.
optional ContentRating content_rating = 84 [default = RATING_UNKNOWN];
// This represents a unique ID for the overall query. In the event
// that there are multiple callouts for a query, all callout requests for that
// query will contain the same google_query_id.
optional string google_query_id = 59;
// The type of auction that will be run for this query.
enum AuctionType {
UNKNOWN_AUCTION_TYPE = 0;
FIRST_PRICE = 1;
SECOND_PRICE = 2;
FIXED_PRICE = 3;
}
optional AuctionType auction_type = 60 [default = SECOND_PRICE];
// Information about the device.
message Device {
// The type of device on which the ad will be shown.
enum DeviceType {
UNKNOWN_DEVICE = 0;
HIGHEND_PHONE = 1;
TABLET = 2;
// Desktop or laptop devices.
PERSONAL_COMPUTER = 3;
// Both connected TVs (that is, smart TVs) and connected devices
// (such as Roku and Apple TV).
CONNECTED_TV = 4;
GAME_CONSOLE = 5;
SET_TOP_BOX = 6;
}
optional DeviceType device_type = 1 [default = UNKNOWN_DEVICE];
// The platform of the device. Examples: android, iphone, palm
optional string platform = 2 [default = ""];
// The brand of the device (for example, "Apple" or "Samsung").
optional string brand = 3 [default = ""];
// Device model (for example, "pixel 7 pro"). For iPhone/iPad, this
// field contains Apple's model identifier string (such as "iPhone12,1" and
// "iPad13,8") if available. Otherwise this field contains the generic
// model (either "iphone" or "ipad").
optional string model = 4 [default = ""];
// Contains the OS version of the platform. For instance, for Android 2,
// major=2, minor=0. For iPhone 3.3.1, major=3 and minor=3.
message OsVersion {
optional int32 major = 1 [default = -1];
optional int32 minor = 2 [default = -1];
optional int32 micro = 3 [default = -1];
}
// The OS version; for example, 2 for Android 2.1, or 3.3 for iOS 3.3.1.
optional OsVersion os_version = 5;
// Unique identifier for the mobile carrier if the device is connected to
// the internet through a carrier (as opposed to through WiFi). To look up
// carrier name from carrier ID, refer to:
// https://storage.googleapis.com/adx-rtb-dictionaries/mobile-carriers.csv.
optional int64 carrier_id = 6 [default = 0];
// The width of the device screen in pixels.
optional int32 screen_width = 7 [default = 0];
// The height of the device screen in pixels.
optional int32 screen_height = 8 [default = 0];
// Used for high-density devices (for example, iOS retina displays). A
// non-default value indicates that the nominal screen size (with pixels as
// the unit) does not describe the actual number of pixels in the screen.
// For example, nominal width and height may be 320x640 for a screen that
// actually has 640x1280 pixels, in which case screen_width=320,
// screen_height=640, and screen_pixel_ratio_millis=2000, since each axis
// has twice as many pixels as its dimensions would indicate.
optional int32 screen_pixel_ratio_millis = 9 [default = 0];
enum ScreenOrientation {
UNKNOWN_ORIENTATION = 0;
PORTRAIT = 1;
LANDSCAPE = 2;
}
// The screen orientation of the device when the ad request is sent.
optional ScreenOrientation screen_orientation = 10 [default =
UNKNOWN_ORIENTATION];
// Hardware version of the device. For iPhone/iPad, this field contains
// Apple's model identifier string (such as "iPhone12,1" and "iPad13,8") if
// available.
optional string hardware_version = 11;
// "Limit Ad Tracking" is a commercially endorsed signal based on the
// operating system or device settings, where `false` indicates that
// tracking is unrestricted and `true` indicates that tracking must be
// limited per commercial guidelines.
//
// This signal reflects user decisions on surfaces including iOS App
// Tracking Transparency:
// https://developer.apple.com/documentation/apptrackingtransparency
// See also lmt and App Tracking Transparency guidance:
// https://github.com/InteractiveAdvertisingBureau/openrtb/blob/master/extensions/community_extensions/skadnetwork.md#dnt-lmt-and-app-tracking-transparency-guidance
// and Android advertising ID:
// https://support.google.com/googleplay/android-developer/answer/6048248
optional bool limit_ad_tracking = 12;
// The possible app tracking authorization statuses that could be applicable
// for bid requests from iOS devices. For more information about iOS's app
// tracking authorization status, see:
// https://developer.apple.com/documentation/apptrackingtransparency/attrackingmanager/authorizationstatus
enum AuthorizationStatus {
// User has not yet received a request to authorize access to app-related
// data that can be used for tracking the user or the device.
NOT_DETERMINED = 0;
// Authorization to access app-related data that can be used for tracking
// the user or the device is restricted.
RESTRICTED = 1;
// User denies authorization to access app-related data that can be used
// for tracking the user or the device.
DENIED = 2;
// User authorizes access to app-related data that can be used for
// tracking the user or the device.
AUTHORIZED = 3;
}
// This field is only populated for iOS devices. Indicates the app tracking
// authorization status. This value is retrieved from ATTrackingManager
// and provided as is. For more information about iOS's app tracking
// authorization status, see:
// https://developer.apple.com/documentation/apptrackingtransparency/attrackingmanager/authorizationstatus
optional AuthorizationStatus app_tracking_authorization_status = 13;
// Possible types of the device's network connection.
enum ConnectionType {
CONNECTION_UNKNOWN = 0;
// Ethernet; Wired Connection
ETHERNET = 1;
// WiFi
WIFI = 2;
// Mobile Network - Unknown Generation
CELL_UNKNOWN = 3;
// Mobile Network - 2G
CELL_2G = 4;
// Mobile Network - 3G
CELL_3G = 5;
// Mobile Network - 4G
CELL_4G = 6;
// Mobile Network - 5G
CELL_5G = 7;
}
// The type of network to which the user's device is connected.
//
// For 5G connection type, we send CELL_4G instead of CELL_5G.
optional ConnectionType connection_type = 15 [default = CONNECTION_UNKNOWN];
}
optional Device device = 54;
// Additional key-value attributes. Currently unused.
message KeyValue {
optional string key = 1;
optional string value = 2;
}
repeated KeyValue key_value = 38;
// Information for ad queries coming from mobile devices. A mobile device is
// either a mobile phone or a tablet. This is present for ad queries both from
// mobile devices browsing the web and from mobile apps.
message Mobile {
// If true, then this request is from a mobile application. For branded
// requests, app_id will also be filled in. If the request is from a mobile
// web page contained inside an app, is_app will still be false, but app_id
// could be filled in with the app identifier. For SDK-less requests (mostly
// from connected TVs), this will be true if an app ID is provided directly
// in the request.
optional bool is_app = 7 [default = false];
// The identifier of the mobile app when this ad query comes from a mobile
// app, or from a mobile web page contained inside an app. If the app was
// downloaded from the Apple iTunes app store, then this is the app-store
// id, for example, 343200656. For Android devices, this is the fully
// qualified package name, for example, com.rovio.angrybirds. For Windows
// devices it's the App ID, for example,
// f15abcde-f6gh-47i0-j3k8-37l93817mn3o. For SDK-less requests (mostly from
// connected TVs), the app ID provided by the publisher directly in the
// request.
optional string app_id = 6;
// If true, then this is a mobile full screen ad request.
optional bool is_interstitial_request = 10 [default = false];
// This field contains the IDs of categories to which the current mobile app
// belongs. This field will be empty if is_app is false. The mapping between
// mobile apps and categories is defined by the Google Play Store for
// Android apps, or the Apple iTunes Store for iOS apps. To look up category
// name from category ID, refer to
// https://developers.google.com/google-ads/api/data/codes-formats#mobile_app_categories
repeated int32 app_category_ids = 11;
// For a mobile web request, this field indicates whether the page is
// optimized for mobile browsers on high-end mobile phones.
optional bool is_mobile_web_optimized = 17 [default = false];
// Indicates whether a mobile app bid request is for an app open ad.
// See App open ad guidance at
// https://support.google.com/admob/answer/9341964 for more information.
optional bool is_app_open_ad = 36 [default = false];
// This field is used for advertising identifiers for
// 1) iOS devices (This is called Identifier for Advertising, or IDFA, as
// described at https://support.google.com/authorizedbuyers/answer/3221407),
// 2) Android devices,
// 3) Roku devices,
// 4) Microsoft Xbox devices,
// 5) Amazon devices (for example, Amazon Fire).
//
// When the encrypted_advertising_id is an IDFA, the plaintext after
// decrypting the ciphertext is the IDFA (16 byte UUID) returned by iOS's
// [ASIdentifierManager advertisingIdentifier]. For encrypted_hashed_idfa,
// the plaintext is the 16 byte MD5 hash of the IDFA. Only one of the two
// fields will be available, depending on the version of the SDK making the
// request. Later SDKs provide unhashed values. They are not set if there is
// one or more user_data_treatment value in the BidRequest.
optional bytes encrypted_advertising_id = 20;
// Unencrypted version of encrypted_advertising_id. This field is only set
// when using an SSL connection. This field is a 16 byte UUID (binary form)
// or a 32 byte alphanumeric id (such as Samsung ID).
optional bytes advertising_id = 27;
optional bytes encrypted_hashed_idfa = 21;
// Unencrypted version of encrypted_hashed_idfa. This field is only set
// when using an SSL connection. This field is a 16 byte MD5.
optional bytes hashed_idfa = 28;
// App names for Android apps are from the Google Play store.
// App names for iOS apps are provided by App Annie
// (https://www.appannie.com). App names for SDK-less requests (mostly from
// connected TVs) are provided by the publisher directly in the request.
optional string app_name = 24;
// Average user rating for the app. The range of user rating is between 1.0
// and 5.0. Currently only available for apps in Google Play store.
optional float app_rating = 25;
// Identification of and information about an SDK installed in the
// publisher's app that the bidder has access to, often because it's the
// bidder's SDK.
message InstalledSdk {
// Identifier for the installed SDK.
optional string id = 1;
// Semantic version of the installed SDK and the adapter that communicates
// between the installed SDK and Google's SDK.
message Version {
optional int32 major = 1 [default = -1];
optional int32 minor = 2 [default = -1];
optional int32 micro = 3 [default = -1];
}
// The version of the installed SDK.
optional Version sdk_version = 2;
// The version of the adapter that communicates with the installed SDK.
optional Version adapter_version = 3;
}
repeated InstalledSdk installed_sdk = 32;
// Publisher's SKAdNetwork information to support app installation
// attribution for iOS 14 and later. Apple's SKAdNetwork API helps
// advertisers measure ad-driven app installation by sending a postback
// to the ad network after a successful install. Publishers will need
// to configure supported ad networks in their app's property list
// (Info.plist) to allow an install to be attributed to the ad impression.
// For more info visit:
// https://developer.apple.com/documentation/storekit/skadnetwork
message SKAdNetworkRequest {
// List of all SKAdNetwork versions supported by the request, depending on
// the OS version and the SDK version.
repeated string versions = 4;
// ID of publisher app in Apple's App Store.
optional string sourceapp = 2;
// SKAdNetworkIdentifier entries in the publisher app's Info.plist.
repeated string skadnetids = 3;
// List of fidelity types supported, depending on the SKAdNetwork API
// version supported by the operating system and SDK as well as ad slot
// properties.
repeated SKAdNetworkFidelityType supported_fidelity_types = 5 [packed =
true];
// Indicates if this request supports SKOverlay.
optional bool skoverlay = 6;
}
optional SKAdNetworkRequest skadn = 34;
}
optional Mobile mobile = 28;
// Information about the video if this is an in-video ad request.
message Video {
// Describes where the video ad will play.
enum Placement {
UNKNOWN_PLACEMENT = 0;
// Instream means the ad plays before, during, or after other video
// content. This is similar to a traditional TV commercial. The video
// content the user is watching does not play while the ad is playing.
INSTREAM = 1;
// Interstitial means the video ad plays in front of non-video content,
// (for example, a news article or video game). The ad covers all or
// nearly all of the space on the screen occupied by the content and the
// user is not able to proceed to the content until the ad has finished or
// been skipped.
INTERSTITIAL = 2;
// The in-feed video format is a video creative that shows within a feed
// of content, typically a social app feed, a list of editorial content
// items, etc, as the user is scrolling. It renders centered and not to
// the side.
IN_FEED = 3;
// Audio is a request for an ad that is an audio stream. It is distinct
// from INSTREAM above as that is exclusive to video requests.
AUDIO = 4;
// The in-article video format is a video creative that loads and plays
// between paragraphs of editorial content as a standalone video player.
IN_ARTICLE = 5;
}
// Deprecated. This will be removed in January 2025 per the IAB here:
// https://github.com/InteractiveAdvertisingBureau/AdCOM/blob/main/AdCOM%20v1.0%20FINAL.md#list--placement-subtypes---video-
optional Placement placement = 16 [deprecated = true, default =
UNKNOWN_PLACEMENT];
// Possible video placement types. See:
// https://github.com/InteractiveAdvertisingBureau/AdCOM/blob/master/AdCOM%20v1.0%20FINAL.md#list--plcmt-subtypes---video-
enum Plcmt {
PLCMT_UNKNOWN = 0;
// Pre-roll, mid-roll, and post-roll ads that are played before, during or
// after the streaming video content that the consumer has requested.
// Instream video must be set to “sound on” by default at player start, or
// have explicitly clear user intent to watch the video content. While
// there may be other content surrounding the player, the video content
// must be the focus of the user’s visit. It should remain the primary
// content on the page and the only video player in-view capable of audio
// when playing. If the player converts to floating/sticky, subsequent ad
// calls should accurately convey the updated player size.
PLCMT_INSTREAM = 1;
// Pre-roll, mid-roll, and post-roll ads that are played before, during,
// or after streaming video content. The video player loads and plays
// before, between, or after paragraphs of text or graphical content, and
// starts playing only when it enters the viewport. Accompanying content
// should only start playback upon entering the viewport. It may convert
// to a floating/sticky player as it scrolls off the page.
PLCMT_ACCOMPANYING_CONTENT = 2;
// Video ads that are played without video content. During playback, it
// must be the primary focus of the page and take up the majority of the
// viewport and cannot be scrolled out of view. This can be in placements
// like in-app video or slideshows.
PLCMT_INTERSTITIAL = 3;
// Video ads that are played without streaming video content. This can be
// in placements like slideshows, native feeds, in-content or
// sticky/floating.
PLCMT_NO_CONTENT_STANDALONE = 4;
}
// Video placement type declared by the publisher for this impression.
// Equivalent to the Video.plcmt field introduced in OpenRTB 2.6 to reflect
// updated industry definitions around different types of video ad
// placements. This field supersedes the Video.placement field. May be unset
// if the publisher did not declare a video placement type.
optional Plcmt plcmt = 23 [default = PLCMT_UNKNOWN];
// Video placement type inferred by Google for this impression. This field
// is always filled and can be different from BidRequest.video.plcmt (the
// publisher-declared placement type).
optional Plcmt inferred_plcmt = 24 [default = PLCMT_UNKNOWN];
// The URL of the page that the publisher gives Google to describe the video
// content, with parameters removed.
optional string description_url = 10;
// If true, the video is embedded on a page outside the publisher's domain.
// When this is set, description_url points to a description of the video
// (as it always does), and the url field in BidRequest is the page in which
// the video is embedded. For example, a request for an in-stream ad in a
// Vimeo video shared on Facebook has is_embedded_offsite set. The url field
// is for a Facebook page and the description_url points to the video on
// Vimeo.
optional bool is_embedded_offsite = 11 [default = false];
// Describes how the video ad will be played. The playback method is
// determined to be auto-play, click-to-play or mouse-over based on the best
// measurement available. This includes things like how recently the user
// interacted with a web page. For auto-play, ads can start playing with the
// sound on or off. Some ads (for example, in-feed ads) are muted until the
// user interacts with the ad. Alternatively, if an ad would normally play
// with the sound on but the device is muted then the value will be set to
// sound off. For devices where it is not possible to determine if the
// device is muted (for example, desktop), we assume that sound is on.
enum VideoPlaybackMethod {
METHOD_UNKNOWN = 0;
AUTO_PLAY_SOUND_ON = 1;
AUTO_PLAY_SOUND_OFF = 2;
CLICK_TO_PLAY = 3;
MOUSE_OVER = 4;
INITIATE_ON_ENTERING_VIEWPORT_SOUND_ON = 5;
INITIATE_ON_ENTERING_VIEWPORT_SOUND_OFF = 6;
}
optional VideoPlaybackMethod playback_method = 14 [default =
METHOD_UNKNOWN];
// Whether the inventory allows clicking on the video ad to take the user to
// an advertiser site. Some platforms, notably connected TVs, do not
// support clicking on video ads, in which case this field is set to false.
optional bool is_clickable = 15;
// The time in milliseconds from the start of the video when the ad will be
// displayed. 0 means pre-roll and -1 means post-roll. The value is valid
// only if this param is set. When not set, the display position is unknown.
optional int32 videoad_start_delay = 1;
// The maximum duration in milliseconds of the ad that you should return.
// If this is not set or has value <= 0, any duration is allowed.
optional int32 max_ad_duration = 2;
// The minimum duration in milliseconds of the ad that you should return.
// If this is not set or has value <= 0, there is no minimum duration.
optional int32 min_ad_duration = 8;
// The maximum number of ads in an Adx video pod. A non-zero value indicates
// that the current ad slot is a video pod that can show multiple video
// ads. Actual number of video ads shown can be less than or equal to this
// value but cannot exceed it.
optional int32 max_ads_in_pod = 12;
// The maximum duration of a pod in seconds.
optional int32 max_pod_duration_seconds = 20;
// Does the publisher allow/require/block skippable video ads?
enum SkippableBidRequestType {
ALLOW_SKIPPABLE = 0;
REQUIRE_SKIPPABLE = 1;
BLOCK_SKIPPABLE = 2;
}
optional SkippableBidRequestType video_ad_skippable = 4 [default =
ALLOW_SKIPPABLE];
// The maximum duration in milliseconds for the ad you should return, if
// this ad is skippable (this generally differs from the maximum duration
// allowed for non-skippable ads). If this is not set or has value <= 0, any
// duration is allowed.
optional int32 skippable_max_ad_duration = 5;
// Supported video protocols.
enum VideoProtocol {
UNKNOWN_VIDEO_PROTOCOL = 0;
VAST_1_0 = 1;
VAST_2_0 = 2;
VAST_3_0 = 3;
VAST_1_0_WRAPPER = 4;
VAST_2_0_WRAPPER = 5;
VAST_3_0_WRAPPER = 6;
VAST_4_0 = 7;
VAST_4_0_WRAPPER = 8;
DAAST_1_0 = 9;
DAAST_1_0_WRAPPER = 10;
}
// Array of supported video bid response protocols.
repeated VideoProtocol protocols = 17 [packed = true];
// The video file formats that are allowed for this request. The response
// should support at least one of them.
enum VideoFormat {
UNKNOWN_VIDEO_FORMAT = -1;
// Flash video files are accepted (FLV).
VIDEO_FLV = 0;
VIDEO_MP4 = 1;
// Valid VAST ads with at least one media file hosted on youtube.com.
YT_HOSTED = 2;
// Flash VPAID (SWF).
VPAID_FLASH = 3;
// JavaScript VPAID.
VPAID_JS = 4;
AUDIO_MP3 = 5;
AUDIO_OGG = 6;
// Requires both MP3 & OGG as Google does not know
// which codecs are installed on the player.
AUDIO_MP3_OGG = 7;
VIDEO_WEBM = 8;
VIDEO_MOV = 9;
VIDEO_3GPP = 10;
VIDEO_HLS = 11;
VIDEO_DASH = 12;
// Audio version of MP4.
AUDIO_MP4A = 13;
}
repeated VideoFormat allowed_video_formats = 6;
// Information about the companion ad slots that can be shown with the
// video. While this is a repeated field there will only be one value in
// most cases. If there are no companion ads available this field will not
// be set.
message CompanionSlot {
// These fields represent the available heights and widths in this slot.
// There will always be the same number heights and widths fields.
repeated int32 height = 1 [packed = true];
repeated int32 width = 2 [packed = true];
// These are the formats of the creatives allowed in this companion ad
// slot.
enum CreativeFormat {
UNKNOWN_CREATIVE_FORMAT = -1;
IMAGE_CREATIVE = 0;
FLASH_CREATIVE = 1;
HTML_CREATIVE = 2;
}
repeated CreativeFormat creative_format = 3;
}
repeated CompanionSlot companion_slot = 7;
// End cap support. When enabled, the companion ad can be picked to be
// rendered as an end cap (info card) in the video slot after the video
// ad finishes playing. If multiple companion ads are returned, IMA SDK
// chooses one which best matches the device screen size. End cap is
// supported only on mobile video interstitial inventory.
enum EndCapSupport {
// Companion ad won't be rendered as end cap.
END_CAP_NOT_ENABLED = 0;
// End cap will be rendered if response contains
// eligible companion banner, but companion
// banner is not required.
END_CAP_OPTIONAL = 1;
// Not used at this time.
// Response with companion ad is filtered.
END_CAP_FORBIDDEN = 2;
// Not used at this time.
// Response without companion ad is filtered.
END_CAP_REQUIRED = 3;
}
optional EndCapSupport end_cap_support = 13 [default = END_CAP_NOT_ENABLED];
// Attributes of the video that the user is viewing, not the video ad.
// These fields are based on the availability of the video metadata from the
// video publisher and may not always be populated.
message ContentAttributes {
// The duration of the video, in seconds.
optional int32 duration_seconds = 2;
}
optional ContentAttributes content_attributes = 9;
// Identify whether or not the ad request is being served from a live video
// stream (0 = is not live, 1 = is live).
optional bool is_livestream = 18 [default = false];
// The event that causes playback to end. This will only be filled
// for non-instream video formats.
enum PlaybackCessationMode {
PLAYBACK_CESSATION_MODE_UNKNOWN = 0;
// On video completion or when terminated by user
COMPLETION_OR_USER = 1;
// On leaving viewport or when terminated by user
LEAVING_OR_USER = 2;
// On leaving viewport continues as a floating/slider unit until
// video completion or when terminated by user
LEAVING_CONTINUES_OR_USER = 3;
}
optional PlaybackCessationMode playback_cessation_mode = 19 [default =
PLAYBACK_CESSATION_MODE_UNKNOWN];
// Types of feed for audio content. See
// https://github.com/InteractiveAdvertisingBureau/AdCOM/blob/master/AdCOM%20v1.0%20FINAL.md#list--feed-types-
// for details.
enum FeedType {
FEED_TYPE_UNKNOWN = 0;
// Music streaming service.
MUSIC_SERVICE = 1;
// Live content broadcast over the air but also available through online
// streaming.
FM_AM_BROADCAST = 2;
// Original, pre-recorded content distributed as episodes in a series.
PODCAST = 3;
}
// Type of audio content feed where an audio ad can be played.
optional FeedType feed_type = 21 [default = FEED_TYPE_UNKNOWN];
// Options for delivery of audio or video content. See
// https://github.com/InteractiveAdvertisingBureau/AdCOM/blob/master/AdCOM%20v1.0%20FINAL.md#list_deliverymethods
// for details.
enum ContentDeliveryMethod {
CONTENT_DELIVERY_METHOD_UNKNOWN = 0;
// Content is transferred continuously by the network; clients receive
// real-time content for playback while connected. Example: broadcast TV.
STREAMING = 1;
// Content is transferred incrementally as client's playback requires.
// Example: on-demand movies, podcasts, or music.
PROGRESSIVE = 2;
// Content should be transferred completely prior to use/playback.
// Example: content downloaded to the user's device for offline
// consumption.
DOWNLOAD = 3;
}
// Supported delivery methods for the video or audio content where an ad can
// be shown.
repeated ContentDeliveryMethod delivery_method = 22 [packed = true];
}
optional Video video = 29;
// The publisher settings list id that applies to this page.
// See the RTB Publisher Settings guide at
// https://developers.google.com/authorized-buyers/rtb/pub-settings-guide
// for details.
optional fixed64 publisher_settings_list_id = 42;
// Publisher type of the inventory where the ad will be shown. For a given
// request, publisher inventory can be either owned and operated (O&O),
// represented by the publisher, or of unknown status.
enum PublisherType {
UNKNOWN_PUBLISHER_TYPE = 0;
PUBLISHER_OWNED_AND_OPERATED = 1;
PUBLISHER_REPRESENTED = 2;
}
optional PublisherType publisher_type = 51 [default = UNKNOWN_PUBLISHER_TYPE];
enum VisibilityState {
VISIBILITY_STATE_UNKNOWN = 0;
// The page is at least partially visible. For example, in the foreground
// tab of a non-minimized window.
VISIBILITY_STATE_VISIBLE = 1;
// The page is not visible to users. For example, when the page is in a
// background browser tab, or in a minimized window.
VISIBILITY_STATE_HIDDEN = 2;
}
// The visibility state of the web page containing the ad slots.
// See https://www.w3.org/TR/page-visibility/.
optional VisibilityState page_visibility = 66 [default =
VISIBILITY_STATE_UNKNOWN];
// Information about a browser window's user activation state. See
// https://html.spec.whatwg.org/multipage/interaction.html#the-useractivation-interface
message UserActivation {
// Indicates whether a user has completed an interaction since page load.
optional bool has_been_active = 1;
// Indicates whether a user is currently interacting with the page.
optional bool is_active = 2;
}
// User activation information from the browser for the current request, if
// the request is for a web page.
optional UserActivation user_activation = 76;
// The set of possible web navigation types that predicate a page load. Each
// of these types may have different performance characteristics. For example,
// users going back and forth might experience a faster site than users
// performing navigation for the first time or submitting forms. See
// https://w3c.github.io/navigation-timing/#dom-performancenavigationtiming-type.
enum NavigationType {
NAVIGATION_TYPE_UNKNOWN = 0;
// Navigation started by clicking a link, entering the URL in the browser's
// address bar, form submission, or initializing through a script operation
// other than reload and back_forward.
NAVIGATION_TYPE_NAVIGATE = 1;
// Navigation is through the browser's reload operation, location.reload(),
// or a Refresh pragma directive like
// .
NAVIGATION_TYPE_RELOAD = 2;
// Navigation is through the browser's history traversal operation.
NAVIGATION_TYPE_BACK_FORWARD = 3;
// Navigation is initiated by a prerender hint (deprecated). See
// https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/prerender.
NAVIGATION_TYPE_PRERENDER = 4;
}
// The type of browser navigation that led to the current page. Unset for
// non-web ad requests.
optional NavigationType navigation_type = 77;
// -----------------------------------------------------------
// Information about the adslots on the page.
message AdSlot {
// An arbitrarily assigned slot id that is unique on a given page and
// usually starts counting from 1. You use this to identify which slot to
// bid on in the BidResponse.
required int32 id = 1;
// A stable identifier for the combination of publisher, ad slot, and page.
optional uint64 ad_block_key = 14;
// The width and height in pixels of the allowed ad sizes. Most requests
// allow only a single size, but some allow more than one. Widths and
// heights are at the same index. For example, if the width values are
// [728, 300, 468] and the height values are [90, 250, 60], then the allowed
// formats are 728x90, 300x250, and 468x60.
//
// For VAST video ad requests a single width/height pair specifies the
// Google-detected video player size. If Google cannot detect the player
// size the publisher-provided player size, if available, is used. For
// VAST video ads, this size is informational; there is no restriction on
// the size of the video ad that you can return.
//
// For mobile interstitial ads (including ones where video ads are eligible)
// the first width height pair is the slot size (this is also the video
// player size for VAST video ads). For many interstitials, this is the
// screen size. Subsequent pairs are recommended interstitial ad sizes that
// also meet the requirements for this interstitial.
repeated int32 width = 2;
repeated int32 height = 3;
message FlexibleAdSlotSettings {
optional int32 max_width = 1;
optional int32 max_height = 2;
optional int32 min_width = 3;
optional int32 min_height = 4;
}
// If the adslot is flexible, this contains settings on how the slot
// may be resized.
optional FlexibleAdSlotSettings flexible_adslot_settings = 50;
// The disallowed attribute ids for the ads that can show in this slot. See
// the publisher-excludable-creative-attributes.txt file in the technical
// documentation for a list of ids.
repeated int32 excluded_attribute = 4 [packed = true];
// The allowed vendor types. See the vendors.txt file in the technical
// documentation for a list of ids. This field does not apply to deals with
// block overrides (see
// https://support.google.com/authorizedbuyers/answer/6114194).
repeated int32 allowed_vendor_type = 6 [packed = true];
message ConsentedProvidersSettings {
// Set of IDs corresponding to ad tech providers (ATPs) for whom the
// publisher has specified to Google that its EEA users have given legally
// valid consent to: 1) the use of cookies or other local storage where
// legally required; and 2) the collection, sharing, and use of personal
// data for personalization of ads by an ATP in accordance with Google's
// EU User Consent Policy.
//
// If a publisher is using the IAB Transparency and Consent Framework
// (TCF) v2 to manage user consent, this is the set of ATPs consented
// through the Additional Consent string (see
// https://support.google.com/admanager/answer/9681920 for details about
// Google's Additional Consent mode). ATPs consented through the TCF v2
// consent string are represented in the
// ConsentedProvidersSettings.tcf_consent_string field.
//
// A mapping of ATP ID to ATP name is posted at providers.csv.
repeated int64 consented_providers = 2 [packed = true];
// The web-safe base64-encoded IAB Transparency and Consent Framework
// (TCF) v2 consent string fetched from the publisher's IAB Consent
// Management Platform (CMP). The structure of the string is defined by
// the IAB TCF v2. This field will be populated if the publisher has
// integrated with a CMP for TCF v2 and that CMP indicates that GDPR
// applies to this ad request and provides a valid consent string. See
// https://support.google.com/authorizedbuyers/answer/9789378 for
// additional information about the Google TCF v2 integration.
//
// See the IAB Global Vendor List at
// https://vendor-list.consensu.org/v2/vendor-list.json for details about
// the vendors listed in the consent string.
optional string tcf_consent_string = 3;
// The raw Additional Consent string, which contains a list of certain
// Google Ad Tech Providers (ATPs). These ATPs are not registered with IAB
// TCF v2, but publishers or their Consent Management Providers (CMPs)
// have ensured that certain disclosures are given to, and consents are
// obtained from, end users, as required by Google's EU User Consent
// Policy. This field is only populated with the use of CMPs that are
// integrated with IAB TCF v2. Such CMPs use the raw Additional Consent
// string to indicate vendors that are not registered with IAB, and
// communicate end users' CMP choices to those vendors. The
// consented_providers field contains the set of vendors that mirrors the
// one represented by the additional_consent_string field, which is in the
// raw form. Vendors or any other third-party service providers must not
// create AC strings themselves.
//
// See https://support.google.com/admanager/answer/9681920 for more
// details about this field.
optional string additional_consent_string = 4;
}
// Information about the ad tech providers for whom the publisher has
// specified to Google that its EEA user has consented to the use of their
// personal data for ads personalization in accordance with Google's EU User
// Consent Policy. This field will only be populated when regs_gdpr is true.
optional ConsentedProvidersSettings consented_providers_settings = 42;
// This field will be set to true in either of the two following cases:
// 1. Google receives a valid IAB Transparency and Consent Framework (TCF)
// v2 consent string and the Consent Management Platform indicates that
// GDPR applies to this ad request.
// 2. Google does not receive an IAB TCF v2 consent string and, based on
// information available to Google, this impression will serve to an
// EEA user.
// It does not constitute legal guidance on GDPR. This field is equivalent
// to Regs.ext.gdpr in Google OpenRTB.
optional bool regs_gdpr = 43;
// This field will be set to true when, based on information available to
// Google, this impression will serve to a user in Brazil. See
// https://storage.googleapis.com/adx-rtb-dictionaries/lgpd-providers.csv
// for the list of ad tech providers that are allowed to
// serve on LGPD-enforced requests.
//
// See https://support.google.com/authorizedbuyers/answer/9928204 for more
// information on LGPD.
optional bool regs_lgpd = 54;
// Contains the Global Privacy Platform's consent string. See the Global
// Privacy Platform specification for more details:
// https://github.com/InteractiveAdvertisingBureau/Global-Privacy-Platform
optional string gpp_consent_string = 81;
// Array of the section(s) of the GPP string which should be applied for
// this transaction. Generally will contain one and only one value, but
// there are edge cases (e.g. a CMP cannot determine a single section ID)
// where more than one may apply. GPP Section 3 (Header) and 4 (Signal
// Integrity) do not need to be included. See IAB-GPP spec for details:
// https://github.com/InteractiveAdvertisingBureau/Global-Privacy-Platform/blob/main/Sections/Section%20Information.md#section-ids
repeated int32 gpp_section_ids = 82 [packed = true];
// The disallowed sensitive ad categories. See the
// ad-sensitive-categories.txt file in the technical documentation for a
// list of ids. You should enforce these exclusions if you have the ability
// to classify ads into the listed categories. This field does not apply to
// deals with block overrides (see
// https://support.google.com/authorizedbuyers/answer/6114194).
repeated int32 excluded_sensitive_category = 7 [packed = true];
// The allowed restricted ad categories for private and open auctions. See
// the ad-restricted-categories.txt file in the technical documentation for
// a list of ids. These only apply for private and open auction bids. See
// the allowed_restricted_category_for_deals field for preferred deals or
// programmatic guarantees. If you bid with an ad in a restricted category,
// you MUST ALWAYS declare the category in the bid response regardless of
// the values in this field.
repeated int32 allowed_restricted_category = 16 [packed = true];
// The allowed restricted ad categories for preferred deals or programmatic
// guarantees. See the ad-restricted-categories.txt file in the technical
// documentation for a list of ids. These only apply for preferred deals or
// programmatic guarantees. See the allowed_restricted_category field for
// private and open auctions. In some cases, restricted categories are only
// allowed on preferred deals or programmatic guarantees, so this field
// lists all categories in allowed_restricted_category, and additionally,
// restricted categories that are only allowed for preferred deals or
// programmatic guarantees. If you bid with an ad in a restricted category,
// you MUST ALWAYS declare the category in the bid response regardless of
// the values in this field.
repeated int32 allowed_restricted_category_for_deals = 22 [packed = true];
// List of creative languages allowed by the publisher. The order is
// arbitrary. The codes are 2 or 5 characters and are documented at
// https://developers.google.com/google-ads/api/data/codes-formats#languages.
// When not set, all languages are allowed.
repeated string allowed_languages = 27;
// The disallowed ad product categories. See the ad-product-categories.txt
// file in the technical documentation for a list of ids. You should enforce
// these exclusions if you have the ability to classify ads into the listed
// categories. This field does not apply to deals with block overrides (see
// https://support.google.com/authorizedbuyers/answer/6114194).
repeated int32 excluded_product_category = 13 [packed = true];
// Block list of applications by their platform-specific exchange
// independent application identifiers. On Android, these should
// be bundle or package names (for example, com.foo.mygame).
// On iOS, these are numeric IDs.
// Bids with ads that advertise any app from this list will be filtered
// out before the auction.
repeated string excluded_app_ids = 66;
// A creative that is disallowed to bid on this impression due to Ad
// Exchange policies or creative disapproval, excluded creative attributes,
// excluded product or sensitive categories, allowed vendor types,
// restricted categories or languages applicable to the bid request.
message ExcludedCreative {
// Buyer creative ID of the disallowed creative.
optional string buyer_creative_id = 1;
}
// Creatives that are disallowed for the impression. Submitting a bid with
// one of the creatives in this list will result in such bid being filtered
// before the auction. Contact your account manager if you would like
// to enable this feature.
repeated ExcludedCreative excluded_creatives = 18;
// Whether the adslot is only eligible for deals bids. Bids for the open
// auction will be filtered when this field is set to true. Bidders can bid
// on the open auction or deals when this field is set to false.
optional bool only_deal_bids_accepted = 49;
// Information about the pre-targeting configs that matched.
message MatchingAdData {
// The billing ids corresponding to the pretargeting configs that matched.
repeated int64 billing_id = 2 [packed = false];
// The minimum CPM value that you can bid to not be filtered before the
// auction. This may be a global minimum, or it may be a minimum set by
// the publisher. The value is in micros of the bidding currency.
// The bidding currency is determined by:
// 1. The bidder-level currency, if configured.
// 2. Otherwise, the currency of the buyer accounts indicated by the
// billing IDs in the billing_id field.
optional int64 minimum_cpm_micros = 5;
// Information about any deals that matched for this inventory.
message DirectDeal {
// An id identifying the deal.
optional int64 direct_deal_id = 1;
// For deal_type=PREFERRED_DEAL or deal_type=PROGRAMMATIC_GUARANTEED,
// you must bid at least fixed_cpm_micros (in micros of the bidding
// currency) in order to participate in the deal. If you win, you will
// be charged fixed_cpm_micros. For deal_type=PRIVATE_AUCTION or
// deal_type=AUCTION_PACKAGE or deal_type=MARKETPLACE_PACKAGE, you must
// bid at least fixed_cpm_micros. Bidding higher CPM than
// fixed_cpm_micros will increase your chance to win when
// deal_type=PRIVATE_AUCTION or deal_type=AUCTION_PACKAGE or
// deal_type=MARKETPLACE_PACKAGE, however it will not increase your
// chance to win for other types of deals. The bidding currency is
// determined by:
// 1. The bidder-level currency, if configured.
// 2. Otherwise, the currency of the buyer accounts indicated by the
// billing IDs in the billing_id field.
optional int64 fixed_cpm_micros = 2;
// The type of the deal. Note that Authorized Buyers policy overrides
// apply to all Programmatic Guaranteed and Preferred Deal bids, and do
// not apply to bids for other deal types.
enum DealType {
UNKNOWN_DEAL_TYPE = 0;
// Bids are fixed-price and evaluated before the Open Auction. Bidders
// are not required to bid with Preferred Deals when they are present
// on the bid request. See
// https://support.google.com/authorizedbuyers/answer/2604595 for more
// information.
PREFERRED_DEAL = 1;
// Bids participate in a Private Auction against a select list of
// buyers with specific floors. See
// https://support.google.com/authorizedbuyers/answer/2839853 for more
// information.
PRIVATE_AUCTION = 2;
// Bids are fixed-price and evaluated before the Open Auction. Bidders
// are expected to bid with Programmatic Guaranteed deals whenever
// they are present on a bid request in order to ensure that the
// number of impressions agreed upon for a given deal are served. See
// https://support.google.com/authorizedbuyers/answer/7174589 for more
// information.
PROGRAMMATIC_GUARANTEED = 3;
// The deal ID is an identifier for a collection of Open Auction
// inventory matching a given set of targeting criteria. See
// https://support.google.com/authorizedbuyers/answer/7516884 for more
// information.
AUCTION_PACKAGE = 4;
// Package of inventory that a publisher makes available to either all
// buyers or selected bidders. Bids participate in auction in the same
// way as private auction candidates. See
// https://support.google.com/authorizedbuyers/answer/12817370 for
// more information.
MARKETPLACE_PACKAGE = 5;
}
optional DealType deal_type = 3 [default = UNKNOWN_DEAL_TYPE];
// Whether the publisher has exempted this deal from configured blocks.
// This setting does not override AdX policies or Ad Review Center
// decisions.
optional bool publisher_blocks_overridden = 4 [default = false];
// Experimental field; subject to change.
// An enum declaring the host of the creative, which will only be
// populated for Programmatic Guaranteed deals.
// Currently, this field should only ever be set to
// CREATIVE_SOURCE_ADVERTISER.
enum CreativeSourceType {
CREATIVE_SOURCE_UNKNOWN = 0;
// The creative is hosted by the advertiser, which means the bidder
// is required to provide a creative in the bid response.
CREATIVE_SOURCE_ADVERTISER = 1;
// The creative is hosted by the publisher, which means the bidder
// does not need to include a creative in the bid response.
// For more information on publisher-hosted creatives, see
// https://support.google.com/admanager/answer/9243220.
// This feature isn't currently supported for RTB bidders.
CREATIVE_SOURCE_PUBLISHER = 2;
}
optional CreativeSourceType creative_source = 16 [default =
CREATIVE_SOURCE_ADVERTISER];
// This field is only applicable to Programmatic Guaranteed deals. The
// buyer is allowed to skip bidding on the impression if this field is
// false. When it is true, the buyer is required to bid on this deal for
// this impression opportunity.
optional bool must_bid = 9 [default = true];
// Constraints for creatives that can apply when bidding on a deal.
message CreativeConstraints {
// The allowed ad types of the deal. If empty, there are no
// deal-specific allowed ad type restrictions for the deal. In that
// case, bidders should refer to the BidRequest-level creative types
// in adslot.allowed_ad_types.
repeated AllowedAdType allowed_ad_types = 1 [packed = true];
// Whether skippable creatives are allowed. For
// PROGRAMMATIC_GUARANTEED or PREFERRED_DEAL deals that specifically
// allow video or audio ad types, it is always set. For the
// skippability setting of other deal types or open auction bidding,
// refer to the corresponding BidRequest-level field
// video.video_ad_skippable.
optional Video.SkippableBidRequestType video_ad_skippable = 2 [default
= ALLOW_SKIPPABLE];
// The maximum allowed duration in milliseconds for the ad. For
// PROGRAMMATIC_GUARANTEED or PREFERRED_DEAL deals that specifically
// allow video or audio ad types, it is always set. For the allowed
// max duration of other deal types or open auction bidding, refer to
// the corresponding BidRequest-level field video.max_ad_duration.
optional int32 max_ad_duration_ms = 3;
}
// Creative constraints for this deal. If this is not set, bidders
// should refer to the BidRequest-level setting of each field.
optional CreativeConstraints creative_constraints = 17;
// If non-empty, this field contains a list of seat IDs in the bidder's
// namespace set by media planners that are allowed by the publisher to
// bid on this deal. All seat IDs not included in this list are blocked
// from bidding on this deal. Bids on this deal on behalf of other
// seats, as indicated by the BidResponse.ad.adslot.seat_id field, and
// bids with no seat ID will be filtered before the auction. If this
// field is empty, there are no restrictions on the seat IDs that can
// bid on this deal.
repeated string allowed_seat_ids = 18;
}
repeated DirectDeal direct_deal = 6;
}
repeated MatchingAdData matching_ad_data = 9;
// If non-empty, this field contains a list of seat IDs in the bidder's
// namespace set by media planners that are blocked by the publisher. Any
// bids on behalf of a blocked seat, as indicated by the
// BidResponse.ad.adslot.seat_id field, will be filtered before the auction.
// If this field is non-empty, allowed_seat_ids will be empty. If this field
// and allowed_seat_ids are both empty, there are no seat ID restrictions
// for this request.
repeated string blocked_seat_ids = 67;
// If non-empty, this field contains a list of seat IDs in the bidder's
// namespace set by media planners that are allowed by the publisher. All
// seat IDs not included in this list are blocked. Bids on behalf of other
// seats, as indicated by the BidResponse.ad.adslot.seat_id field, and bids
// with no seat ID will be filtered before the auction. If this field is
// non-empty, blocked_seat_ids will be empty. If this field and
// blocked_seat_ids are both empty, there are no seat ID restrictions for
// this request.
repeated string allowed_seat_ids = 68;
// The publisher settings list ids that apply to this slot. See the RTB
// Publisher Settings guide at
// https://developers.google.com/authorized-buyers/rtb/pub-settings-guide
// for details.
repeated fixed64 publisher_settings_list_id = 15;
// Parameters related to exchange bidding (third party exchanges doing
// real-time bidding on DFP). This is never populated in calls to AdX
// real-time bidders.
message ExchangeBidding {
// Repeated KeyValue pairs to be sent from the publisher to the
// exchange bidder.
repeated KeyValue key_value = 3;
}
optional ExchangeBidding exchange_bidding = 28;
// Parameters related to Open Bidding.
message OpenBidding {
// This field is set to true if the publisher set up a yield group or a
// mediation group that targets this adslot and this bidder. See
// https://support.google.com/admanager/answer/7128453 for information on
// Open Bidding and its effects on the bidding process.
optional bool is_open_bidding = 2;
}
optional OpenBidding open_bidding = 53;
// AdUnitMapping is used to identify publisher inventory units in the
// bidder's namespace. The mappings are only populated when
// the bidder works directly with a publisher, and provides the mapping
// from Google's ad unit namespace to the bidder's inventory namespace.
// The ad unit mapping is only applicable for requests that use a custom
// SDK. https://support.google.com/admanager/answer/9601810.
message AdUnitMapping {
// Key-value pair used to specify the inventory unit in the bidder's
// namespace.
message Keyval {
// The key is the name of the bidder's inventory unit identifier for the
// SDK.
optional string key = 1;
// The value of the bidder's inventory unit identifier for the given
// format.
optional string value = 2;
}
// Multiple key-value pairs can be specified in order to support
// bidders whose inventory unit space is hierarchical and has multiple
// identifiers. The key-value pairs for the chosen AdUnitMapping should be
// sent back in the bid response as
// BidResponse.ad.sdk_rendered_ad.sdk_params. This is passed to the
// bidder's SDK.
repeated Keyval keyvals = 1;
// Possible ad unit formats that can be used for the mapping. Corresponds
// to the adapter that will be used on the SDK.
enum FormatType {
FORMAT_UNKNOWN = 0;
// Display banner ads for web or mobile apps. For example, a 320x50
// leaderboard slot. This includes out-stream video.
FORMAT_BANNER = 1;
// A full-screen ad to be displayed inside a mobile app.
FORMAT_INTERSTITIAL = 2;
// Custom display or video ads for web or mobile apps that match the
// user experience of the site or app in which they’re placed.
FORMAT_NATIVE = 3;
// Video ads that appear before, during, or after video content
// streams.
FORMAT_VIDEO_VAST = 4;
// Video ads for mobile apps that allow users to voluntarily watch an
// ad in exchange for an in-app reward.
FORMAT_REWARDED = 5;
// Interstitial ads that allow users to watch an ad in exchange for
// an in-app reward. Does not require opt-in.
// https://support.google.com/admanager/answer/7386053
FORMAT_REWARDED_INTERSTITIAL = 6;
// App open ads shows at app load screens. App open ads can be closed
// at any time, and are designed to be shown when the users bring the
// app to the foreground.
FORMAT_APP_OPEN = 7;
}
// The mappings are targeted through a format, which is expressed in the
// Google-defined taxonomy. Format is populated in the bid request since
// Google supports targeting multiple formats with a single ad
// unit, and Google's definition of the format may not match the bidder's
// definition. In order for the bidder to differentiate which format
// matched, it is sent in the bid request.
optional FormatType format = 2;
}
// Ad unit mappings that match the given adslot.
repeated AdUnitMapping ad_unit_mapping = 64;
// Indicates the creative policy and publisher blocks that applies to this
// request.
message CreativeEnforcementSettings {
// Creative policy enforcement level that applies to this request.
// Creatives that don't adhere to the specified policy will be filtered
// before the auction. The status of the creatives with their respective
// policies can be retrieved through Creative API.
// https://developers.google.com/authorized-buyers/apis/guides/rtb-api/creatives
// Bids on deals may override the policy enforcement applicable to the
// request.
enum PolicyEnforcement {
POLICY_ENFORCEMENT_UNKNOWN = 0;
// Baseline policy for all ads serving through any of Google's ads
// platform products. Learn more at:
// https://support.google.com/platformspolicy/answer/3013851.
POLICY_ENFORCEMENT_PLATFORM_POLICY = 1;
// Policy for ads serving through Google's ad network. This includes the
// baseline policy for all ads serving through any of Google's ads
// platform products. Learn more at:
// https://support.google.com/authorizedbuyers/answer/1325008.
POLICY_ENFORCEMENT_NETWORK_AND_PLATFORM_POLICY = 2;
}
optional PolicyEnforcement policy_enforcement = 1;
// Creative publisher blocks enforcement level that applies to this
// request. Publisher blocks allow publishers to control which creatives
// can be shown on their properties.
// Deals may also override publisher blocks. Refer to adslot.
// matching_ad_data.direct_deal.publisher_blocks_overridden field.
enum PublisherBlocksEnforcement {
PUBLISHER_BLOCKS_ENFORCEMENT_UNKNOWN = 0;
// The publisher's blocking controls are enforced on creatives
// submitted. Publisher blocks enforcement settings are provided in the
// following fields:
// - publisher_settings_list_id
// - excluded_sensitive_category
// - allowed_restricted_category
// - excluded_product_category
// - allowed_vendor_type
// - excluded_attribute
PUBLISHER_BLOCKS_ENFORCEMENT_APPLIES = 1;
// The publisher's blocking controls are not enforced on creatives
// submitted.
PUBLISHER_BLOCKS_ENFORCEMENT_OVERRIDDEN = 2;
}
optional PublisherBlocksEnforcement publisher_blocks_enforcement = 3;
}
optional CreativeEnforcementSettings creative_enforcement_settings = 58;
// The ad unit code (https://support.google.com/admanager/topic/4426071)
// This is currently only set for exchange bidding requests.
optional string dfp_ad_unit_code = 33;
// Visibility information for the slot.
enum SlotVisibility {
NO_DETECTION = 0;
ABOVE_THE_FOLD = 1;
BELOW_THE_FOLD = 2;
}
optional SlotVisibility slot_visibility = 12 [default = NO_DETECTION];
// Viewability percentage for the ad slot. This is an estimate of the
// likelihood that this slot will be viewable by the end user based on
// historical and environment data. It is expressed as a percentage in the
// range of [0, 100]. The default value -1 indicates that viewability could
// not be estimated.
optional int32 viewability = 21 [default = -1];
// Historical click-through rate for ads served in the ad slot. This is
// expressed as a fraction in the range [0.0, 1.0]. The default value of
// -1.0 indicates that historical click-through rate data is not available.
// This figure does not include data aggregated from Google Ads. The
// click-through rate can vary for a given ad slot throughout the day.
optional float click_through_rate = 25 [default = -1];
// Historical completion rate for video ads served in the ad slot. This is
// expressed as a fraction in the range [0.0, 1.0]. The default value of
// -1.0 indicates that historical completion rate data is not available.
// This field is only applicable to video inventory, and does not include
// data aggregated from Google Ads.
optional float video_completion_rate = 30 [default = -1];
// iFraming state of the ad slot on the webpage where it is present.
enum IFramingState {
UNKNOWN_IFRAME_STATE = 0;
NO_IFRAME = 1;
SAME_DOMAIN_IFRAME = 2;
CROSS_DOMAIN_IFRAME = 3;
}
optional IFramingState iframing_state = 19 [default = UNKNOWN_IFRAME_STATE];
// iFrame depth of the ad slot on the webpage where it is present.
// Currently only set for video ad requests.
enum IFramingDepth {
UNKNOWN_IFRAME_DEPTH = 0;
NOT_IN_IFRAME = 1;
ONE_IFRAME = 2;
MULTIPLE_IFRAME = 3;
}
optional IFramingDepth iframing_depth = 20 [default = UNKNOWN_IFRAME_DEPTH];
// A native ad consists of pieces that are rendered by the publisher. A
// publisher may support multiple distinct native ad templates. If the
// request also allows banners or videos, you can respond with other types
// of ads by setting html_snippet or video_url instead. If only native
// templates exist, you must set the native_ad field in any response you
// send.
message NativeAdTemplate {
// Bitfield describing which fields are required by the publisher. Bid
// responses with no value for these fields will be rejected. Click and
// view tracking urls are always implicitly required.
optional int64 required_fields = 1;
// Bitfield describing which fields are recommended by the publisher. All
// recommended fields are supported, but not all recommended fields are
// required.
optional int64 recommended_fields = 2;
// max_safe_length indicates the maximum number of Unicode characters that
// are guaranteed to be shown without truncation. Longer strings may be
// truncated and ellipsized by Ad Exchange or the publisher during
// rendering.
optional int32 headline_max_safe_length = 3;
optional int32 body_max_safe_length = 4;
optional int32 call_to_action_max_safe_length = 5;
optional int32 advertiser_max_safe_length = 6;
optional int32 price_max_safe_length = 15;
// The width and height from which to calculate the required aspect ratio.
// You can provide a larger image in the response. Images that have aspect
// ratios substantially different than those implied by the height and
// width may be filtered.
optional int32 image_width = 7;
optional int32 image_height = 8;
optional int32 logo_width = 9;
optional int32 logo_height = 10;
optional int32 app_icon_width = 11;
optional int32 app_icon_height = 12;
// Globally distinct id for the specific style, HTML, and CSS with which
// the native ad is rendered.
optional int32 style_id = 16;
// Type of style layout for each native ad template.
enum LayoutType {
PIXEL = 0;
FLUID = 1;
}
optional LayoutType style_layout_type = 17 [default = PIXEL];
// If the style_layout_type is Pixel, width and height of the
// entire native ad after rendering. If the style_layout_type is
// Fluid, the style_height and style_width may optionally
// not be populated.
optional int32 style_height = 18;
optional int32 style_width = 19;
// Defines the bits used in required_fields and recommended_fields. There
// is one bit for each of the fields in BidResponse.Ad.NativeAd
enum Fields {
NO_FIELDS = 0;
HEADLINE = 1;
BODY = 2;
CALL_TO_ACTION = 4;
ADVERTISER = 8;
IMAGE = 16;
LOGO = 32;
APP_ICON = 64;
STAR_RATING = 128;
PRICE = 256;
DEPRECATED_STORE = 512;
VIDEO = 1024;
}
}
repeated NativeAdTemplate native_ad_template = 51;
// NativePlacementType describes placement of native ad slot with respect to
// surrounding context.
enum NativePlacementType {
PLACEMENT_UNKNOWN = 0;
// In the feed of content - for example as an item inside the organic
// feed/grid/listing/carousel.
PLACEMENT_IN_FEED = 1;
// In the atomic unit of the content - for example, in the article page or
// single image page.
PLACEMENT_ATOMIC_UNIT = 2;
// Outside the core content - for example in the ads section on the right
// rail, as a banner-style placement near the content, or another
// placement type.
PLACEMENT_OUTSIDE = 3;
// Recommendation widget, most commonly presented below the article
// content.
PLACEMENT_RECOMMENDATION = 4;
}
optional NativePlacementType native_placement_type = 45 [default =
PLACEMENT_UNKNOWN];
// Whether the ad request has been determined to come directly from the
// publisher.
enum MediationStatus {
UNKNOWN = 0;
DIRECT_REQUEST = 1;
}
optional MediationStatus mediation_status = 52 [default = UNKNOWN];
// Auto refresh settings.
message AutoRefresh {
message AutoRefreshSettings {
enum AutoRefreshType {
UNKNOWN_AUTO_REFRESH_TYPE = 0;
// Refresh triggered by user-initiated action such
// as scrolling.
USER_ACTION = 1;
// Event-driven content change. For example, ads refresh
// when the football game score changes on the page.
EVENT = 2;
// Time-based refresh. Ads refresh on a predefined time
// interval even without user activity.
TIME = 3;
}
// The type of the declared auto refresh.
optional AutoRefreshType refresh_type = 1 [default =
UNKNOWN_AUTO_REFRESH_TYPE];
// The minimum refresh interval. This applies to all refresh types.
optional int32 min_refresh_interval_seconds = 2;
}
// The auto-refresh settings that the publisher has on this
// inventory. This is repeated because publishers may
// do multiple types of auto refresh on one piece of inventory.
repeated AutoRefreshSettings refresh_settings = 1;
// The number of times this ad slot had been refreshed since last page
// load.
optional int32 refresh_count = 2 [default = 0];
}
optional AutoRefresh auto_refresh = 23;
// Stickiness settings declared by the publisher.
message StickySettings {
// Specifies the allowable sticky settings values.
enum Stickiness {
UNKNOWN_STICKINESS = 0;
IS_STICKY = 1;
}
// Whether the ad slot is a sidebar that sticks on screen when user
// scrolls.
optional Stickiness vertical_stickiness = 1 [default =
UNKNOWN_STICKINESS];
// Whether the ad slot is a horizontal slot that sticks on the top of the
// screen when user scrolls.
optional Stickiness top_horizontal_stickiness = 2 [default =
UNKNOWN_STICKINESS];
// Whether the ad slot is a horizontal slot that sticks on the bottom of
// the screen when user scrolls.
optional Stickiness bottom_horizontal_stickiness = 3 [default =
UNKNOWN_STICKINESS];
}
optional StickySettings sticky_settings = 31;
// Sources for non-browser inventory.
enum NonBrowserSource {
UNDECLARED_SOURCE = 0;
DESKTOP_APP = 1;
}
// Publisher declaration stating that this ad slot may serve on
// non-browser inventory, like desktop apps.
optional NonBrowserSource non_browser_slot_source = 34 [default =
UNDECLARED_SOURCE];
// Defines who controls the environment that made the ad request and will
// render the ad. On platforms where code written by Google will handle
// the ad this field is set to GOOGLE. When this field is PUBLISHER the
// publisher has placed their own code on the device to handle playback of
// the ad. There is no technical difference in how these request are
// handled. You may use this field to differentiate between different
// environments for non-technical reasons. This field is only set for
// requests that allow VAST video ads.
enum Renderer {
UNKNOWN_RENDERER = 0;
GOOGLE = 1;
PUBLISHER = 2;
}
optional Renderer renderer = 26 [default = UNKNOWN_RENDERER];
// Whether this request is for an Accelerated Mobile Page (AMP). AMP HTML
// pages load faster, by restricting parts of HTML, CSS and Javascript. For
// more information on how AMP ads render, refer to the AMP ads README:
// https://github.com/ampproject/amphtml/blob/master/ads/README.md
enum AmpAdRequestType {
// AMP status unknown. Request may or may not be from an AMP page.
UNKNOWN_AMP = 0;
// Not an AMP page. Could be regular HTML, VAST video, or other context.
NON_AMP_PAGE = 1;
// Late-loading request from an AMP HTML page. Ad will render with a
// slight delay so it will not negatively impact page render performance.
AMP_PAGE_LATE_REQUEST = 2;
}
optional AmpAdRequestType amp_ad_request_type = 29 [default = NON_AMP_PAGE];
// Whether this is an AMP page or not.
enum AmpPage {
// AMP page status unknown.
UNKNOWN_AMP_PAGE = 0;
// This is not an AMP page.
DIALECT_HTML = 1;
// This is an Amp page.
DIALECT_HTML_AMP = 2;
}
optional AmpPage is_amp_page = 38;
// Possible requirement types for AMP ads.
enum AmpAdRequirementType {
// AMP ad requirements unknown.
UNKNOWN_AMP_AD_REQUIREMENT_TYPE = 0;
// AMP ads are not allowed.
AMP_AD_NOT_ALLOWED = 1;
// Either AMP ads or non-AMP ads are allowed;
// AMP ads are not early rendered.
AMP_AD_ALLOWED_AND_NOT_EARLY_RENDERED = 2;
// Either AMP ads or non-AMP ads are allowed;
// AMP ads are early rendered.
AMP_AD_ALLOWED_AND_EARLY_RENDERED = 3;
// AMP ads are required.
// Ads that are non-AMP may be rejected by the publisher.
AMP_AD_REQUIRED = 4;
}
optional AmpAdRequirementType amp_ad_requirement_type = 39;
// Whether the user receives a reward for viewing the ad. For video ads,
// typical implementations allow users to read an additional news article
// for free, receive an extra life in a game, or get a sponsored ad-free
// music session. The reward is typically distributed after the video ad is
// completed.
optional bool is_rewarded = 32 [default = false];
// Possible ad types that are allowed in the bid response. allowed_ad_types
// always contains one or more values. Interstitial slots may also support
// banner ads. An ad slot with ALLOWED_AD_TYPE_NATIVE may or may not support
// native video, regardless of whether ALLOWED_AD_TYPE_VIDEO is set.
// Likewise, an ad slot without ALLOWED_AD_TYPE_NATIVE does not support
// native video, regardless of whether ALLOWED_AD_TYPE_VIDEO is set.
enum AllowedAdType {
UNKNOWN_ALLOWED_AD_TYPE = -1;
ALLOWED_AD_TYPE_BANNER = 0;
ALLOWED_AD_TYPE_NATIVE = 1;
ALLOWED_AD_TYPE_VIDEO = 2;
ALLOWED_AD_TYPE_AUDIO = 3;
}
repeated AllowedAdType allowed_ad_types = 36 [packed = true];
// Total number of impressions served to this user (within this specific
// site or app) in this browsing session, plus 1. A session ends after 30
// minutes inactivity. The default value of -1 indicates that the session
// depth cannot be estimated.
optional int32 session_depth = 40 [default = -1];
// Secure signals passed by the publisher.
message SecureSignal {
// The source (provider) of the signal. Identifier for the library or SDK
// that generated this data.
optional string source = 4;
// The secure signal.
optional string data = 2;
}
repeated SecureSignal secure_signals = 41;
// Possible ad rendering API frameworks that can be supported.
// If an API is not explicitly listed, it is assumed not to be supported.
enum APIFramework {
UNKNOWN_FRAMEWORK = 0;
// Mobile Rich Media Ad Interface Definitions Version 1.0. See
// https://www.iab.com/guidelines/mraid/.
MRAID_1 = 3;
// Mobile Rich Media Ad Interface Definitions Version 2.0. See
// https://www.iab.com/guidelines/mraid/.
MRAID_2 = 5;
// Mobile Rich Media Ad Interface Definitions Version 3.0. See
// https://www.iab.com/guidelines/mraid/.
MRAID_3 = 6;
// Open Measurement Interface Definition Version 1.0. See
// https://iabtechlab.com/standards/open-measurement-sdk/.
OMID_1 = 7;
}
// List of supported API frameworks for this impression.
repeated APIFramework api = 46 [packed = true];
// Deprecated. This will be removed in Q1 2024. This field has been
// deprecated in favor of the repeated field
// `billable_event_rate_bid_adjustment` below.
// For ads rendered using a custom SDK only: multiplier applied to bid in
// the auction. The adjustment reflects the likelihood that your bid would
// generate a billable event (meaning the ad renders successfully) if
// it won the auction, relative to the probability that other bids generate
// a billable event if they won the auction. This adjustment can be larger
// or smaller than 1. This affects the final ranking in the auction only; in
// particular, this multiplier does not affect the payment.
optional double billable_event_rate_adjustment = 59 [deprecated = true,
default = 1];
// The billable event rate bid adjustment of an ad and the dependent
// features of the ad the adjustment applies to, such as the format or the
// SDK used to render the ad. Each feature combination may have a unique
// adjustment, each adjustment therefore specifies which SDK or creative
// format it applies to.
message BillableEventRateBidAdjustment {
// A multiplier to your bid to adjust for the likelihood that your bid
// would result in a billable event (namely, the ad renders successfully)
// if it won the auction, relative to the average probability that bids
// from other buyers would result in a billable event if they won the
// auction. This adjustment can be larger or smaller than 1. This affects
// the final ranking in the auction only; in particular, this multiplier
// does not affect the payment or whether the bid clears any floor price.
optional float bid_adjustment = 1 [default = 1];
// The types of creative the bid adjustments can apply to.
enum CreativeType {
CREATIVE_TYPE_UNKNOWN = 0;
// Banner ads
HTML_SNIPPET = 1;
// VAST video or audio ads
VIDEO_VAST = 2;
// Native ads
NATIVE = 3;
// SDK rendered ad
SDK_RENDERED = 4;
}
// The type of ads to which the above bid adjustment applies to. Each type
// corresponds to different ways of how the ad's creative is specified, as
// described in
// https://developers.google.com/authorized-buyers/rtb/response-guide#specify-creative.
// If the ad is SDK-rendered, this will be set to SDK_RENDERED regardless
// of the actual creative type.
optional CreativeType creative_type = 2 [default = CREATIVE_TYPE_UNKNOWN];
// The SDK used to render the ad with. The SDK ID will match the one sent
// in BidRequest.mobile.installed_sdk.id. This field is not set for Google
// SDK.
optional Mobile.InstalledSdk sdk = 3;
}
// A list of billable event rate bid adjustments applicable to the request
// and the ad features associated to the adjustment. Bid adjustments are
// listed here only if they are not equal to 1.0, which is equivalent to
// having no adjustment. This field replaces the deprecated field
// billable_event_rate_adjustment.
repeated BillableEventRateBidAdjustment billable_event_rate_bid_adjustment =
65;
// Identifier of the OM SDK integration. For more info, see the OpenRTB
// Advisory for Open Measurement SDK:
// https://github.com/InteractiveAdvertisingBureau/AdCOM/blob/master/OpenRTB%20support%20for%20OMSDK.md#openrtb-and-adcom.
optional string omidpn = 56;
// Version of the OM SDK integration. For more info, see the OpenRTB
// Advisory for Open Measurement SDK:
// https://github.com/InteractiveAdvertisingBureau/AdCOM/blob/master/OpenRTB%20support%20for%20OMSDK.md#openrtb-and-adcom.
optional string omidpv = 57;
// Describes the environment where the ad auction is run.
enum AuctionEnvironment {
// The auction determining the winning ad is held server-side.
SERVER_SIDE_AUCTION = 0;
// The contextual auction that determines a winning contextual bid is held
// server-side, and bidding functions are run on the device to determine
// interest group bids. Both the winning contextual bid and interest
// group bids are entered into a final auction held on the device to
// select the winning ad. For more information regarding the Protected
// Audience API, see:
// https://github.com/WICG/turtledove and
// https://github.com/WICG/turtledove/blob/main/FLEDGE.md
ON_DEVICE_INTEREST_GROUP_AUCTION = 1;
}
// Specifies where the ad auction runs.
// Deprecated. This will be removed in November, 2023. Use
// supported_auction_environment instead.
optional AuctionEnvironment auction_environment = 61 [deprecated = true,
default = SERVER_SIDE_AUCTION];
// The supported auction environment for this impression. For inventory
// which does not support interest group bidding, this will always be set to
// SERVER_SIDE_AUCTION. For inventory which does support interest group
// bidding, this will be set to ON_DEVICE_INTEREST_GROUP_AUCTION. Note that
// this only indicates that the interest group auction is supported, not
// that it is guaranteed to execute. If no buyer chooses to participate in
// the interest group auction, then the interest group auction will be
// skipped and the winner of the contextual auction, if any, will be
// served instead.
optional AuctionEnvironment supported_auction_environment = 69 [default =
SERVER_SIDE_AUCTION];
// The expected time period when an impression can occur in seconds
// following a winning bid. The impression may be billable only if it serves
// within this time. To learn more about impression expiration, see the
// following guide:
// https://developers.google.com/authorized-buyers/rtb/billing-event-guide
optional int32 impression_expiration_seconds = 63;
// The name of the rendering environment, such as a mobile ads or video
// SDK, or a publisher ad tag type. This field describes a Google SDK while
// the installed_sdk field describes third party SDKs.
optional string display_manager = 71;
// Version of the rendering environment specified by the display_manager
// field. This field describes a Google SDK while the installed_sdk field
// describes third party SDKs.
optional string display_manager_version = 72;
}
repeated AdSlot adslot = 14;
// Feedback on bids submitted in previous responses. This is only set if
// real-time feedback is enabled for your bidder. Contact your account
// manager if you want to enable real-time feedback.
message BidResponseFeedback {
// The unique id from BidRequest.id
optional bytes request_id = 1;
// The index of the BidResponse_Ad if there was more than one. The index
// starts at zero for the first creative.
optional int32 creative_index = 2;
// The status code for the ad. See creative-status-codes.txt in the
// technical documentation for a list of ids.
optional int32 creative_status_code = 3;
// If the bid won the auction, this is the price paid in your account
// currency. If the bid participated in the auction but was out-bid, this
// is the CPM that should have been exceeded in order to win. This is not
// set if the bid was filtered prior to the auction, if the publisher or
// winning bidder has opted out of price feedback or if your account has
// opted out of sharing winning prices with other bidders. For first-price
// auctions, minimum_bid_to_win is populated instead of this field.
optional int64 cpm_micros = 4;
// The minimum bid value necessary to have won the auction, in micros of
// your account currency. If your bid won the auction, this is the second
// highest bid that was not filtered (including the floor price). If your
// bid did not win the auction, this is the winning candidate's bid. This
// field will only be populated if your bid participated in a first-price
// auction, and will not be populated if your bid was filtered prior to the
// auction.
optional int64 minimum_bid_to_win = 7;
// The minimum bid value necessary to have won the server-side component of
// the overall auction given that there was also an interest group bidding
// component to the overall auction which ran using the Protected Audience
// API. The value is expressed in CPM micros of the buyer account currency.
// The minimum bid to win for the overall auction, including bids from the
// server-side and the on-device interest group components, is populated in
// the minimum_bid_to_win field of the same BidResponseFeedback object.
optional int64 server_side_component_minimum_bid_to_win = 16;
// Billable event rate multiplier that was applied to this bid during
// ranking. The adjustment reflects the likelihood that your bid would
// generate a billable event (namely, the ad renders successfully) if it won
// the auction, relative to the probability that other bids generate a
// billable event if they won the auction. This adjustment can be larger or
// smaller than 1. This affects the final ranking in the auction only; in
// particular, this multiplier does not affect the payment or whether the
// bid clears any floor price.
optional float billable_event_rate_bid_adjustment = 15 [default = 1];
// When a publisher uses an RTB auction and waterfall-based SDK mediation on
// the same query, the winner of the real-time auction must also compete in
// a mediation waterfall (which is ordered by price) to win the impression.
// If the bid participated in the auction and there was no waterfall, the
// value of this field is 0. If the bid participated in the auction and
// there was a waterfall, the value of this field is a price representing a
// sample bid from the eligible mediation networks that were higher than the
// auction winner, weighted by expected fill rate. This field can be used
// in conjunction with minimum_bid_to_win to train bidding models. The CPM
// is in micros of your account currency.
optional int64 sampled_mediation_cpm_ahead_of_auction_winner = 10;
// Event notification token that was included in the bid response.
optional bytes event_notification_token = 5;
// Buyer creative ID that was included in the bid response.
optional string buyer_creative_id = 6;
// Possible types of bid response feedback objects.
enum FeedbackType {
FEEDBACK_TYPE_UNSPECIFIED = 0;
// Feedback for a bid that was submitted on a bid response.
BID_FEEDBACK = 1;
// Feedback for an interest group buyer submitted on a bid response to
// particpate in an interest group bidding component of the auction run
// using the Protected Audience API.
INTEREST_GROUP_BUYER_FEEDBACK = 2;
}
// The type of the BidResponseFeedback message. Google will send separate
// BidResponseFeedback objects for:
// a) Each bid submitted on a bid response
// b) Each buyer submitted on a bid response to particpate in an interest
// group bidding component of the auction run using the Protected Audience
// API.
optional FeedbackType feedback_type = 17;
// Origin of an interest group buyer that was included in the bid response.
// This field is populated only for feedback where a bidder opted in an
// interest group buyer to participate in the interest group bidding
// component of the overall auction run using the Protected Audience API.
// To learn more about origins, see https://www.rfc-editor.org/rfc/rfc6454.
// To learn more about interest group bidding and the Protected Audience
// API, see
// https://developers.google.com/authorized-buyers/rtb/fledge-origin-trial.
optional string buyer_origin = 18;
// The status code for the submitted interest group buyer. This field is
// only populated in the feedback for an interest group buyer that a bidder
// requested to enter into the interest group auction through the bid
// response. Individual creative status codes of bids submitted by the buyer
// in the on-device interest group auction are not available. See
// https://storage.googleapis.com/adx-rtb-dictionaries/interest-group-buyer-status-codes.txt
// for a list of interest group buyer status codes.
optional int32 interest_group_buyer_status_code = 19;
}
repeated BidResponseFeedback bid_response_feedback = 44;
// How many milliseconds Google will wait for a response before ignoring it.
optional int32 response_deadline_ms = 57;
// -----------------------------------------------------------
// Testing options.
//
// If true, then this is a test request. Results will not be displayed to
// users and you will not be billed for a response even if it wins the
// auction. You should still do regular processing since the request may be
// used to evaluate latencies or for other testing. During your initial
// testing with Google traffic any response that you make will be filtered
// out of the auction whether this option has a value of true or false.
optional bool is_test = 15 [default = false];
// If true, then this request is intended to measure network latency.
// Return an empty BidResponse with only processing_time_ms set as quickly as
// possible without executing any bidding logic.
optional bool is_ping = 17 [default = false];
// If true, then the callout model predicted that you will not bid
// on this request. We send a sampled percentage of such requests so that we
// can automatically update the model when bidding patterns change.
optional bool is_predicted_to_be_ignored = 45 [default = false];
// SupplyChain object. For more information, see
// https://github.com/InteractiveAdvertisingBureau/openrtb/blob/master/supplychainobject.md.
message SupplyChain {
// Indicates whether the chain contains all nodes involved in the
// transaction leading back to the owner of the site, app or other medium of
// the inventory.
optional bool complete = 1;
message SupplyChainNode {
// The canonical domain name of the SSP, Exchange, Header Wrapper, etc
// system that bidders connect to. This may be the operational domain of
// the system, if that is different than the parent corporate domain, to
// facilitate WHOIS and reverse IP lookups to establish clear ownership of
// the delegate system. This should be the same value as used to identify
// sellers in an ads.txt file if one exists.
optional string advertising_system_identifier = 1;
// The identifier associated with the seller or reseller account within
// the advertising system. This must contain the same value used in
// transactions, specifically the publisher_id field in the Google
// protocol. Should be limited to 64 characters in length.
optional string seller_identifier = 2;
// Indicates whether this node will be involved in the flow of payment for
// the inventory. When set to true, the advertising system in the
// advertising_system_identifier field pays the seller in the
// seller_identifier field, who is responsible for paying the previous
// node in the chain. When set to false, this node is not involved in the
// flow of payment for the inventory.
optional bool handles_payment = 6;
}
// Array of SupplyChainNode objects in the order of the chain. In a complete
// supply chain, the first node represents the initial advertising system
// and seller ID involved in the transaction, for example, the owner of the
// site, app, or other medium. In an incomplete supply chain, it represents
// the first known node. The last node represents the entity sending this
// bid request.
repeated SupplyChainNode nodes = 2;
// Version of the supply chain specification in use, in the format of
// "major.minor". For example, for version 1.0 of the spec, use the string
// "1.0".
optional string version = 3;
}
optional SupplyChain supply_chain = 69;
// Experimental feature; may be subject to change. See
// https://support.google.com/authorizedbuyers/answer/10890762 for more
// information.
//
// Describes the scope of frequency cap enforcement available for this
// request. Frequency caps to be enforced for a bid can be specified in the
// BidResponse.ad.adslot.frequency_cap field.
enum FrequencyCappingScope {
// Default value which should not be used, or which can indicate that
// frequency cap scope could not be reliably determined.
FREQUENCY_CAPPING_SCOPE_UNKNOWN = 0;
// Frequency capping based on bid response specifications is not available
// for this request. A frequency-capped bid for a bid request with no
// frequency cap availability will be filtered prior to the auction.
FREQUENCY_CAPPING_SCOPE_NONE = 1;
// Frequency capping enforcement is available across multiple sites within
// the same browser.
FREQUENCY_CAPPING_SCOPE_BROWSER = 2;
// Frequency capping enforcement is available across multiple apps on the
// device, excluding browsers.
FREQUENCY_CAPPING_SCOPE_DEVICE = 3;
// Frequency capping enforcement is available within a single app.
FREQUENCY_CAPPING_SCOPE_APP = 4;
// Frequency capping enforcement is available within a single site.
FREQUENCY_CAPPING_SCOPE_SITE = 5;
}
optional FrequencyCappingScope frequency_capping_scope = 70;
// Contains labels indicating the experiment or control groups that are
// active for this request. Work with your account manager to opt in to an
// experiment. The exact set of experiments available, their meaning, and
// whether there is any action required from the bidder varies from experiment
// to experiment and will be communicated separately.
//
// If empty, then this request is not part of any experiment or control group,
// or your bidder is not participating in any experiments.
repeated string experiment_ids = 78;
// The Digital Services Act (DSA) transparency requirements. See
// https://support.google.com/admanager/answer/14335032.
message Dsa {
// Values indicating whether DSA declarations should be included in the bid
// response and, if so, whether or not the publisher is an Online Platform
// (OP) or Very Large Online Platform (VLOP), as defined by the DSA.
enum DsaSupport {
DSA_SUPPORT_UNKNOWN = 0;
// DSA declarations are not required in the bid response.
NOT_REQUIRED = 1;
// DSA declarations are supported, but not required in the bid response.
SUPPORTED = 2;
// DSA declarations are required in the bid response.
REQUIRED = 3;
// DSA declarations are required in the bid response and the publisher is
// an OP or VLOP.
REQUIRED_BY_ONLINE_PLATFORM = 4;
}
// Indicates if DSA declarations should be included in the bid response.
// Bids where DSA declarations are required but not included will not be
// accepted.
optional DsaSupport dsa_support = 1;
// Options describing a publisher's ability to render DSA transparency
// declarations.
enum PublisherRenderingSupport {
PUBLISHER_RENDERING_SUPPORT_UNKNOWN = 0;
// Publisher can't render.
PUBLISHER_UNABLE_TO_RENDER = 1;
// Publisher could render depending on the buyer's rendering capability as
// described in the BidResponse.ad.dsa_transparency.buyer_render field.
PUBLISHER_CAN_RENDER = 2;
// Publisher will render regardless of the buyer's rendering capability as
// described in the BidResponse.ad.dsa_transparency.buyer_render field.
PUBLISHER_WILL_RENDER = 3;
}
// Indicates if the publisher will render the DSA Transparency info. This
// will signal if the publisher is able to and intends to render the icon
// or other appropriate user-facing symbol and display the DSA transparency
// info to the end user.
optional PublisherRenderingSupport publisher_rendering_support = 2;
// Options describing if a publisher requires DSA transparency declarations.
enum DataToPublisher {
DATA_TO_PUBLISHER_UNKNOWN = 0;
// Do not send transparency data.
DO_NOT_SEND = 1;
// Optional to send transparency data.
OPTIONAL = 2;
// Send transparency data.
SEND = 3;
}
// Indicates whether the bidder should provide DSA transparency declarations
// in the bid response. A publisher may need this information for audit or
// other purposes, even if they will not render the transparency
// declarations themselves.
optional DataToPublisher data_to_publisher = 3;
}
// The Digital Services Act (DSA) transparency information requirements.
optional Dsa dsa = 86;
}
// This is the message that you return in response to a BidRequest. You may
// specify zero or more ads. For each ad, you should provide an ad slot on
// which the ad can run. An ad slot is identified by the AdSlot.id from the
// BidRequest. If you do not want to bid, submit a response with no ads and
// with only the processing_time_ms set.
message BidResponse {
message Ad {
// The event notification token is sent to AdX by bidders for
// troubleshooting. AdX will include the token in real-time feedback for the
// bid. The content of the token will not be logged by AdX. AdX will ignore
// any token longer than 128 bytes.
optional bytes event_notification_token = 25;
// A unique identifier chosen by you for the creative in this response.
// This must always be set, must be limited to at most 64 bytes, and must be
// a valid UTF8 string. Every buyer_creative_id you use must always be
// associated with the same creative. This field is used to communicate
// approval statuses when issues are found. Do not specify the same id for
// different creatives, or all creatives will be disapproved if a problem
// with a single creative is found. Do not specify different ids for the
// same creative in different responses or no creatives will be served since
// approval status is assigned on a per-id basis.
optional string buyer_creative_id = 10;
// Only one of the following should be set:
// 1) html_snippet, 2) video_url, 3) native_ad, or 4) sdk_rendered_ad.
//
// The HTML snippet that will be placed on the web page to display the ad.
// Use BidResponse.Ad.AdSlot.billing_id to indicate which billing id
// this snippet is attributed to.
optional string html_snippet = 1;
// The URL to fetch a video ad. The URL should return an XML response that
// conforms to the VAST 2.0 or 3.0 standard. Use
// BidResponse.Ad.AdSlot.billing_id to indicate which billing id to
// attribute this ad to. Only one of the following should be set:
// html_snippet, video_url. Only set this field if the BidRequest is for an
// in-video ad (BidRequest.video is present).
optional string video_url = 9;
// The VAST document to be returned. This document should conform to the
// VAST 2.0 or 3.0 standard. Use BidResponse.Ad.AdSlot.billing_id to
// indicate which billing ID to attribute this ad to.
// Only set this field if the BidRequest is for an in-video ad and the
// response is VAST XML.
optional string video_vast_xml = 24;
// The URL to fetch an AMPHTML ad. Only one of the following should be set:
// html_snippet, video_url, amp_ad_url, native_ad.
optional string amp_ad_url = 23;
// The content of a native ad. Native ads consist of multiple building
// blocks, which are rendered by the publisher. Only one of the following
// should be set: html_snippet, video_url, or native_ad.
// Only set this field if the BidRequest is for a native ad
// (BidRequest.adslot.native is present).
message NativeAd {
// A video in the form of either a URL for a VAST tag, or an in-line VAST
// tag. Only set this field if VIDEO is required or recommended in the
// BidRequest's NativeAdTemplate.
oneof video {
// The URL to fetch a video ad. The URL should return an XML response
// that conforms to VAST standards.
string video_url = 13;
// The VAST document to be returned. Max size is 100kB.
string video_vast_xml = 16;
}
// A short title for the ad.
optional string headline = 1;
// A long description of the ad.
optional string body = 2;
// A label for the button that the user is supposed to click
optional string call_to_action = 3;
// The name of the advertiser or sponsor, to be displayed in the ad
// creative.
optional string advertiser = 4;
message Image {
optional string url = 1;
// Image width and height are specified in pixels. You may provide a
// larger image than was requested, so long as the aspect ratio is
// preserved.
optional int32 width = 2;
optional int32 height = 3;
}
// A large image.
optional Image image = 5;
// A smaller image, for the advertiser's logo.
optional Image logo = 6;
// The app icon, for app download ads.
optional Image app_icon = 7;
// The app rating in the app store. Must be in the range [0-5].
optional double star_rating = 8;
// The URL that the browser/SDK will load when the user clicks the ad.
// This can be the landing page directly, or the first step of a redirect
// chain that eventually leads to it. For backward compatibility, if this
// is not set, the first Ad.click_through_url is used.
optional string click_link_url = 14;
// This field is deprecated in favor of the repeated click_tracking_urls
// field at the BidResponse.Ad level. It will be removed at the end of
// Q2 2022.
// The URL to use for click tracking. The SDK pings click tracking url on
// a background thread. When resolving the url, HTTP 30x redirects are
// followed. The SDK ignores the contents of the response; this URL
// has no effect on the landing page for the user.
optional string DEPRECATED_click_tracking_url = 11 [deprecated = true];
// This field is deprecated in favor of the click_tracking_urls
// field at the BidResponse.Ad level. It will be removed at the end of
// Q2 2022.
// The URLs to use for click tracking. This will be used throughout the
// serving stack and will incorporate any URL in click_tracking_url.
repeated string DEPRECATED_click_tracking_urls = 15 [deprecated = true];
// The price of the promoted app including the currency info.
optional string price = 10;
}
optional NativeAd native_ad = 18;
// The set of destination URLs for the snippet. This includes the URLs that
// the user will go to if they click on the displayed ad, and any URLs that
// are visible in the rendered ad. Do not include intermediate calls to the
// adserver that are unrelated to the inal landing page. A BidResponse that
// returns a snippet or video ad but declares no click_through_url will be
// discarded. Only set this field if html_snippet or video_url or native_ad
// are set. This data is used as a destination URL declaration, for example
// for post-filtering of publisher-blocked URLs or ad categorization.
//
// For non-native ads, it is not used for click tracking or any
// other ad functionality; it is only used as a destination URL
// declaration.
//
// For native ads, if NativeAd.click_link_url is not set, the first
// value of click_through_url is used to direct the user to the landing
// page. In addition, all values are used as destination
// URL declarations (similar to the non-native case).
repeated string click_through_url = 4;
// All vendor types for the ads that may be shown from this snippet. You
// should only declare vendor ids listed in the vendors.txt file in the
// technical documentation. We will check to ensure that the vendors you
// declare are in the allowed_vendor_type list sent in the BidRequest for
// AdX publishers.
repeated int32 vendor_type = 5;
// All attributes for the ads that may be shown from this snippet. See
// buyer-declarable-creative-attributes.txt in the technical documentation
// for a list of ids. We will check to ensure none of these attributes are
// in the excluded_attribute list in the BidRequest.
repeated int32 attribute = 6;
// All sensitive categories for the ads that may be shown from this snippet.
// See ad-sensitive-categories.txt in the technical documentation for a list
// of ids. We will check to ensure none of these categories were in the
// excluded_sensitive_category list in the BidRequest.
repeated int32 category = 7;
// All restricted categories for the ads that may be shown from this
// snippet. See ad-restricted-categories.txt in the technical documentation
// for a list of ids. We will check to ensure these categories were listed
// in the allowed_restricted_category list in the BidRequest. If you are
// bidding with ads in restricted categories you MUST ALWAYS declare them
// here.
repeated int32 restricted_category = 17;
// All names of the ad's advertisers.
repeated string advertiser_name = 11;
// The width and the height in pixels of the ad. Setting these is optional.
// However, these must be set if the bid BidRequest.AdSlot has more than one
// width and height or if BidRequest.Mobile.is_interstitial_request is true.
optional int32 width = 14;
optional int32 height = 15;
message AdSlot {
// The slot id from the BidRequest that the ad may appear in.
required int32 id = 1;
// The maximum CPM you want to be charged if you win the auction for this
// ad slot, expressed in micros of the specified currency or default
// bidding currency. For example, to bid a CPM of 1.29 USD, set
// max_cpm_micros = 1290000. Winning bids are rounded up to billable
// units. For example, in USD, bids are rounded up to the next multiple
// of 10,000 micros (one cent).
required int64 max_cpm_micros = 2;
// The minimum CPM you want to be charged if you win the auction for this
// ad slot, expressed in micros of the specified currency or default
// bidding currency. This may represent a second price if you choose
// max_cpm_micros as the highest of several bids, or some form of reserve
// price if you want to override the reserve price set by the publisher.
// The bid must be less than or equal to max_cpm_micros or it will be
// ignored. This field is optional and does not need to be set. This
// field is not applicable when responding to bid requests with
// auction_type set to FIRST_PRICE.
optional int64 min_cpm_micros = 3;
// The currency used by max_cpm_micros and min_cpm_micros, using ISO-4217
// alpha codes. If this field is populated, the specified currency will
// be used to interpret the bid. Otherwise, the default bidding currency
// will be used, which is determined in the following priority:
// 1. The bidder-level currency, if configured in RTB account settings.
// 2. The buyer-level currency. The buyer will be determined by the
// billing ID specified in the billing_id field of the bid response if it
// is populated, otherwise it will be based on the sole billing ID sent
// in the bid request.
//
// The currency of a buyer account is set on account creation and can be
// checked by contacting a Technical Account Manager.
optional string currency = 15;
// Billing id to attribute this impression to. The value must be in the
// set of billing ids for this slot that were sent in the
// BidRequest.AdSlot.matching_ad_data.billing_id. This must always be set
// if the BidRequest has more than one
// BidRequest.AdSlot.matching_ad_data.billing_id or if the bidder has
// active child seats.
optional int64 billing_id = 4;
// The deal id that you want this bid to participate in. Leave unset
// or set it to "1" if a deal is available but you want to
// ignore the deal and participate in the open auction.
optional int64 deal_id = 5 [default = 0];
// For exchange bidders (third party exchanges doing real-time bidding on
// DFP), the deal id from the exchange's namespace that is associated with
// this bid and reported to publishers. Leave unset if there is no
// associated deal. This is arbitrary UTF8 text and must be at most 64
// bytes.
optional string exchange_deal_id = 6;
// When exchange_deal_id is set, the type of deal. This is reported to
// publishers and affects how the deal is treated in the auction.
enum ExchangeDealType {
OPEN_AUCTION = 0;
PRIVATE_AUCTION = 1;
PREFERRED_DEAL = 2;
EXCHANGE_AUCTION_PACKAGE = 3;
}
optional ExchangeDealType exchange_deal_type = 7 [default = OPEN_AUCTION];
// The seat ID in the bidder's namespace representing the seat on whose
// behalf this bid was made.
optional string seat_id = 25;
// Buyer declared ID which will be used to break down cost transparency
// metrics in Reporting. Note that IDs with fewer than 1000 impressions
// will not be used to break down metrics. IDs longer than 64 bytes will
// be ignored.
optional string buyer_reporting_id = 8;
// Token used to identify end third party buyer information if an
// exchange as an open bidder is an intermediary. This is obtained from
// the third party buyer and must be passed to Google unaltered in the bid
// response.
optional string third_party_buyer_token = 12;
// Experimental feature; may be subject to change. See
// https://support.google.com/authorizedbuyers/answer/10890762 for more
// information.
//
// Specifies frequency capping to be applied to the bid. Impressions for
// each user are capped at the level specified by frequency_cap_id. A bid
// will not participate in the auction if an additional impression for the
// user would violate any of the specified caps. Multiple frequency caps
// can be specified for the same frequency_cap_id.
//
// A bid is filtered before the auction if the frequency cap is malformed.
// Instances where the cap is malformed include:
// - frequency_cap_id is empty or is very long
// - max_mpressions or time_range are non-positive
// - there are a large number of frequency caps for a single bid
// - time_unit is not specified
//
// Note that if a subsequent bid with the same frequency_cap_id uses a
// different duration (represented by time_unit and time_range) then
// impressions counted against the old frequency cap will not count
// against the new one, and the impressions counted against the new
// frequency cap with a different time_unit and time_range will not count
// against the old frequency cap..
message FrequencyCap {
// An ID that can represent a bidder's use-case for frequency capping.
// For example, it could represent their campaign, ad, line item, or
// some other entity. It should not contain any user-specific
// information or identifiers and should not be longer than 64
// characters.
optional string frequency_cap_id = 1;
// The time units for which frequency caps can be enforced.
enum TimeUnit {
UNKNOWN_TIME_UNIT = 0;
MINUTE = 1;
DAY = 2;
WEEK = 3;
MONTH = 4;
// When INDEFINITE is used, time_range will be ignored. INDEFINITE
// means the frequency cap will be applied for a long period of time,
// (longer than a month) but not necessarily forever.
INDEFINITE = 5;
}
// The unit of time used to specify the time window for which a
// frequency cap applies.
optional TimeUnit time_unit = 2;
// The length of the time window, in units specified by time_unit, for
// which the frequency cap applies. For instance, if time_unit=WEEK and
// time_range=3, then capping is applied for a three week period. If the
// time_unit=INDEFINITE, this will be ignored.
optional int32 time_range = 3 [default = 1];
// The maximum number of impressions allowed to be shown to a user for
// the provided frequency_cap_id within the time window described by
// time_unit and time_range.
optional int32 max_impressions = 4;
}
repeated FrequencyCap frequency_cap = 16;
// Position within the pod.
enum PodPosition {
// Any position in the pod.
POD_POSITION_ANY = 0;
// Last position in the pod.
POD_POSITION_LAST = 1;
// First position in the pod.
POD_POSITION_FIRST = 2;
// First or last position in the pod.
POD_POSITION_FIRST_OR_LAST = 3;
}
// Indicates that the bid is only eligible
// for a specific position within the pod.
optional PodPosition position_in_pod = 22;
// All bids with the same bid_group_id will be won or lost as a group.
// Bids must have a non-empty bid_group_id to allow an ad to be played
// as part of a pod.
// This field is currently only supported for rewarded video pods
// requests. If an ad is submitted on multiple positional bids
// represented by AdSlot messages, each bid (AdSlot message)
// must have a different bid_group_id.
// For example, if a bidder wants to bid ad_1 for first position
// and last position in the pod and ad_2 for any position and
// want to ensure either both win at the same time or neither of those
// wins, bidder needs to submit:
// ad {
// buyer_creative_id: "ad_1",
// adslot {
// position_in_pod: POD_POSITION_FIRST,
// bid_group_id: "group1"
// },
// adslot {
// position_in_pod: POD_POSITION_LAST,
// bid_group_id: "group2"
// }
// },
// ad {
// buyer_creative_id: "ad_2",
// adslot {
// position_in_pod: POD_POSITION_ANY,
// bid_group_id: "group1"
// },
// adslot {
// position_in_pod: POD_POSITION_ANY,
// bid_group_id: "group2"
// }
// }
optional string bid_group_id = 23;
}
repeated AdSlot adslot = 3;
// The URLs to call when the impression is rendered. This is supported for
// all inventory types and all formats.
repeated string impression_tracking_url = 19;
// The URLs to call when the user clicks on the ad. Currently supported only
// for native ads and Programmatic Guaranteed deals with publisher-
// managed creatives. In the publisher managed case, these click trackers
// will be sent to the bidder server to server. In all other cases, these
// will be sent from the user's device. For more information on
// publisher-managed creatives, see
// https://support.google.com/admanager/answer/9243220.
repeated string click_tracking_urls = 30;
// Link to ad preferences page. This is only supported for native ads.
// If present, a standard AdChoices icon is added to the native creative and
// linked to this URL.
optional string ad_choices_destination_url = 21;
message ImpressionTrackingResource {
// The URL of a Javascript resource. The URLs should not contain script
// tags. For example: "https://mycdn.com/tracker.js".
optional string script_url = 1;
// Additional context provided for rendering.
enum Context {
UNKNOWN_CONTEXT = 0;
// Currently not supported.
OMID = 1;
}
repeated Context context = 2;
// Parameters associated with the resource that will be passed to the
// resource when it is loaded. The format of the parameters is dependent
// on the script vendor.
optional string verification_parameters = 3;
// Used to uniquely identify the verification script provider.
optional string vendor_key = 4;
}
// Resources to invoke when the impression is rendered. This is supported
// for native and banner formats only and explicitly allowed scripts
// only.
repeated ImpressionTrackingResource impression_tracking_resource = 26;
// An ad that will be rendered by an SDK known to the buyer. This can only
// be used when the BidRequest included a mobile.installed_sdk submessage.
message SdkRenderedAd {
// The identifier for the SDK that will render the ad. Must match a
// mobile.installed_sdk.id sent in the corresponding bid request.
optional string id = 1;
// Data to pass to the SDK in order to render the ad. This data is opaque
// to the publisher and to Google.
optional string rendering_data = 2;
// Declared ad assets to support creative scanning, classification, and
// enforcement of ad policy and publisher blocks for ads rendered with a
// custom SDK.
message DeclaredAd {
// Ad content used by SDK to render an ad.
oneof content {
// The HTML snippet representative of the SDK-rendered ad.
string html_snippet = 1;
// The URL to the VAST asset used in the SDK-rendered ad.
string video_url = 2;
// The VAST document used to render custom SDK-rendered ad. This
// document should conform to the VAST 2.0 or 3.0 standard.
string video_vast_xml = 5;
// The content of a native ad. Native ads consist of multiple building
// blocks (such as image and text), which are rendered by the buyer
// SDK.
NativeAd native_ad = 6;
}
// The final landing pages of the SDK-rendered ad.
repeated string click_through_url = 4;
}
optional DeclaredAd declared_ad = 6;
}
optional SdkRenderedAd sdk_rendered_ad = 27;
// Advertiser's SKAdNetwork information to support app installation
// attribution for iOS 14 and later. Apple's SKAdNetwork API helps
// advertisers measure ad-driven app installation by sending a postback
// to the ad network after a successful install. Ad networks will need
// to send their network ID and signed advertiser information to allow
// an install to be attributed to the ad impression.
// For more info visit:
// https://developer.apple.com/documentation/storekit/skadnetwork
message SKAdNetworkResponse {
// Version of SKAdNetwork supported by the advertiser. Also used to
// specify how the signature was generated by the advertiser. This
// should match the version from BidRequest.mobile.skad.version.
optional string version = 1;
// Ad network identifier used in signature. This should match one of the
// items in BidRequest.mobile.skad.skadnetids.
optional string network = 2;
// Campaign ID compatible with Apple's spec. Used in SKAdNetwork 3.0 and
// below. Replaced by Source Identifier (`source_identifier` field) in
// SKAdNetwork 4.0 and above.
optional int64 campaign = 3;
// A four-digit integer that ad networks define to represent the ad
// campaign. Used in SKAdNetwork 4.0+ and replaces the `campaign` field.
optional int64 source_identifier = 11;
// ID of advertiser's app in Apple's app store.
optional string itunesitem = 4;
// ID of custom product page to display (for iOS 15 or later).
// If not specified, default product page will be displayed.
// See https://developer.apple.com/app-store/custom-product-pages/
// for more details about custom product pages.
optional string product_page_id = 12;
// SKAdNetwork API starting from version 2.2 supports multiple ad
// presentation options specified by the `fidelity-type` parameter of the
// SKAdNetwork signature. This holds parameters used to generate the
// signature that would be different for each fidelity type supported.
// For more info visit:
// https://developer.apple.com/documentation/storekit/skadnetwork/signing_and_providing_ads
message Fidelity {
// The fidelity type of the attribution to track.
optional SKAdNetworkFidelityType fidelity_type = 1 [default =
STOREKIT_RENDERED_ADS];
// A unique all-lowercase UUID generated by the advertiser to use for
// generating the signature.
optional string nonce = 2;
// Unix time in millis used at the time of signature generation.
optional int64 timestamp = 3;
// SKAdNetwork signature as specified by Apple.
optional string signature = 4;
}
repeated Fidelity fidelities = 9;
// A unique all-lowercase UUID generated by the advertiser to use for
// generating the signature.
// Note: This field will be deprecated in favor of the
// BidResponse.ad.skadn.fidelities.nonce field to support multiple
// fidelity types.
optional string nonce = 5;
// ID of publisher's app in Apple's app store. This should match the ID
// from BidRequest.mobile.skad.sourceapp.
optional string sourceapp = 6;
// Unix time in millis used at the time of signature generation.
// Note: This field will be deprecated in favor of the
// BidResponse.ad.skadn.fidelities.timestamp field to support multiple
// fidelity types.
optional int64 timestamp = 7;
// SKAdNetwork signature as specified by Apple.
// Note: This field will be deprecated in favor of the
// BidResponse.ad.skadn.fidelities.signature field to support multiple
// fidelity types.
optional string signature = 8;
// These options indicate how to present SKOverlay recommending the
// advertised app.
// Supported by iOS 14 and later.
//
// For more info visit:
// https://developer.apple.com/documentation/storekit/skoverlay
message SKOverlay {
// Delay in seconds after the ad begins before presenting the overlay.
// If this field is set to 0, the overlay will be shown immediately
// after the ad begins. If this field is unset, the overlay will not
// be shown for the ad.
optional int32 delay_seconds = 1;
// Delay in seconds after the endcard shows before presenting the
// overlay. (This field only applies to rewarded or interstitial video
// creatives.) If this field is set to 0, the overlay will be shown
// immediately after the endcard shows. If this field is unset,
// the overlay will not be shown for the endcard.
// If both `delay_seconds` and `endcard_delay_seconds` are set,
// the overlay will be automatically dismissed when the ad ends,
// and shown again after the endcard shows.
optional int32 endcard_delay_seconds = 2;
// Whether this overlay can be dismissed by the user.
optional bool dismissible = 3 [default = true];
}
optional SKOverlay skoverlay = 13;
// Deprecated. This message will be removed in July 2025.
// Google Mobile Ads SDK options for SKAdNetwork handling.
message SKAdNetworkOptions {
// Deprecated. This field will be removed in July 2025.
// By default, SKAdNetwork attribution will only be initiated if the
// click-through URL lands on the app store, either as a direct link to
// the app store or as the final destination of a server-side redirect
// chain. Enables GMA SDK to always initiate SKAdNetwork
// attribution on-click regardless of the detected click's final
// destination URL. Note that enabling this will launch the app store
// even for clicks that are not meant to open the app store, for example
// clicks on Ad Choices icon. For more info, see:
// https://developers.google.com/authorized-buyers/rtb/skadnetwork
optional bool always_open_appstore = 1 [deprecated = true, default =
false];
}
// Deprecated. This field will be removed in July 2025.
optional SKAdNetworkOptions skadn_options = 10 [deprecated = true];
}
optional SKAdNetworkResponse skadn = 29;
// ID of the advertised app (only for app promotion).
// On Android, this should be a bundle or package name such as
// com.foo.mygame. On iOS, it is a numeric ID.
//
// In addition to this field, set the app_promotion_type field below to take
// advantage of features specific to app promotion types.
optional string advertised_app_id = 32;
// Possible types of app promotion.
enum AppPromotionType {
UNKNOWN_APP_PROMOTION_TYPE = 0;
// For encouraging new users to download and install the advertised app.
// Clicking this ad will show the app store listing as an overlay (for
// supported formats), without leaving the publisher app.
// Click through URL for this ad points to the app store listing.
INSTALLS = 1;
// Other types of app promotion that do not fall into the categories
// above. No features specific to app promotion types will apply.
OTHER = 3;
}
// Type of the app promotion corresponding to the advertised app specified
// in the advertised_app_id field above.
// If the advertised app is not specified, this field will be ignored.
//
// Setting advertised_app_id field without this field will be treated as if
// this field were set to OTHER.
optional AppPromotionType app_promotion_type = 33;
// DSA Ad Transparency declarations. See
// https://support.google.com/admanager/answer/14335032.
message DsaTransparency {
// Free text string describing the name of the advertiser on whose behalf
// the ad is shown. Bids will not be accepted if this value is longer
// than 100 characters.
optional string displayed_on_behalf = 1;
// Free text string describing the advertiser who paid for the ad. Must
// always be included even if it's the same as what is listed in the
// displayed_on_behalf attribute. Bids will not be accepted if this value
// is longer than 100 characters.
optional string paying_entity = 2;
// Indicates that the buyer will render their own DSA transparency
// information inside the creative.
optional bool buyer_render = 3;
}
// DSA Ad Transparency information provided by the buyer.
optional DsaTransparency dsa_transparency = 39;
}
repeated Ad ad = 2;
// If is_test was set in the BidRequest, then you may return debug information
// as plain text in this field. Don't set this field under normal
// conditions, or set it to values longer than 100 characters. You should only
// use this field when asked to do so as part of troubleshooting particular
// problems.
optional string debug_string = 5;
// Set this to the processing time in milliseconds from when you
// received the request to when you returned the response.
optional int32 processing_time_ms = 4;
// An optional, bidder-specified reason for not submitting a bid. This field
// is equivalent to BidResponse.nbr in the OpenRTB protocol and uses the same
// namespace of no-bid reason codes. See
// https://developers.google.com/authorized-buyers/rtb/downloads/no-bid-reasons.txt
// for the full set of no-bid reason codes.
optional int32 no_bid_reason = 6;
}
// SKAdNetwork API starting from version 2.2 supports multiple ad
// presentation options specified by the `fidelity-type` parameter of the
// SKAdNetwork signature. The following are the fidelity types supported by
// Apple. For more info visit:
// https://developer.apple.com/documentation/storekit/skadnetwork/signing_and_providing_ads
enum SKAdNetworkFidelityType {
// Attribution for app installs within 24 hours of viewing an ad for at least
// 3 seconds. Supported for SKAdnetwork version 2.2 and up. For more info see:
// https://developer.apple.com/documentation/storekit/skadnetwork/generating_the_signature_to_validate_view-through_ads
VIEW_THROUGH_ADS = 0;
// Attribution for app installs initiated from the StoreKit-rendered App Store
// product page driven by ad clicks. Supported for all SKAdNetwork versions.
// For more info see:
// https://developer.apple.com/documentation/storekit/skadnetwork/generating_the_signature_to_validate_storekit-rendered_ads
STOREKIT_RENDERED_ADS = 1;
}