Java Examples for Bing Ads

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.

To get started developing Bing Ads applications with Java, Installing the SDK and either start with the provided examples or follow one of the application walkthroughs for a Web or Desktop application.

Managing Customer Accounts

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

TopicDescriptionExample Operations
Link to Client Accounts in JavaUse the Customer Management Service with 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 Accounts by User in JavaUse the Customer Management Service to search for accounts that can be managed by the current authenticated user.GetUser

SearchAccounts

Campaign Setup and Basics

These examples demonstrate how to setup and manage ads, associate ad extensions, and bid on keywords. For related information, see Campaign Setup and Basics.

TopicDescriptionExample Operations
Bulk Ads and Keywords in JavaUse the Bulk Service to download and upload ads and keywords.The downloadFileAsync method provided in the SDK calls the DownloadCampaignsByAccountIds, DownloadCampaignsByCampaignIds, and GetBulkDownloadStatus operations of the Bulk Service.

The uploadFileAsync method provided in the SDK calls the GetBulkUploadUrl and GetBulkUploadStatus operations of the Bulk Service.
Ads and Keywords in JavaUse the Campaign Management Service to 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

DeleteCampaigns
Negative Keywords in JavaUse the Campaign Management Service to associate negative keywords and negative keyword lists with a campaign.AddListItemsToSharedList

AddSharedEntity

DeleteListItemsFromSharedList

DeleteSharedEntities

DeleteSharedEntityAssociations

GetListItemsBySharedList

GetSharedEntitiesByAccountId

GetSharedEntityAssociationsByEntityIds

GetSharedEntityAssociationsBySharedEntityIds

SetSharedEntityAssociations

UpdateSharedEntities

AddNegativeKeywordsToEntities

DeleteNegativeKeywordsFromEntities

GetNegativeKeywordsByEntityIds

Ad Extensions

These examples demonstrate how to setup and manage ad extensions. For more information, see Ad Extensions.

TopicDescriptionExample Operations
Bulk Ad Extensions in JavaUse the Bulk Service to download and upload ad extensions.The downloadFileAsync method provided in the SDK calls the DownloadCampaignsByAccountIds, DownloadCampaignsByCampaignIds, and GetBulkDownloadStatus operations of the Bulk Service.

The uploadFileAsync method provided in the SDK calls the GetBulkUploadUrl and GetBulkUploadStatus operations of the Bulk Service.
Ad Extensions in JavaUse the Campaign Management Service to 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

Bing Shopping Campaigns

These examples demonstrate how to setup and manage Bing Shopping campaigns with product ads. For more information, see Campaign Setup and Basics.

TopicDescriptionExample Operations
Bulk Shopping Campaigns in JavaUse the Bulk Service to apply product conditions for Bing Shopping campaigns.The downloadFileAsync method provided in the SDK calls the DownloadCampaignsByAccountIds, DownloadCampaignsByCampaignIds, and GetBulkDownloadStatus operations of the Bulk Service.

The uploadFileAsync method provided in the SDK calls the GetBulkUploadUrl and GetBulkUploadStatus operations of the Bulk Service.
Shopping Campaigns in JavaUse the Campaign Management Service to apply product conditions for Bing Shopping campaigns.AddAdGroups

AddAds

AddCampaignCriterions

AddCampaigns

ApplyProductPartitionActions

DeleteCampaigns

GetAdGroupCriterionsByIds

GetBMCStoresByCustomerId

Show Ads to Your Target Audience

These examples demonstrate how to setup and manage targets for campaigns and ad groups. For more information, see Show Ads to Your Target Audience.

TopicDescriptionExample Operations
Geographical Locations in JavaDownload the comma separated value (CSV) file that contains geographical location information that can be used with Bing Ads location targeting.Not applicable.
Targets in JavaUse the Campaign Management Service to associate targets with a campaign and ad group.AddTargetsToLibrary

DeleteTargetFromAdGroup

DeleteTargetFromCampaign

DeleteTargetsFromLibrary

GetTargetsByIds

GetTargetsInfoFromLibrary

SetTargetToAdGroup

SetTargetToCampaign

UpdateTargetsInLibrary

Researching Bid and Budget Opportunities

This example demonstrates how to discover opportunities to improve your ads' performance and increase your return on investment. For related information, see Researching Bid and Budget Opportunities.

TopicDescriptionExample Operations
Optimize Budget in JavaUse the Ad Insight Service to get the budget opportunities for the specified account.GetBudgetOpportunities

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.

TopicDescriptionExample Operations
Report Requests in JavaUse the Reporting Service to request and retrieve a keyword performance report.SubmitGenerateReport

PollGenerateReport

See Also

Getting Started Using Java with Bing Ads Services
Bing Ads Technical Guides

Community Additions

ADD
Show:
© 2016 Microsoft