Developers » API methods » Ads API » ads.getAds
Ads APIads.getAds
Returns number of ads.
This method can be called with a user token. Access rights required: ads.
Parameters
account_idAdvertising account ID.
required parameter, int (number)
client_idAvailable and required for advertising agencies. ID of the client ads are retrieved from.
int (number)
include_deletedFlag that specifies whether archived ads shall be shown:
  • 0 show only active ads;
  • 1 show all ads.
flag, either 1 or 0
only_deleted
flag, either 1 or 0
campaign_idsFilter by advertising campaigns.
Serialized JSON array with campaign IDs. If the parameter is null, ads of all campaigns will be shown.
string
ad_idsFilter by ads.
Serialized JSON array with ad IDs. If the parameter is null, all ads will be shown.
string
limitLimit of number of returned ads. Used only if ad_ids parameter is null, and campaign_ids parameter contains ID of only one campaign.
int (number)
offsetOffset. Used in the same cases as limit parameter.
int (number)
Note
If campaign_ids and ad_ids filters are applied together the following ads will be returned:
1. If ad ID is in ad_ids, the ad will be returned.
2. If the ad belongs to campaign which ID is in campaign_ids it will be returned.
3. If the ad with ID from ad_ids exists and belongs to the campaign which ID is in campaign_ids, then this campaign will be ignored so rule ''2''' will not be applied.

Returns not more than 2000 ads from not more than 2000 campaigns.
Result
Returns an array of objects describing ads. Each object contains following fields:
id
integer
Ad ID.
campaign_id
integer
Campaign ID.
ad_format
integer
Ad format. Possible values:
  • 1 image and text;
  • 2 big image;
  • 3 exclusive format;
  • 4 community or app, square image;
  • 5 application in newsfeed (deprecated);
  • 6 mobile application;
  • 9 community post.
cost_type
integer, [0,1]
Cost type. Possible values:
  • 0 per clicks;
  • 1 per impressions.
cpc
integer
(if cost_type = 0) cost of a click, kopecks.
cpm
integer
(if cost_type = 1) cost of 1000 impressions, kopecks.
impressions_limit
integer
(if any) impressions limit per user.
impressions_limited
integer, [1]
(if any) 1 not more than 100 impressions per user.
ad_platform(if any) ad platforms. Possible values:
    • (if ad_format = 1)
    • 0 VK and partners sites;
    • 1 VK only.
    • (if ad_format = 9)
    • all all platforms;
    • desktop web version;
    • mobile mobile version and apps.
ad_platform_no_wall
integer, [1]
1 Don't show on communities walls restriction switched on.
all_limit
integer
Total ad limit in roubles. 0 not specified.
category1_id
integer
Category ID. See ads.getCategories.
category2_id
integer
Additional category ID
status
integer
Ad status. Possible values:
    • 0 stopped;
    • 1 run;
    • 2 deleted.
name
string
Ad name.
approved
integer
Ad moderation status. Possible values:
    • 0 not checked;
    • 1 pending moderation;
    • 2 approved;
    • 3 declined.
video
integer, [1]
1 Video ad.
disclaimer_medical
integer, [1]
1 "Attention: Be sure to read contra indications before use" warning is shown.
disclaimer_specialist
integer, [1]
1 "Attention: Consult a specialist before using" warning is shown.
disclaimer_supplements
integer, [1]
1 "Attention: A bioactive nutrient, is not a medicine" warning is shown.

Errors
601Permission denied. You have requested too many actions this day. Try later.
Global errors can occur while running. See their descriptions on this page.
Version historyShow all