Cost API

Use the Cost API to monitor and analyze your advertising costs across campaigns and platforms.

Read time 5 minutes

Authentication

Bearer API authentication

Description: Retrieves campaign cost and installs 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/v4/reports/cost

Parameters:

NameMandatoryData typeDescriptionValues
startDate
yesDate. String in the format: YYYY-MM-DD
endDate
yesDate. String in the format: YYYY-MM-DD
metrics
yesComma-separated list of stringsA list of metrics to be included in the response. The default is noneimpressions, clicks, installs, billable_spend, ecpi
breakdowns
noComma-separated list of stringsA list of breakdowns by which the response data is returned. The default is noneday, campaign, title, os, country
format
noStringThe format of the response. The default is JSONjson,csv
count
noIntegerThe number of records to return in the response. The default is 10000 and the maximum is 250000
campaignId
noComma-separated list of integersList of campaign IDs to filter
bundleId
noComma-separated list of stringsList of bundle IDs to filter
country
noComma-separated list of strings by ISO 3166-2List of countries to filterComma-separated list of strings by ISO 3166-2
os
noStringPresent data for this operating system onlyios, android
order
noStringOrder the results by breakdown / metricimpressions, installs, billable spend day, campaign, title, os, country
direction
noStringOrder by direction. Default is ascasc, desc

Request example:

https://api.ironsrc.com/advertisers/v4/reports/cost?campaignId=1234567&startDate=2023-03-10&endDate=2023-03-11&breakdowns=day,campaign,title&metrics=impressions,clicks,installs,billable\_spend,ecpi

Response:

If the data in the request exceeds the count parameter, the response will contain a “next” link that will retrieve the next batch of records.

In a JSON response, the “next” link is included in the “paging” property of the response body object. In a CSV response, the “next” link is included in the “Link” header of the response.

If a response is empty and 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).

{
    "data": [
        {
            "date": "2023-03-11T00:00:00.000Z",
            "campaignId": 1234567,
            "campaignName": "Campaign name",
            "titleName": "Title name",
            "titleBundleId": "com.bundle.name",
            "impressions": 682084,
            "clicks": 451717,
            "installs": 12700,
            "billableSpend": 14714.29821,
            "ecpi": 1.16
        },
        {
            "date": "2023-03-10T00:00:00.000Z",
            "campaignId": 1234567,
            "campaignName": "Campaign name",
            "titleName": "Title name",
            "titleBundleId": "com.bundle.name",
            "impressions": 444356,
            "clicks": 288657,
            "installs": 7565,
            "billableSpend": 8483.80119,
            "ecpi": 1.12
        }
    ]
}