AdService
AdService provides operations for accessing, creating and modifying
Ads in an AdGroup. Each Ad object is the visual representation of
an ad. Each ad group has one or more ads, where an ad can be of many
different formats (such as text ad or an image ad).
An ad can be in following serving statuses: enabled, disabled, or paused.
Only enabled ads will be served; a disabled or paused ad will not be
served.
Ad is one of:
For more information about how to use the AdService, see the overview section.
Requests
Make a batch of new Ads.
The adGroupId field of the Ad indicates which AdGroup
to add the Ad to. The adGroupId field is required, and the indicated
AdGroup must exist already.
The Ad's id and disapproved fields are set by
the AdService -- if you fill them in they will be ignored.
By default, Ads are enabled and will be served as soon as they are
created. You can set the status field on the ad to either paused
or disabled to prevent the ad from being active.
Parameters
| Parameter name | Parameter type | Parameter description |
| ads |
Ad[] |
The new data for the Ads.
Ad is one of:
|
Response
| Response type | Response description |
Ad[] |
The new Ad objects, with IDs filled in.
Ad is one of:
|
Check a batch of Ads for policy errors. The number of Ads in
the batch is limited to the maximum number of Ads per adgroup.
Parameters
| Parameter name | Parameter type | Parameter description |
| ads |
Ad[] |
The Ads to be checked.
Ad is one of:
|
| languageTarget |
LanguageTarget |
The overriding language context |
| geoTarget |
GeoTarget |
The overriding geographical context
If the adGroupId is not specified for an Ad,
at least one of languageTarget and geoTarget
must be provided for policy checking to be possible.
These fields will not be taken into consideration for policy checking:
|
Response
| Response type | Response description |
ApiError[] |
A list of policy errors |
Searches for businesses with similar attributes. This call is similar to
querying Google Local Search. All parameters are required.
Parameters
| Parameter name | Parameter type | Parameter description |
| name |
string |
Name of the business. Must not be null. |
| address |
string |
Location of the business. Format is free form.
Examples: "Mountain View, CA"
or "1600 Amphitheatre Pkwy, Mountain View, CA". Must not be null. |
| countryCode |
string |
Two letter country code of the business address.
Must not be null. |
Response
| Response type | Response description |
Business[] |
matching businesses |
Return all active Ads associated with the list of AdGroup ids
specified.
Parameters
| Parameter name | Parameter type | Parameter description |
| adGroupIds |
long[] |
An array of AdGroup Ids that own the Ads |
Response
| Response type | Response description |
Ad[] |
An array of the Ads
Ad is one of:
|
Return information about one Ad.
Parameters
| Parameter name | Parameter type | Parameter description |
| adGroupId |
long |
The ID of the AdGroup owning the Ad |
| adId |
long |
The ID of the Ad |
Response
| Response type | Response description |
Ad |
The Ad
Ad is one of:
|
Get statistics for a list of ads in an ad group. See
StatsRecord for details about the statistics returned.
The time granularity is one day.
Parameters
| Parameter name | Parameter type | Parameter description |
| adGroupId |
long |
The ad group that contains the ads to be
queried |
| adIds |
long[] |
The ads to query |
| startDay |
date |
The starting day of the period for which statistics are
to be collected (xsd:date). |
| endDay |
date |
The ending day of the period for which statistics are to be
collected, inclusive (xsd:date). |
Response
| Response type | Response description |
StatsRecord[] |
an array of StatsRecords containing information
about the activity on the ad. Note that the
AveragePosition field is not used.
The order of StatsRecord objects returned may be different from
the order in which the id's were requested. |
Return all Ads (enabled, disabled, or paused) associated with the list of
AdGroup ids specified.
Parameters
| Parameter name | Parameter type | Parameter description |
| adGroupIds |
long[] |
An array of AdGroup Ids that own the Ads |
Response
| Response type | Response description |
Ad[] |
An array of the Ads
Ad is one of:
|
Returns the list of businesses registered to the user in the Local Business
Center. The user is determined by the clientEmail header if it is
specified. Otherwise, the email header is used instead.
Response
| Response type | Response description |
Business[] |
the list of businesses registered to the user in the Local Business
Center |
Returns a list of all videos stored under the users account. The user
is determined by the clientEmail if specified. Otherwise, the email
header is used.
Response
| Response type | Response description |
Video[] |
the list of videos stored under user account. |
Update a batch of ads.
Use the id field of the ad to indicate which ad to update.
Currently only the status field is updateable,
all other fields will be ignored. You must specify the
adGroupId element for each ads element.
Parameters
| Parameter name | Parameter type | Parameter description |
| ads |
Ad[] |
the Ads to be updated.
Ad is one of:
|
Response
| Response type | Response description |
(none) |
|