Cost 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 |
startDate | yes | Date. String in the format: YYYY-MM-DD | ||
endDate | yes | Date. String in the format: YYYY-MM-DD | ||
metrics | 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 |
breakdowns | 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 |
format | no | String | The format of the response. The default is JSON | json,csv |
count | no | Integer | The number of records to return in the response. The default is 10000 and the maximum is 250000 | |
campaignId | no | Comma-separated list of integers | List of campaign IDs to filter | |
bundleId | no | Comma-separated list of strings | List of bundle IDs to filter | |
country | no | Comma-separated list of strings by ISO 3166-2 | List of countries to filter | Comma-separated list of strings by ISO 3166-2 |
os | no | String | Present data for this operating system only | ios, android |
order | no | String | Order the results by breakdown / metric |
impressions, installs, billable spend day, campaign, title, os, country |
direction | 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,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
}
]
}
Note: The request rate for this endpoint is limited to 100 requests per minute. If you exceed the limit, requests will be returned with error status 429 (too many requests). Using multiple breakdowns and multiple comma-separated filter values can also reduce the number of requests.