Ads Overview

This guide provides an overview of the various ad types and features available in the API, from the perspective of a typical use case.


Let's say you're the proud proprietor of the Intergalactic Guitar Shop and you want to launch an advertising campaign to bring in new customers. The following sections describe the different ad types and features you could use to achieve this goal.

Where do you want your ads to appear?

AdWords ads can appear on two networks:

  • The Search network, which includes Google search result pages, other Google sites like Maps and Shopping, and partnering search sites.
  • The Display network, which includes Google sites like YouTube, Blogger, and Gmail, plus thousands of partnering websites across the internet.

Let's assume you want to advertise on both networks. However, you don't want to separately manage a Search campaign and a Display campaign, so you create a Search Network with Display Select campaign with a single ad group.

See the AddCampaigns code example in your client library's basic operations examples folder for details.

What type of ad do you want?

Now that you know where your ads will appear, it's time to choose the ad type that best meets your requirements. The AdWords API offers the following ad types:

Type Search Display Description



New standard for AdWords text ads. Includes two headlines, a description of your product or service, navigational breadcrumbs, and a generated visible URL.




Standard AdWords text ads. Includes a link to your website and a description or promotion of your product or service. These will be replaced by Expanded Text Ads.




A product ad (called a shopping ad in the AdWords UI) is based on product data of a Shopping campaign's associated Merchant Center account.




Dynamically generated search ads based on the content of a web site.




An ad for a Click to Call Only campaign.




An ad that includes a graphic to promote your business.




Contains a marketing image, a short and long headline, a description, and an optional advertiser name and logo.




An ad based on a predefined template.

1 An ImageAd on the Search Network will appear only on websites of Google search partners, not on Google Search.

2 See the list of TemplateAd templates and the template ads guide for more information, including which networks each template ID supports.

For this scenario, let's assume you start with the most common type of ad, an ExpandedTextAd, and that you'll use the same ExpandedTextAd to advertise on both the Search and Display networks.

Expanded text ad setup

An ExpandedTextAd is a relatively simple object — you just need to specify the following attributes:

  • HeadlinePart1 - First part of the headline.
  • HeadlinePart2 - Second part of the headline.
  • Description - The descriptive text of the ad.
  • FinalUrls - The URLs of the page on your website that people reach when they click your ad.

ExpandedTextAd code for a guitar shop would look something like this:

ExpandedTextAd textAd = new ExpandedTextAd();
textAd.setHeadlinePart1("Intergalactic Guitar Shop");
textAd.setHeadlinePart2("Large selection of guitars");
textAd.setDescription("Weekly specials on accessories");
textAd.setFinalUrls(new String[]{

Check out the AddExpandedTextAds example in your client library's basic operations examples folder for a complete example.

Adding ad extensions

You can start with a basic ExpandedTextAd in your ad group, but you may have noticed other ads on the Search and Display networks that contain additional information, links, and action buttons.

This additional information comes from ad extensions. Most ad extensions are managed via feed services in the AdWords API. Using ad extensions, you can improve your ads with:

  • Sitelinks that show additional links to specific pages on your website.
  • Location extensions that show your business address, phone number, a map marker with your ad text, and on mobile, a link with directions to your business.
  • App extensions that show a link to your mobile or tablet app.
  • Callout extensions that show additional detailed information about your business, including products and services you offer.
  • Review extensions that show a positive review, award, or third-party ranking in an additional line of text beneath your ad on Google Search.

As the owner of the Intergalactic Guitar Shop, you want people to know that the shop:

  • Offers repair services.
  • Carries both acoustic and electric guitars.
  • Provides guitar lessons.

This information is a great fit for sitelink extensions!

To set up sitelink extensions, see the instructions in the Extension Setting Services guide, which includes a link to a complete code example for each client library.

Adding location extensions

Your ad is up and showing links to various areas of your site, but you want users to find your store's location easily, especially if they're viewing your ad on a mobile device.

If you already entered this information in your Google My Business account, then you're in luck--all you need to do is link your Google My Business account to your AdWords accounts, and AdWords will display the location in your ads.

See the Location Extensions guide for step-by-step instructions and code examples.

More ad extensions

Now that you've set up sitelinks and location extensions for your campaign, adding other extensions such as app, callout, or review extensions is very similar. The only difference is the type of ExtensionFeedItem used with the extension setting services.

The Extension Setting Services guide includes examples for each extension type.

Ad rotation

If you have multiple ads within an ad group, your ads will rotate because no more than one ad from your account can show at a time. You can use ad rotation setting to specify how often you'd like the ads in your ad group to be served relative to one another.

There are two settings for ad rotation:

  • Optimize: The optimize setting prioritizes ads that are expected to perform better than other ads within an ad group. This is the default setting.
  • Rotate indefinitely: The rotate indefinitely setting delivers your ads more evenly into the ad auction, but does so for an indefinite amount of time and does not optimize.

Ad rotation settings are specified at the ad group level, using the ad group's adGroupAdRotationMode property. You can remove the ad rotation setting by passing an AdGroupAdRotationMode with the adRotationMode set to null.

Ad scheduling

Like many things in life, advertising is all about timing. A lot of businesses have special advertising needs during certain times of day, and they want to target customers at specific times. Incorporating ad scheduling in your campaigns causes your ads to display at the time they're most useful, resulting in more focused targeting and higher returns.

Ad scheduling allows you to decide programatically when to run your ads, without requiring you to manually enable and disable them.

Scheduling works at the campaign level, so it applies to all active ad groups and ads inside it. This is handled by CampaignCriterionService and one of its criterion types, AdSchedule.

Each AdScheduleCriterion allows you to define a number of properties such as day of week, start and end times, and a bid modifier (formerly handled through the bid_multiplier of the CampaignTargetService). With bid modifiers you can increase or decrease your bids at specified times.

Code examples

To make sure the ads run mostly during opening hours, set the start time for the ads to a bit before opening, and the end time a bit before closing:

// Obtain a campaignId you want to configure
Long campaignId =  Long.valueOf("INSERT_CAMPAIGN_ID_HERE");

// Closed on Sunday, so we don't configure an AdSchedule for Sunday.
DayOfWeek[] days = new DayOfWeek[] {DayOfWeek.MONDAY,

List operations = new ArrayList();
for (int i = 0; i < 6; i++) {
  AdSchedule schedule = new AdSchedule();
  // Start at 8:45 am...
  // ... and end at 7:45 pm
  CampaignCriterionOperation operation = new CampaignCriterionOperation();
  CampaignCriterion campaignCriterion = new CampaignCriterion();

  // Run at normal bid rates

CampaignCriterionReturnValue result =
        .toArray(new CampaignCriterionOperation[operations.size()]));

To give customers fair warning about a special lunchtime deal, start advertising early in the morning and increase significantly during the promotion hours:

// Obtain a campaignId you want to configure
Long campaignId = Long.valueOf("INSERT_CAMPAIGN_ID_HERE");

List operations = new ArrayList();
AdSchedule early = new AdSchedule();
AdSchedule peak = new AdSchedule();
CampaignCriterionOperation operationEarly = new CampaignCriterionOperation();
CampaignCriterion campaignCriterionEarly = new CampaignCriterion();
CampaignCriterionOperation operationPeak = new CampaignCriterionOperation();
CampaignCriterion campaignCriterionPeak = new CampaignCriterion();

// Sample schedule for Monday
// Start at 8:00 am...
// ... and run until promotion starts
// Run at normal bid rates

// Start higher bidding at noon...
// ... and run until promotion ends...
// ... at double the bid!



CampaignCriterionReturnValue result =
        .toArray(new CampaignCriterionOperation[operations.size()]));

This example shows how to stop ads from showing on a specified day. You need to send an AdSchedule with the same Id as the existing AdSchedule.

// Suppose you already have a schedule of 8:45 am to 7:45 pm for Monday to Saturday

// Obtain the campaignId and criterionId you want to configure
Long campaignId = Long.valueOf("INSERT_CAMPAIGN_ID_HERE");
Long criterionIdForSaturday = Long.valueOf("INSERT_CRITERION_ID_HERE");

List removeOperations = new ArrayList();

// Remove a schedule for Saturday
AdSchedule removeScheduleForSaturday = new AdSchedule();

CampaignCriterionOperation removeOperation = new CampaignCriterionOperation();
CampaignCriterion removeCampaignCriterion = new CampaignCriterion();



CampaignCriterionReturnValue removeResult = campaignCriterionService.mutate(
    removeOperations.toArray(new CampaignCriterionOperation[removeOperations.size()]));

This example shows how to change the time ads are showing. You need to remove the existing AdSchedule first, then send a new one.

// Suppose you already have a schedule of 8:45 am to 7:45 pm for Monday to Saturday
// Obtain the campaignId and criterionId you want to configure
Long campaignId = Long.valueOf("INSERT_CAMPAIGN_ID_HERE");
Long criterionIdForFriday = Long.valueOf("INSERT_CRITERION_ID_HERE");

List operations = new ArrayList();

// Remove a schedule for Friday first
AdSchedule removeScheduleForFriday = new AdSchedule();

CampaignCriterionOperation removeOperationForFriday = new CampaignCriterionOperation();
CampaignCriterion removeCampaignCriterionForFriday = new CampaignCriterion();



// Create a new schedule for Friday
AdSchedule addScheduleForFriday = new AdSchedule();
// Start at 3:00 pm...
// ... and end at 7:45 pm
CampaignCriterionOperation addOperationForFriday = new CampaignCriterionOperation();
CampaignCriterion campaignAddCriterionForFriday = new CampaignCriterion();

// Run at normal bid rates

CampaignCriterionReturnValue result = campaignCriterionService.mutate(
    removeOperations.toArray(new CampaignCriterionOperation[operations.size()]));

Check out these code examples to see how to use the CampaignCriterionService to add a target to an existing campaign:

Measuring ad performance

You've set up a campaign, an ad group, a text ad, and multiple ad extensions: Now you want to find out how your campaign, ads, and extensions are performing. This is where reporting comes in.

You can look at your campaign's performance from different perspectives to answer key questions. Expand each use case below to see relevant reports and fields, and a sample AWQL report request.

The questions above focus on some common use cases and features. For even more options, check out the complete list of report types.

Next steps

After analyzing your reports you may want to:

Enviar comentarios sobre…

¿Necesitas ayuda? Visita nuestra página de asistencia.