GetBanners
Returns parameters of ads and keywords.
A GetBanners (Live) version of this method exists.
In addition to ad parameters, the method returns keyword parameters in abbreviated or full form, which is determined by the GetPhrases input parameter. With the value "No", keyword information is not returned. With the value "Yes" or if GetPhrases is absent, an abbreviated set of keyword information is returned. With the value "WithPrices", a full set of keyword information is returned, and the resulting structure, after modifying the necessary parameters, can be submitted as input to the CreateOrUpdateBanners method.
Restrictions
Alert
The method returns only“Text & Image Ads”. To work with ads of all types, use the Ads service in API version 5. Learn more about ad types...
Input data
The structure of input data in JSON format is shown below.
{
"method": "GetBanners",
"param": {
/* GetBannersInfo */
"CampaignIDS": [
(int)
...
],
"BannerIDS": [
(long)
...
],
"GetPhrases": (string),
"Filter": {
/* BannersFilterInfo */
"StatusPhoneModerate": [
(string)
...
],
"StatusBannerModerate": [
(string)
...
],
"StatusPhrasesModerate": [
(string)
...
],
"StatusActivating": [
(string)
...
],
"StatusShow": [
(string)
...
],
"IsActive": [
(string)
...
],
"StatusArchive": [
(string)
...
]
}
}
}
The parameters are described below.
|
Parameter |
Description |
Required |
|
GetBannersInfo object |
||
|
|
Array of campaign IDs (no more than 10 IDs). The method returns parameters of ads belonging to the specified campaigns. |
One of the parameters: |
|
|
Array containing ad IDs. You can specify up to 2000 IDs. This parameter takes priority over |
|
|
|
Contains a |
No |
|
|
Return keyword parameters in the
If the |
No |
|
BannersFilterInfo object |
||
|
|
Select ads by moderation result:
|
No |
|
|
Select ads by keyword moderation result:
|
No |
|
|
Select ads by business card moderation result:
|
No |
|
|
Select ads by relevance of changes made:
Some time passes between making changes to ads and the changes taking effect. Usually it does not exceed 40 minutes, but during peak hours it can reach three hours. |
No |
|
|
Select ads that are shown or not shown:
Enabling and disabling display is performed by the ResumeBanners and StopBanners methods, respectively. |
No |
|
|
Select ads by activation status:
|
No |
|
|
Select ads by archive status:
|
No |
Output data
An array of BannerInfo objects containing ad parameters is returned. The structure of output data in JSON format is shown below.
{
"data": [
{ /* BannerInfo */
"BannerID": (long),
"CampaignID": (int),
"Title": (string),
"Text": (string),
"Href": (string),
"Domain": (string),
"Geo": (string),
"ContactInfo": {
/* ContactInfo */
"ContactPerson": (string),
"Country": (string),
"CountryCode": (string),
"City": (string),
"Street": (string),
"House": (string),
"Build": (string),
"Apart": (string),
"CityCode": (string),
"Phone": (string),
"PhoneExt": (string),
"CompanyName": (string),
"IMClient": (string),
"IMLogin": (string),
"ExtraMessage": (string),
"ContactEmail": (string),
"WorkTime": (string),
"OGRN": (string),
"PointOnMap": {
/* MapPoint */
"x": (float),
"y": (float),
"x1": (float),
"y1": (float),
"x2": (float),
"y2": (float)
}
},
"Phrases": [
{ /* BannerPhraseInfo */
"BannerID": (long),
"CampaignID": (int),
"PhraseID": (long),
"Phrase": (string),
"IsRubric": (string),
"Price": (float),
"ContextPrice": (float),
"AutoBroker": (string),
"UserParams": {
/* PhraseUserParams */
"Param1": (string),
"Param2": (string)
}
"StatusPhraseModerate": (string),
"AutoBudgetPriority": (string),
"Clicks": (int),
"Shows": (int),
"Min": (float),
"Max": (float),
"PremiumMin": (float),
"PremiumMax": (float),
"LowCTRWarning": (string),
"LowCTR": (string),
"ContextLowCTR": (string),
"Coverage": [
{ /* CoverageInfo */
"Probability": (float),
"Price": (float)
}
...
],
"ContextCoverage": [
{ /* CoverageInfo */
"Probability": (float),
"Price": (float)
}
...
],
"Prices": [
(float)
...
],
"CurrentOnSearch": (float),
"MinPrice": (float)
}
...
],
"StatusActivating": (string),
"StatusArchive": (string),
"StatusBannerModerate": (string),
"StatusPhrasesModerate": (string),
"StatusPhoneModerate": (string),
"StatusShow": (string),
"IsActive": (string),
"StatusSitelinksModerate": (string),
"Sitelinks": [
{ /* Sitelink */
"Title": (string),
"Href": (string)
}
...
],
"AdWarnings": [
(string)
...
],
"FixedOnModeration": (string),
"ModerateRejectionReasons": [
{ /* RejectReason */
"Type": (string),
"Text": (string)
}
...
],
"MinusKeywords": [
(string)
...
]
}
...
]
}
The parameters are described below.
|
Parameter |
Description |
|
BannerInfo object |
|
|
|
Ad ID. To create an ad, set to 0; to change ad parameters, specify its ID. |
|
|
Campaign ID. |
|
|
Ad title (up to 33 characters, including spaces and punctuation). |
|
|
Ad text (up to 75 characters, including spaces and punctuation). |
|
|
Link to the advertiser's website. May contain substitution variables. |
|
|
Domain that the |
|
|
IDs of regions for which display is enabled or disabled. ID 0 or empty string — display in all regions (default value). To disable display in a region, put a minus sign before the region ID, for example "1,-219" — display for Moscow and Moscow Oblast, except Chernogolovka. Regions with a minus cannot be used if region zero is specified. Also, the parameter must not consist only of minus-regions. The complete list of regions can be obtained using the GetRegions method. |
|
|
|
|
|
Array of |
|
|
All changes made have taken effect — Yes/Pending. |
|
|
Ad placed in archive — Yes/No. |
|
|
Ad moderation result (text and link are checked):
|
|
|
Keyword moderation result:
|
|
|
Business card moderation result:
|
|
|
Ad serving is enabled — Yes/No. Enabling and disabling display is performed by the ResumeBanners and StopBanners methods. Permission to serve ads does not mean that ads are actually being served. Other conditions must also be met: sufficient balance, campaign and ad checked by moderator, display at campaign level is enabled (ResumeCampaign method). Actual serving corresponds to the value Yes in the |
|
|
Ad is active — Yes/No. Activity refers to the state of ads in which serving is enabled and disabled automatically — according to time targeting settings or depending on the campaign balance. Inactive ads are those whose serving has been disabled by the user or a Yandex manager and cannot be enabled automatically. |
|
|
Sitelink check result:
|
|
|
Array of |
|
|
Array containing marks of the advertised object's belonging to special categories. For such categories, ad display is either prohibited or accompanied by a warning in accordance with Russian Federation legislation. Possible groups:
|
|
|
Typos corrected during moderation — Yes/No. |
|
|
Array of |
|
|
Array of negative keywords common to all keywords in the ad group. A negative keyword should be specified without a minus before the first word. No more than 7 words in a negative keyword. Length of each word — no more than 35 characters. Total length of negative keywords in the array — no more than 4096 characters. The "!" or "+" operator before a word is not counted in the total length. Note Negative keywords common to all groups in a campaign should preferably be specified in the campaign's parameter of the same name. |
|
ContactInfo object |
|
|
|
Contact person. No more than 155 characters. |
|
|
Country. No more than 50 characters. |
|
|
Country phone code. For example, "+7" for Russia. |
|
|
City. No more than 50 characters. |
|
|
Street. No more than 55 characters. |
|
|
House number. No more than 30 characters. |
|
|
Building or block number. No more than 10 characters. |
|
|
Apartment or office number. No more than 255 characters. |
|
|
City phone code. |
|
|
Contact phone number. |
|
|
Extension phone number for connection through office PBX. |
|
|
Organization name. No more than 255 characters. |
|
|
Type of instant messaging network — icq, jabber, skype, mail_agent. |
|
|
Login in instant messaging network. |
|
|
Additional information about the advertised product or service. No more than 200 characters. |
|
|
Email address. No more than 255 characters. |
|
|
Organization's working hours or customer service hours. Specified as a string indicating the range of weekdays, working hours, and minutes. Weekdays are designated by numbers from 0 to 6, where 0 is Monday, 6 is Sunday. Minutes are specified in multiples of 15: 0, 15, 30, or 45. String format:
For example, the string
The schedule can consist of several strings of the specified format, for example: "
24-hour operation is specified by the string |
|
|
OGRN code for legal entities. |
|
|
|
|
MapPoint object |
|
|
|
Longitude of the point. From -180 to 180. |
|
|
Latitude of the point. From -90 to 90. |
|
|
Longitude of the lower left corner of the map area. From -180 to 180. |
|
|
Latitude of the lower left corner of the map area. From -90 to 90. |
|
|
Longitude of the upper right corner of the map area. From -180 to 180. |
|
|
Latitude of the upper right corner of the map area. From -90 to 90. |
|
BannerPhraseInfo object |
|
|
|
Campaign ID. |
|
|
Ad ID. |
|
|
Keyword ID. |
|
|
Keyword. May contain negative words, which are specified with a minus sign before the word, for example [lightning -thunder -rain]. Negative words common to several keywords should preferably be specified in the ad group's Keyword length — no more than 4096 characters. The "!" operator before a negative word is not counted in the keyword length (the sequence "-!" is counted as one character). No more than 7 words in a keyword, excluding stop words and negative words. Each word and negative word — no more than 35 characters, excluding the minus before the negative word. |
|
|
Indicator that the keyword is a Yandex Catalog category. Always contains the value No. |
|
|
Bid on Yandex Search (Yandex units). Default limit — 50 Yandex units. Required only if a manual bid management strategy is selected for the campaign. |
|
|
Bid in the Yandex Advertising Network (Yandex units). The bid can be specified in the following cases:
|
|
|
Indicator of enabled auto-broker. Always contains the value Yes. |
|
|
|
|
|
Keyword check result:
|
|
|
Keyword priority when using automatic strategies. Possible values:
|
|
|
Number of clicks on the ad shown in search for this keyword. Calculated for 28 days from the current date. Days during which there was at least one click on the ad are selected for calculation. |
|
|
Number of ad impressions for this keyword in search. Calculated for 28 days from the current date. Days during which there was at least one ad impression for this keyword are selected for calculation. |
|
|
Minimum bid for entry into the Guaranteed placement block. |
|
|
Minimum bid for 1st position in the Guaranteed placement block. |
|
|
Minimum bid for entry into Premium placement. |
|
|
Minimum bid for 1st position in Premium placement. |
|
|
Keyword has low CTR and may be disabled soon — Yes/No. Alert This parameter is no longer relevant for new keywords, since keywords are no longer disabled for low CTR. |
|
|
Keyword disabled in search for low CTR — Yes/No. Alert This parameter is no longer relevant for new keywords, since keywords are no longer disabled for low CTR. |
|
|
Keyword disabled on Yandex Advertising Network sites for low CTR — Yes/No. Alert This parameter is no longer relevant for new keywords, since keywords are no longer disabled for low CTR. |
|
|
Array of Alert The parameter is no longer relevant and should not be used for bid selection. |
|
|
Array of The parameter is useful for bid selection for keywords. |
|
|
Array of bids for all positions in Premium placement and in the Guaranteed placement block. |
|
|
Final click price taking into account auto-broker. If the ad is not being shown in search for the keyword or the keyword is disabled in search for low CTR, the parameter returns the value NULL. |
|
|
Minimum price, assigned individually for each advertiser. |
|
CoverageInfo object |
|
|
|
Impression frequency at the bid from the In the |
|
|
Bid for which the |
|
PhraseUserParams object |
|
|
|
Value of the |
|
|
Value of the |
|
Sitelink object |
|
|
|
Sitelink text. |
|
|
Sitelink address. May contain substitution variables. |
|
RejectReason object |
|
|
|
Type of object rejected in moderation — Banner, Phrases, ContactInfo, Sitelink. |
|
|
Reason for rejection in moderation. |
|
Notes |
|
|
Input data examples
Python
{
'BannerIDS': [1974642, 20920155, 20155899, 64654],
'Filter': {
'StatusPhoneModerate': ['Yes'],
'StatusBannerModerate': ['Yes'],
'StatusPhrasesModerate': ['Yes'],
'StatusActivating': ['Yes'],
'StatusShow': ['Yes'],
'IsActive': ['Yes'],
'StatusArchive': ['No']
},
'GetPhrases': 'WithPrices'
}
PHP
array(
'BannerIDS' => array(1974642, 20920155, 20155899, 64654),
'Filter' => array(
'StatusPhoneModerate' => array('Yes'),
'StatusBannerModerate' => array('Yes'),
'StatusPhrasesModerate' => array('Yes'),
'StatusActivating' => array('Yes'),
'StatusShow' => array('Yes'),
'IsActive' => array('Yes'),
'StatusArchive' => array('No')
),
'GetPhrases' => 'WithPrices'
)
Perl
{
'BannerIDS' => [1974642, 20920155, 20155899, 64654],
'Filter' ={
'StatusPhoneModerate' => ['Yes'],
'StatusBannerModerate' => ['Yes'],
'StatusPhrasesModerate' => ['Yes'],
'StatusActivating' => ['Yes'],
'StatusShow' => ['Yes'],
'IsActive' => ['Yes'],
'StatusArchive' => ['No']
},
'GetPhrases' => 'WithPrices'
}