My favorites | English | Sign in

Documentation for the requested version is not available.Documentation for the requested diff is not available.

API Reference

Link to this version

AccountService

Use AccountService to create new AdSense accounts for your publishers, associate existing publisher accounts with your site, and update publisher account settings.

Requests Summary
addSyndicationService Adds the SyndicationService corresponding to synServiceType to the publisher's account.
associateAccount Creates an association between the developer and the publisher.
associateExistingAccount Deprecated. Use #associateAccount.
createAccount Creates a new AdSense account.
createAdSenseAccount Deprecated. Use #createAccount.
getAllSyndicationServices Returns data about all the SyndicationService services subscribed to by the publisher.
getApprovalStatus Returns the ApprovalStatus of this account.
getAssociationStatus Returns the publisher's association status with the developer.
getBulkApprovalStatus Returns the ApprovalStatus for the provided list of clients.
getBulkAssociationStatus Returns the MpmStatus for the provided list of clients.
getDeveloperSiteData Gets the developer site data.
getEmailPromotionsPreference Returns whether email promotions are enabled for the account.
getEntityType Returns the entity type for the account
getSupportedWebsiteLocales Returns the list of supported website locales.
getSupportedWebsiteLocalesForSyndicationService Returns the list of supported website locales for a given type of SyndicationService.
getSyndicationService Returns the service data for the SyndicationService corresponding to the synServiceType parameter.
getUsersPreferredLocale Return the user's preferred locale.
getWebsiteLocale Returns the website language setting for the account.
getWebsiteUrl Returns the Website URL
resendVerificationEmail Resends the verification email.
setEmailPromotionsPreference Set whether the account should receive email promotions or not
setUsersPreferredLocale Set the user's preferred locale.
Data Objects Summary
DeveloperSiteData Information that describes a developer's site.
PublisherApprovalStatus Collects together both the approval status and the client id allowing for bulk return information.
PublisherAssociationStatus Collects together both the MpmStatus and the client id for returning bulk information.
SyndicationService_Data Encapsulates the data associated with a SyndicationService A SyndicationService_Data object contains a client ID and syndication type.

AdSenseForContentService

AdSenseForContentService (AFC) allows a developer to generate ad code snippets to include in a publisher's web pages to start serving and displaying contextual advertising.

Requests Summary
deleteAdStyle Delete a named ad style from this service.
deleteAdStyles Delete a collection of named ad styles from this service.
generateAdCode Generates the ad code snippet that can be dropped into an HTML page for the page to start receiving Google Ads.
generateAdCode Generates the ad code snippet that can be dropped into an HTML page for the page to start receiving Google Ads.
getActiveChannels Returns the active Channels associated with this syndication service for the publisher.
getAdLayouts Get all ad layouts compatible with a particular ad unit type.
getAdStyles Returns the ad styles created by the publisher.
getAdUnitTypes Get all ad unit types compatible with a particular ad layout.
getAllAdLayouts Get all ad layouts supported by Google.
getAllAdUnitTypes Get all ad unit types supported by Google.
getBuiltinAdStyles Returns the built-in ad styles created by Google.
getChannels Returns the Channels associated with this syndication service for the publisher.
getInactiveChannels Returns the inactive Channels associated with this syndication service for the publisher.
saveAdStyle Saves a named ad style.
saveAdStyles Adds a collection of named ad styles to this service.
Data Objects Summary
AdStyle AdStyle encapsulates all the information about the colors of various elements in an ad unit or link unit.

AdSenseForSearchService

AdSenseForSearchService (AFS) enables a developer to obtain a code snippet that adds the Google search box to a publisher's web page.

Requests Summary
deleteSearchResultStyle Deletes a named search result style from this service.
deleteSearchResultStyles Deletes a collection of named search result styles from this service.
generateSearchBoxCode Generates the search ad code snippet that can be dropped into an HTML page for the page to start receiving Google search Ads.
getBuiltinSearchResultStyles Returns the built-in search result styles created by Google.
getChannels Returns the channels associated with this syndication service for the publisher.
getSearchResultStyles Returns the search result styles created by the publisher.
saveSearchResultStyle Adds a named search result style.
saveSearchResultStyles Adds a collection of named search result styles to this service.
Data Objects Summary
SearchBoxStyle SearchBoxStyle encapsulates the information about the style of the search ads.
SearchOptions SearchOptions encapsulates the information about the options for the results by clicking the search button.
SearchResultStyle SearchResultStyle encapsulates information about the style of the search results.
SiteProperties SiteProperties encapsulates information about the search button language (locale) and the site encoding.

ChannelService

Channels provide publishers with a way to track the performance, such as clickthrough rate, of their pages.

Requests Summary
createChannel Create a new channel.
createChannels Create new channels.
deleteChannel Delete a channel.
deleteChannels Delete multiple channels.
getChannel Get the channel data associated with a channel ID.
getChannelCode Retrieve the channel code for channel.
getChannels Get the data for an array of channel IDs.
getSyndicationService Returns the syndication service to which a specified channel belongs.
updateChannel Update information for a channel.
updateChannels Update information for multiple channels.
Data Objects Summary
ChannelService_Data Data object for a channel.

ReportService

ReportService enables AdSense API developers to generate the same reports as can be viewed online on the AdSense website.

Requests Summary
generateReport Gets report data from the database and returns it in a ReportData.
Data Objects Summary
AFCAggregateReport AdSense For Content aggregate report.
AFCChannelReport AdSense For Content channel report.
AFCSiteReport AdSense For Content aggregate report for the publisher's activity on the developer's site only.
AFSAggregateReport AdSense For Search aggregate report.
AFSChannelReport AdSense For Search channel report.
AFSQueryReport AdSense For Search 'Top Queries' report.
AFSSiteReport AdSense For Search aggregate report for the publisher's activity on the developer's site only.
DateRange Date range.
ReportData The report data returned by ReportService#generateReport(Report).

SiteFilterService

Publishers may not wish to display certain ads, such as their competitors' ads, on their website.

Requests Summary
addSiteFilters Adds a collection of site filters for a syndication service.
getSiteFilters Gets the site filters for a syndication service.
removeSiteFilters Removes a collection of site filters from a syndication service.
setSiteFilters Sets the site filters for a syndication service.