Export (0) Print
Expand All

Java Examples for Bing Ads

The Java code examples for Bing Ads are developed and run within the environment described in Getting Started Using Java with Bing Ads Services. Your custom configuration may vary.

System_CLiX_note Note

You may download some Java samples with Bing Ads JARs at Code Gallery.

Managing Customer Accounts

These examples show how to manage customers, accounts, and users. For related information, see Managing Customer Accounts and Customer Management Service Reference.

Topic

Description

Example Operations

Link to Client Accounts in Java

Use agency credentials to invite a client, and use client credentials to accept the invitation. Run this sample multiple times to update and observe the status change, for example from LinkPending to LinkAccepted to Active.

AddClientLinks

SearchClientLinks

UpdateClientLinks

Search Customers by User in Java

Search for customers that can be managed by the current authenticated user.

GetAccountsInfo

GetUser

SearchCustomers

Managing Ads and Keywords

These examples demonstrate how to setup and manage text or mobile ads, associate ad extensions, and bid on keywords. For related information, see Managing Ads and Keywords and Campaign Management Service Reference.

Topic

Description

Example Operations

Ad Extensions in Java

Add, get, and delete extensions for an account’s ad extension library, set, get, and delete the extension associations with a campaign, and determine why an extension failed editorial review.

AddAdExtensions

DeleteAdExtensions

SetAdExtensionsAssociations

DeleteAdExtensionsAssociations

GetAdExtensionsByIds

GetAdExtensionsEditorialReasons

Ads and Keywords in Java

Add ads and keywords to a new ad group, and handle partial errors when some ads or keywords are not successfully created.

AddAdGroups

AddAds

AddCampaigns

AddKeywords

Negative Keywords in Java

Associates negative keywords and negative keyword lists with a campaign.

AddListItemsToSharedList

AddSharedEntity

DeleteListItemsFromSharedList

DeleteSharedEntities

DeleteSharedEntityAssociations

GetListItemsBySharedList

GetSharedEntitiesByAccountId

GetSharedEntityAssociationsByEntityIds

GetSharedEntityAssociationsBySharedEntityIds

SetSharedEntityAssociations

UpdateSharedEntities

AddNegativeKeywordsToEntities

DeleteNegativeKeywordsFromEntities

GetNegativeKeywordsByEntityIds

Targets in Java

Associates targets with a campaign and ad group. Bing Ads Version 9 supports both Target and Target2 objects. You should use Target2. This example compares Target and Target2, and demonstrates the impact of updating the DayTimeTarget, IntentOption, and RadiusTarget2 nested in a Target2 object.

AddTargetsToLibrary

AddTargetsToLibrary2

DeleteTargetFromAdGroup

DeleteTargetFromCampaign

DeleteTargetsFromLibrary

GetTargetsByIds

GetTargetsByIds2

GetTargetsInfoFromLibrary

SetTargetToAdGroup

SetTargetToCampaign

UpdateTargetsInLibrary2

Downloading and Uploading Campaigns

This example demonstrates how to download and upload campaign data in bulk in the background. For related information, see Downloading and Uploading Campaigns and Bulk Service Reference.

Topic

Description

Example Operations

Download and Upload Campaigns in Java

Download and upload the entities of one or more campaigns in the background.

DownloadCampaignsByCampaignIds

GetDetailedBulkDownloadStatus

GetBulkUploadUrl

GetDetailedBulkUploadStatus

Optimizing Campaigns

This example demonstrates how to discover opportunities to improve your ads' performance and increase your return on investment. For related information, see Optimizing Campaigns and Optimizer Service Reference.

Topic

Description

Example Operations

Optimize Budget in Java

Get the budget opportunities which have not expired for the specified account.

GetBudgetOpportunities

ApplyOpportunities

Getting Reports

This example demonstrates how to get detailed reports about accounts, campaigns, and ad groups. The information can help you track finances, measure performance, and adjust settings to optimize your budget or campaign. For related information, see Getting Reports and Reporting Service Reference.

Topic

Description

Example Operations

Keyword Performance Report in Java

Request and retrieve a keyword performance report.

SubmitGenerateReport

PollGenerateReport

Researching and Pricing Keywords

These examples demonstrate how to manage customers, accounts, and users. For related information, see Researching and Pricing Keywords and Ad Intelligence Service Reference.

Topic

Description

Example Operations

Get Estimated Bid By Keywords in Java

Get the minimum suggested bid value of one or more keywords that could result in an ad appearing in the targeted position in the search results.

GetEstimatedBidByKeywords

Community Additions

ADD
Show:
© 2014 Microsoft