Native Ads

Native ads are ads formatted to fit the surrounding content and visual design, making them more likely to be viewed and clicked by users. Native ad inventory is available on mobile apps as well as desktop and mobile websites. For more information on native ads, see Overview of native ads.

How it works

  1. A call for a native ad is made to Google. The call specifies one or both of the native ad templates below, each specifying the desired native fields.
  2. Google sends buyers an RTB bid request containing a list of the fields being requested.
  3. Interested buyers respond with the requested fields.
  4. Google runs an auction to select the winning bid and sends the buyer's supplied creative assets to the publisher.
  5. The publisher assembles the assets into a native ad and styles them to fit the site's design.

Message formats

Google supports the OpenRTB specification in both JSON and Protobuf. For native ads, the Protobuf implementation diverges from the specification for both BidRequest.imp[].native.request and BidResponse.seatbid[].bid[].adm. If your bidder is configured to use an OpenRTB Protobuf implementation, you will instead receive BidRequest.imp[].native.request_native, and your responses will need to contain BidResponse.seatbid[].bid[].adm_native. Unlike the JSON implementation, these will be Protobuf messages rather than strings. The following table describes what differs between the two OpenRTB formats:

Protocol Field type
PROTOCOL_OPENRTB_2_4 (JSON) BidRequest.imp[].native.request String
PROTOCOL_OPENRTB_2_4 (JSON) BidResponse.seatbid[].bid[].adm String
PROTOCOL_OPENRTB_PROTOBUF_2_4 (Protobuf) BidRequest.imp[].native.request_native NativeRequest
PROTOCOL_OPENRTB_PROTOBUF_2_4 (Protobuf) BidResponse.seatbid[].bid[].adm_native NativeResponse

The tables below show fields labeled Required or Recommended. The following rules apply:

  • Fields marked Required are required by the bidder.
  • Fields marked Recommended are not required by the bidder, and the publisher may or may not display them if supplied (for example, star rating).
  • Call to Action (CTA) is always marked as Recommended because a default is assigned if one is not sent by the bidder, but it will always be displayed if sent.

Native ad templates

Google supports the two most common native ad templates for non-video and video native ads:

Other templates exist, and may have a different set of requirements for fields, dimensions, and sizes.

App install ad template

The following table lists the fields of an app install ad template. Mobile apps use these fields to create native app install ads.

Field Description Required or Recommended? Always displayed? Recommended image size/max number of chars Example
Headline The app title Required Yes 25 chars Flood-It!
Image A screenshot from the app, or another relevant image Required No 1,200px x 627px or 600px x 600px depending on the aspect ratio required by the publisher. <A screenshot from the game Flood-It!>
Body Main text of the app Required No 90 chars Deceptively simple + tantalizingly challenging = delightfully addictive!
App icon The app icon Required No 128 x 128 px <Flood-it! app icon>
Call to action Desired user action Recommended Yes 15 chars Install
Star rating Number of stars (0 - 5) representing the app's rating in the app store Recommended No 0 - 5 4.5
Price The cost of the app Recommended No 15 chars Free

Notes about text length

If a buyer sends a text asset (body text, for example) longer than the suggested maximum number of characters, the text may be truncated and ellipsized by Google or the publisher. Note that the truncation limits are half the size in Chinese, Japanese, and Korean. For example, the headline limit is 90 for English and 45 for Chinese.

Notes about image size

Publishers are allowed to:

  • Crop the main image symmetrically by up to 20% in one dimension (height or width).
  • Scale the image without changing its aspect ratio.
  • Images that have aspect ratios substantially different than those implied by the height and width may be filtered.

Content ad template

The following table lists the fields of a content ad template. Publishers use these fields to create native content ads.

Field Description Required or Recommended? Always displayed? Recommended image size/max number of chars * Example
Headline The ad header Required Yes 25 chars Lowest mortgage rates
Image The ad's primary image Required No 1,200px x 627px or 600px x 600px depending on the aspect ratio required by the publisher. <Ad's main image>
Body The ad content Required No 90 chars Your home sweet Brooklyn home - cheaper and sooner than you think!
Logo Advertiser’s logo or another relevant small image Recommended No 128 x 128 px <NY Mortgage Inc.'s logo>
Call to action User's desired action Recommended No 15 chars Get a quote
Advertiser Text that identifies the advertiser or brand Required No 25 chars NY Mortgage Inc.

Video app install ad template

Field Description Required or Recommended? Always displayed? Recommended image size/max number of chars * Example
Video The video VAST response containing all necessary assets to play back a video ad. Required No - A URL to VAST XML containing a Flood-It! Video ad
Headline The app title Required Yes 25 chars Flood-It!
Image Image (thumbnail) shown in the player before the video ad is clicked or while it is loading. Required No Should match aspect ratio of video (for example: 1280x720 for 16x9 video, 4x3 for 640x480 video). A screenshot from the game Flood-It! Or from the video
Body Main text of the app Required No 90 chars Deceptively simple + tantalizingly challenging = delightfully addictive!
App icon The app icon Required No 128 x 128 px Flood-it! app icon
Call to action Desired user action Required Yes 15 chars Install
Star rating Number of stars (0 - 5) representing the app's rating in the app store Recommended No 0 - 5 4.5
Price The cost of the app Recommended No 15 chars Free

Restrictions

  • Video: All video must be in the form of a VAST URL. A raw video file such as a WebM, MP4, etc cannot be specified.

  • Text length: If a buyer specifies a text asset such as the body in the response, it may be truncated and ellipsized by Google or the publisher. Note that truncation limits are half the size in Chinese, Japanese, and Korean. For example, the headline limit is 90 in English and 45 for Chinese.

  • Image size: Publishers are allowed to:

    • Crop the main image symmetrically by up to 20% in one dimension (height or width.
    • Scale the image without changing its aspect ratio.

App install ad example

native video

Video content ad template

Field Description Required or Recommended? Always displayed? Recommended image size/max number of chars * Example
Video The video VAST response containing all necessary assets to play back a video ad. Required Yes - A URL to VAST XML containing a Flood-It! Video ad
Headline The ad header Required Yes 25 chars Lowest mortgage rates
Image Image (thumbnail) shown in the player before the video ad is clicked or while it is loading. Required No Should match aspect ratio of video (for example: 1280x720 for 16x9 video, 4x3 for 640x480 video). A screenshot from the video
Body The ad content Required No 90 chars Your home sweet Brooklyn home - cheaper and sooner than you think!
Logo Advertiser’s logo or another relevant small image Recommended No 128 x 128 px NY Mortgage Inc.'s logo
Call to action User's desired action Required No 15 chars Get a quote
Advertiser Text that identifies the advertiser or brand Required No 25 chars NY Mortgage Inc.

Meta fields

The following meta fields are shared by all supported ad templates:

Authorized Buyers real time protocol buffer Authorized Buyers OpenRTB Equivalent Description
NativeAd.click_link_url Link.url The URL that will be called by the browser when the user clicks the ad. Can be the first step of a redirect chain that eventually leads to the landing page. For native ads, we recommend using click_link_url as the field to set the destination where the user will ultimately go. It is required to use this field in the case of dynamic landing pages.
Ad.click_through_url Bid.adomain

Must be set if the bidder intends to bid. This is the set of destination URLs for the snippet, including 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 final 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, 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. Refer to NativeAd.click_link_url above when using native ads.

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).

NativeAd.click_tracking_urls Link.clicktrackers Optional. Additional URLs that allow advertisers to track user clicks on the ad.
Ad.ad_choices_destination_url BidExt.ad_choices_destination_url Link to an ad preferences or opt-out page. If present, a standard AdChoices icon is added to the native creative and linked to this URL. This is supported for native ads but is not part of the native message in the bid response.
Ad.impression_tracking_url NativeResponse.imptrackers The native impression should be tracked with impression_tracking_url in Authorized Buyers real-time bidding proto or Native imptrackers in OpenRTB.

required_fields and recommended_fields are specified by the publisher. We show how to translate these bit fields to determine if a field is required or recommended.

A bit field uses each bit of a binary value to store a true or false statement, equivalent to sending many boolean signals like is_logo_required, is_header_required, etc. but all packed together.

Example

For this example we'll use a required_fields value of 1085.

First, find the equivalent binary value: 10000111101

Once you have the binary value, you can check the bits to see if a field is required (1) or not required (0).

The table below maps the fields to their place in the binary value. Read the binary from right to left, with the 1-bit corresponding to the right-most place in the binary value.

Field Binary value placement (right to left)
HEADLINE 1
BODY 2
CALL_TO_ACTION 4
ADVERTISER 8
IMAGE 16
LOGO 32
APP_ICON 64
STAR_RATING 128
PRICE 256
STORE 512
VIDEO 1024

Looking at the example binary value 10000111101, the 1-bit (rightmost) is 1, signifying a required value. According to the table, the 1-bit corresponds to HEADLINE.

The 2-bit (second value from the right) is 0 signifying not required. The 2-bit corresponds to BODY.

Here are all the interpreted required fields in our example:

Value Description Required?
1 VIDEO Yes
0 STORE No
0 PRICE No
0 STAR_RATING No
0 APP_ICON No
1 LOGO Yes
1 IMAGE Yes
1 ADVERTISER Yes
1 CALL_TO_ACTION Yes
0 BODY No
1 HEADLINE Yes

NativeAdTemplate message

When receiving a bid request containing native inventory, it will contain a populated BidRequest.adSlot[].native_ad_template. The NativeAdTemplate message provides specifications for:

  • Fields that are required or recommended.
  • Dimensions for images, logos, and app icons.
  • Specifications for the style in which the ad is rendered.
message BidRequest {
  //...
  message AdSlot {
    //...

    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 field 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 AdExchange 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 store_max_safe_length = 14;
      optional int32 price_max_safe_length = 15;

      // 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;

  // ...
}

NativeAd message

When bidding on native inventory, a buyer must populate BidResponse.ad[].native_ad with required fields declared in the corresponding BidRequest.adSlot[].native_ad_template.

message BidResponse {
  //...
  message Ad {
    //...

    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;

      // Next tag to use: 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_urls.
      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;
    };
    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 final 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;

    //...

    // The URLs to call when the impression is rendered. The SDK pings
    // impression urls on a background thread and ignores the contents
    // of the response.
    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 ad creative and
    // linked to this URL.
    optional string ad_choices_destination_url = 21;
    // ...
  }
}

Example bid requests

Non-video bid requests

Google

OpenRTB JSON

OpenRTB Protobuf

Video bid requests

Example bid responses

Note that the values in these response are not intended to match the corresponding requests above. However, if the template in the request suggests required/optional fields, the responses here adhere to those requirements.

Non-video bid responses

Google

OpenRTB JSON

OpenRTB Protobuf

Video bid responses