Cost API
Use the Cost API to monitor and analyze your advertising costs across campaigns and platforms.
Read time 2 minutesLast updated 4 hours ago
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:Name | Mandatory | Data type | Description | Values |
---|---|---|---|---|
| yes | Date. String in the format: YYYY-MM-DD | ||
| yes | Date. String in the format: YYYY-MM-DD | ||
| yes | Comma-separated list of strings | A list of metrics to be included in the response. The default is none | impressions, clicks, installs, billable_spend, ecpi |
| no | Comma-separated list of strings | A list of breakdowns by which the response data is returned. The default is none | day, campaign, title, os, country |
| no | String | The format of the response. The default is JSON | json,csv |
| no | Integer | The number of records to return in the response. The default is 10000 and the maximum is 250000 | |
| no | Comma-separated list of integers | List of campaign IDs to filter | |
| no | Comma-separated list of strings | List of bundle IDs to filter | |
| no | Comma-separated list of strings by ISO 3166-2 | List of countries to filter | Comma-separated list of strings by ISO 3166-2 |
| no | String | Present data for this operating system only | ios, android |
| no | String | Order the results by breakdown / metric | impressions, installs, billable spend day, campaign, title, os, country |
| no | String | Order by direction. Default is asc | asc, 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,ecpiResponse
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 } ] }