Documentation

Support

Reporting API v2

Retrieve campaign metrics for advertisers using the Reporting API v2.
Read time 3 minutesLast updated 4 days ago

Authentication

Bearer API authentication

Advertisers Statistics

Description: Retrieves campaign metrics for an advertiser based on the requested breakdowns and filters. The data can be retrieved in JSON or CSV format. Method: GET Endpoint: https://api.ironsrc.com/advertisers/v2/reports? Parameters

Name

Mandatory

Data type

Description

Possible values

startDateYesDate. String in the format: YYYY-MM-DD
endDateYesDate. String in the format: YYYY-MM-DDMust be within 3 months of the startDate parameter
metricsYesComma-separated list of stringsA list of metrics to be included in the response. The default is noneimpressions, clicks, completions, installs, spend
breakdownsNoComma-separated list of stringsA list of breakdowns by which the response data is returned. The default is noneday, campaign, title, application, country, os, deviceType, creative, adUnit
formatNoStringThe format of the response. The default is JSONjson, csv
countNoIntegerThe number of records to return in the response. The default is 10000 and the maximum is 250000
campaignIdNoComma-separated list of integersList of campaign IDs to filter
bundleIdNoComma-separated list of stringsList of bundle IDs to filter
creativeIdNoComma-separated list of integersList of creative IDs to filter
countryNoComma-separated list of strings by ISO 3166-2List of countries to filter
osNoStringPresent data for this operating system onlyios, android
deviceTypeNoStringPresent data for this device type onlyphone, tablet
adUnitNoStringPresent data for chosen ad units onlyrewardedVideo, interstitial, offerWall, banner
orderNoStringOrder the results by breakdown / metricday, campaign, title, application, creative, country, os, impressions, clicks, completions, installs, spend
directionNoStringOrder by direction. Default is ascasc, desc

Request example

https://api.ironsrc.com/advertisers/v2/reports?breakdowns=day,campaign,country,deviceType&metrics=impressions,clicks,completions,spend&format=csv&count=100&startDate=2018-03-14&endDate=2018-04-07&country=US,CA,GB,FR&os=android&order=day&direction=desc Response In case of additional data that exceeds the count parameter passed in the request, the response will contain a “next” link that will retrieve the next batch of records. In a JSON response, the “next” link is in the “paging” property of the response body object. In a CSV response, the “next” link is in the “Link” header of the response. In case of an empty response, in which no data exists for the requested filters, the JSON format will result in an empty “data” array and the CSV format will lead to a 204 response (no content). Response example – JSON format
{ data: [ { "date": "2018-03-31T00:00:00.000Z", "campaignId": 12345, "campaignName": "campaignA", "country": "US", "deviceType": "phone", "impressions": 13016, "clicks": 3980, "completions": 3931, "spend": 5503.4 }, { "date": "2018-03-31T00:00:00.000Z", "campaignId": 12367, "campaignName": "campaign_b", "country": "US", "deviceType": "phone", "impressions": 29600, "clicks": 6179, "completions": 6049, "spend": 4839.2 }, ...... ], paging: { "next": "https://api.ironsrc.com/advertisers/v2/reports/advertiser?breakdowns=day,campaign,country,device_type&metrics=impressions,clicks,completions,spend&format=json&order=spend&direction=desc&count=50&startDate=2018-03-14&endDate=2018-04-14&country=US,CA,GB,FR&os=android&order=day&direction=desc&cursor=anVzdF9zb21lX2N1cnNvcl92YWx1ZQ%3D%3D" }}
Response example – CSV format
date,campaign_id,campaign_name,country,deviceType,impressions,clicks,completions,spend2018-03-31T00:00:00.000Z,12345,campaign_a,US,phone,13016,3980,3931,5503.42018-03-31T00:00:00.000Z,12367,campaign_b,US,phone,29600,6179,6049,4839.22018-03-30T00:00:00.000Z,12345,campaign_a,US,tablet,10716,3173,3150,3868.42018-03-30T00:00:00.000Z,12367,campaign_b,CA,phone,24946,4773,4679,3743.22018-04-12T00:00:00.000Z,12345,campaign_a,US,phone,9731,2852,2833,3399.62018-04-11T00:00:00.000Z,12345,campaign_a,US,phone,10101,2854,2830,33962018-04-10T00:00:00.000Z,12345,campaign_a,US,phone,9882,2897,2829,3394.82018-04-09T00:00:00.000Z,12345,campaign_a,US,phone,9472,2905,2825,33902018-04-07T00:00:00.000Z,12345,campaign_a,US,phone,9251,2854,2824,3388.82018-04-14T00:00:00.000Z,12389,campaign_c,FR,phone,151867,14700,145376,2834.982018-04-06T00:00:00.000Z,12345,campaign_a,US,phone,7801,2341,2331,2797.22018-04-13T00:00:00.000Z,12389,campaign_c,US,phone,142157,11878,136282,2670.952018-04-08T00:00:00.000Z,12389,campaign_c,US,phone,131915,19833,126777,2486.972018-04-12T00:00:00.000Z,12389,campaign_c,US,phone,114311,10901,109254,2076.852018-03-27T00:00:00.000Z,12389,campaign_c,US,phone,123111,14014,117291,2066.892018-03-15T00:00:00.000Z,12367,campaign_b,US,phone,13716,3455,3366,2019.62018-03-14T00:00:00.000Z,12367,campaign_b,GB,phone,13310,3429,3350,20102018-04-05T00:00:00.000Z,12389,campaign_c,GB,phone,103550,14117,99435,1990.222018-03-26T00:00:00.000Z,12389,campaign_c,US,phone,116766,14671,110828,1988.142018-04-10T00:00:00.000Z,12389,campaign_c,US,phone,104353,13086,99996,1942.66

Changes from V1

Authentication – changed to Bearer Field names – change to camelCase Old documentation – Reporting API v1 (OLD)