Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Protocol version: v.162
// Copyright 2019 Google Inc. All Rights Reserved.
syntax = "proto2";
package com.google.protos.adx;
option java_outer_classname = "NetworkBid";
// 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;
}
// When set, the user's cookie/id data allows only restricted usage and is not
// available in the usual fields.
// The impacted fields are:
// * google_user_id
// * hosted_match_data
// * mobile.encrypted_advertising_id
// * mobile.encrypted_hashed_idfa
repeated UserDataTreatment user_data_treatment = 49;
// The Google ID for the user as described in the documentation for the cookie
// matching service. 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 is 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;
// 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;
// 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, please refer to
// https://developers.google.com/adwords/api/docs/appendix/codes-formats#country-codes
optional string publisher_country = 55;
// Location of the end user. Uses a subset of the codes used in the AdWords
// 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.
optional int32 geo_criteria_id = 39;
// Detected postal code of the appropriate type for the country of the end
// user (e.g. 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;
optional string postal_code_prefix = 34;
// A hyperlocal targeting location when available.
//
message Hyperlocal {
// A location on the Earth's surface.
//
message Point {
optional float latitude = 1;
optional float longitude = 2;
}
// The mobile 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 the 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;
}
// Hyperlocal targeting signal when available, encrypted as described at
// https://developers.google.com/authorized-buyers/rtb/response-guide/decrypt-hyperlocal
optional bytes encrypted_hyperlocal_set = 40;
// Unencrypted version of encrypted_hyperlocal_set. This field is only set
// when using an SSL connection.
optional HyperlocalSet hyperlocal_set = 53;
// The offset of the user's time from GMT in minutes. For example, GMT+10 is
// timezone_offset = 600.
optional int32 timezone_offset = 25;
// List of detected user verticals. Currently unused.
repeated int32 user_vertical = 30 [
packed=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;
// 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;
// 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 site
// is not anonymous and the publisher allows site targeting. You can use
// anonymous_id for targeting if the inventory is anonymous. Otherwise, use
// detected_vertical's. Only one of url or anonymous_id is ever set in the
// same request. This always starts with a protocol (either http or https).
optional string url = 11;
// An id for the domain of the page. This is set when the inventory is
// anonymous. Only one of url or anonymous_id is ever set in the same
// request.
optional string anonymous_id = 19;
// 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/adwords/api/docs/appendix/languagecodes
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];
// 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;
// The brand of the device, e.g. Nokia, Samsung.
optional string brand = 3 [default = ""];
// The model of the device, e.g. N70, Galaxy.
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;
optional int32 minor = 2;
optional int32 micro = 3;
}
// The OS version; e.g. 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 via a carrier (as opposed to via WiFi). To look up carrier
// name and country from carrier ID, please refer to:
// https://developers.google.com/adwords/api/docs/appendix/mobilecarriers.
optional int64 carrier_id = 6;
// 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 (e.g. 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
// 640x1080 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];
// Apple iOS device model, e.g., "iphone 5s", "iphone 6+", "ipad 4".
optional string hardware_version = 11;
}
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 smartphone 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. is_app may also be true for
// anonymous inventory, in which case anonymous_id will be set. 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, e.g., 343200656. For Android devices, this is the fully qualified
// package name, e.g., com.rovio.angrybirds. For Windows devices it's the
// App ID, e.g., 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, please refer to
// https://developers.google.com/adwords/api/docs/appendix/mobileappcategories
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];
// 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 (i.e. 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;
optional int32 minor = 2;
optional int32 micro = 3;
}
// 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;
}
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,
// (e.g., 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;
}
optional Placement placement = 16 [default=UNKNOWN_PLACEMENT];
// 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 (e.g. 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 (e.g. 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;
// 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;
VIDEO_FLV = 0; // Flash video files are accepted (FLV).
VIDEO_MP4 = 1;
YT_HOSTED = 2; // Valid VAST ads with at least one media file hosted
// on youtube.com.
VPAID_FLASH = 3; // Flash VPAID (SWF).
VPAID_JS = 4; // JavaScript VPAID.
AUDIO_MP3 = 5;
AUDIO_OGG = 6;
AUDIO_MP3_OGG = 7; // Requires both MP3 & OGG as Google does not know
// which codecs are installed on the player.
VIDEO_WEBM = 8;
VIDEO_MOV = 9;
VIDEO_3GPP = 10;
VIDEO_HLS = 11;
VIDEO_DASH = 12;
AUDIO_MP4A = 13; // Audio version of MP4.
};
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 {
END_CAP_NOT_ENABLED = 0; // Companion ad won't be rendered as end cap.
END_CAP_OPTIONAL = 1; // End cap will be rendered if response contains
// eligible companion banner, but companion
// banner is not required.
// Not used at this time.
END_CAP_FORBIDDEN = 2; // Response with companion ad is filtered.
// Not used at this time.
END_CAP_REQUIRED = 3; // Response without companion ad is filtered.
}
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 title of the video.
optional string title = 1;
// The duration of the video, in seconds.
optional int32 duration_seconds = 2;
// A list of keywords describing the video, extracted from the content
// management system of the video publisher. There will be no more than 10
// keywords in this list.
repeated string keywords = 3;
}
optional ContentAttributes content_attributes = 9;
// The type of inventory from which request is sent.
// Deprecated but will continue to be filled in until January 2017.
// Use the placement field to determine if inventory is interstitial or
// instream. Use Device.device_type to determine if the request comes from
// a mobile device and Mobile.is_app to determine if the request comes from
// an app.
// WEB_VIDEO is INSTREAM placements from web browsers.
// GAMES consists of INTERSTITIAL placements from both apps and web
// browsers.
// MOBILE_INTERSTITIAL is INTERSTITIAL placements from apps only.
// This inventory also allows display ads. You can tell if an adslot allows
// display ads if adslot->excluded_attributes does not contain 21
// (CreativeType: Html)
// MOBILE_APP_VIDEO is INSTREAM placement from apps only.
enum InventoryType {
WEB_VIDEO = 0;
GAMES = 1;
MOBILE_INTERSTITIAL = 2;
MOBILE_APP_VIDEO = 3;
}
optional InventoryType DEPRECATED_inventory_type = 3 [default = WEB_VIDEO];
}
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 an AdX
// publisher, its inventory can be either owned and operated (O&O),
// represented by the publisher, or of unknown status. AdSense and AdMob
// inventory is represented by Google.
enum PublisherType {
UNKNOWN_PUBLISHER_TYPE = 0;
ADX_PUBLISHER_OWNED_AND_OPERATED = 1;
ADX_PUBLISHER_REPRESENTED = 2;
GOOGLE_REPRESENTED = 3;
};
optional PublisherType publisher_type = 51 [default = UNKNOWN_PUBLISHER_TYPE];
// -----------------------------------------------------------
// 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;
// Set of channels of which this ad slot is a member. A channel is a set of
// ad slots on a site. You can target a channel (like "the sports section",
// or "all top banners") to get more fine-grained control over where your ad
// shows. Channel names are provided by the publisher.
repeated string targetable_channel = 10;
// 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;
// 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 providers for whom the publisher has told
// Google that its EEA users have consented to the use of their personal
// data for ads personalization. A mapping of provider ID to provider name
// is posted at providers.csv.
repeated int64 consented_providers = 2 [packed = true];
}
// Information about the providers for whom the publisher has told Google
// that its EEA users have consented to the use of their personal data for
// ads personalization. This field will only be populated when regs_gdpr is
// true.
optional ConsentedProvidersSettings consented_providers_settings = 42;
// AdX fills this field solely based on whether the impression will serve to
// an EEA user, based on information available to Google. It does not
// constitute legal guidance on GDPR. This field is equivalent to
// Regs.ext.gdpr in AdX OpenRTB.
optional bool regs_gdpr = 43;
// 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/adwords/api/docs/appendix/languagecodes.
// 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];
// 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. Please contact your account manager if you would like
// to enable this feature.
repeated ExcludedCreative excluded_creatives = 18;
// 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 your account currency.
optional int64 minimum_cpm_micros = 5;
// This message is deprecated.
message BuyerPricingRule {
// Only one of the included_advertisers and excluded_advertisers fields
// can be set in a rule. See advertisers.txt file in the technical
// documentation for a list of ids.
repeated int64 included_advertisers = 1;
repeated int64 excluded_advertisers = 2;
// Only one of the included_agencies and excluded_agencies fields can be
// set in a rule. See agencies.txt file in the technical documentation
// for a list of ids.
repeated int64 included_agencies = 3;
repeated int64 excluded_agencies = 4;
// Only one of the blocked and minimum_cpm_micros can be set in a rule.
// If set to true, indicates that the specified advertisers/agencies are
// blocked from bidding.
optional bool blocked = 5;
// Minimum CPM value that you can bid to not be filtered before the
// auction. The value is in micros of the bidder account currency.
optional int64 minimum_cpm_micros = 6;
}
// This field is deprecated and will no longer be populated.
repeated BuyerPricingRule DEPRECATED_pricing_rule = 7;
// 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 your account
// 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 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,
// however it will not increase your chance to win for other types of
// deals.
optional int64 fixed_cpm_micros = 2;
// The type of the deal.
enum DealType {
UNKNOWN_DEAL_TYPE = 0;
PREFERRED_DEAL = 1;
PRIVATE_AUCTION = 2;
// See https://support.google.com/authorizedbuyers/answer/7174589
PROGRAMMATIC_GUARANTEED = 3;
// See https://support.google.com/authorizedbuyers/answer/7516884
AUCTION_PACKAGE = 4;
}
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];
// This is deprecated. Please ignore.
optional int64 DEPRECATED_remaining_impressions_to_buy = 6;
// Value between 0 and 1 only set for Programmatic Guaranteed deals.
// Buyers are required to bid if must_bid_level = 1 and can decide
// whether to bid if must_bid_level < 1.
optional double must_bid_level = 7 [default = 1.0];
}
repeated DirectDeal direct_deal = 6;
}
repeated MatchingAdData matching_ad_data = 9;
// 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 {
// UTF8 strings optionally provided by the publisher as part of their
// matching yield group configurations in the DFP UI. The format is
// arbitrary and should be agreed upon by the publisher and the exchange
// bidder.
repeated string publisher_parameter = 1;
// Repeated KeyValue pairs to be sent from the publisher to the
// exchange bidder.
repeated KeyValue key_value = 3;
}
optional ExchangeBidding exchange_bidding = 28;
// 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] and rounded down to the next multiple of 10. 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 AdWords.
optional float click_through_rate = 25 [default = -1.0];
// 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 AdWords.
optional float video_completion_rate = 30 [default = -1.0];
// 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 {
// 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 = 0x0;
HEADLINE = 0x1;
BODY = 0x2;
CALL_TO_ACTION = 0x4;
ADVERTISER = 0x8;
IMAGE = 0x10;
LOGO = 0x20;
APP_ICON = 0x40;
STAR_RATING = 0x80;
PRICE = 0x100;
DEPRECATED_STORE = 0x200;
VIDEO = 0x400;
}
// 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;
// This field is deprecated.
optional int32 DEPRECATED_store_max_safe_length = 14;
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;
}
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 - i.e., 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, etc.
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;
USER_ACTION = 1; // Refresh triggered by user-initiated action such
// as scrolling.
EVENT = 2; // Event-driven content change. For example, ads refresh
// when the football game score changes on the page.
TIME = 3; // Time-based refresh. Ads refresh on a predefined time
// interval even without user activity.
}
// 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.
// Next Tag: 4
message StickySettings {
// Specifies the allowable sticky settings values.
enum Stickiness {
UNKNOWN_STICKINESS = 0;
IS_STICKY = 1;
}
// Whether the request originated from an ad slot that scrolls along with
// the contents of the page vertically.
optional Stickiness vertical_stickiness = 1
[default = UNKNOWN_STICKINESS];
// Whether the request originated from an ad slot that scrolls along with
// the contents of the page horizontally, and is located at the top of the
// page.
optional Stickiness top_horizontal_stickiness = 2
[default = UNKNOWN_STICKINESS];
// Whether the request originated from an ad slot that scrolls along with
// the contents of the page horizontally, and is located at the bottom of
// the page.
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];
// Publisher declaration stating that this ad slot will serve an
// interstitial ad. An interstitial ad covers the content for a period of
// time.
optional bool is_interstitial_slot = 35 [default = false];
// 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, etc.
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];
// Data, opaque to Google and to the publisher, generated by the buyer
// within the publisher's mobile application.
message BuyerGeneratedRequestData {
// Identification for the source of the buyer generated request data when
// that source is from within an application.
message SourceApp {
// Identifier for the SDK that generated this data. It will match the id
// in mobile.installed_sdk.id.
optional string id = 1;
}
// The source of the data.
oneof source {
SourceApp source_app = 1;
}
// Data sent from the buyer's source within the publisher's domain to the
// bidder. This data is opaque to the publisher and to Google.
optional string data = 2;
}
repeated BuyerGeneratedRequestData buyer_generated_request_data = 41;
}
repeated AdSlot adslot = 14;
// Feedback on bids submitted in previous responses. This is only set if
// real-time feedback is enabled for your bidder. Please contact your account
// manager if you wish 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 also populated.
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;
// 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;
}
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 flags.
// 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 flag 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. Please
// 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];
}
// 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 wish 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 64 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.
// Please 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. Please 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. Please 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 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 URL to fetch a video ad. The URL should return an XML response that
// conforms to the VAST 2.0 standard. Only set this field if the
// BidRequest is for native ads and the video field is requested.
optional string video_url = 13;
// 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;
// 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.
// This field is planned to be deprecated and we are moving to the
// repeated click_tracking_urls field.
optional string click_tracking_url = 11;
// 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 click_tracking_urls = 15;
// The price of the promoted app including the currency info.
optional string price = 10;
// This field is deprecated.
optional string DEPRECATED_store = 12;
// This field is deprecated. Please use
// BidResponse.Ad.impression_tracking_url instead.
repeated string DEPRECATED_impression_tracking_url = 9;
};
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;
// For exchange bidders (third party exchanges doing real-time bidding on
// DFP), the name of the bidder that the exchange called to provide the ad.
// This is arbitrary UTF8 text but should be sufficient to identify the
// bidder and should be set consistently to the same value for the same
// bidder.
optional string bidder_name = 22;
// 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;
// The Agency associated with this ad. See agencies.txt file in the
// technical documentation for a list of ids. If this ad has no associated
// agency then the value NONE (agency_id: 1) should be used rather than
// leaving this field unset.
optional int64 agency_id = 16;
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 your account 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. This may represent a second price if you choose max_cpm as the
// highest of several bids, or some form of reserve price if you wish 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;
// 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.
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];
// Buyer declared ID which will be used to breakdown spend and invalid
// traffic metrics in IVT transparency reporting. IDs longer than 64 bytes
// will be ignored.
optional string buyer_reporting_id = 8;
// This field is applicable only for bid requests that are marked as
// first price, and will otherwise be ignored. If the field is set to
// true on a first price request, then the bid will go through a bid
// translation service that converts the second price bid into a first
// price bid for participation in the first price auction (i.e. may
// reduce but will never increase the bid). If the field is not set,
// then for first price eligible queries the bid will be treated as a
// first price bid. This field is a temporary product for bidders that
// require assistance migrating to 1st price bidding, and will eventually
// be deprecated.
optional bool use_bid_translation_service = 10;
}
repeated AdSlot adslot = 3;
// The URLs to call when the impression is rendered. This is supported for
// all inventory types and all formats except for VAST video.
repeated string impression_tracking_url = 19;
// 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;
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 whitelisted 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;
}
optional SdkRenderedAd sdk_rendered_ad = 27;
}
repeated Ad ad = 2;
// If is_test was set in the BidRequest, then you may return debug information
// as plain text in this field. Please do not 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;
// Please 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;
}