DSP Reporting API
Modified on Wed, 4 Nov at 6:18 AM

All requests use the GET method with query strings.
https://ui-api.bidease.com/api/reporting/v1/stats?api-token={API_TOKEN}&fromdate={FROM_DATE}&todate={TO_DATE}&rekls={REKL}&products={PRODUCT}&campaigns={CAMPAIGN}&group={GROUP1}&group={GROUP2}| Parameter | Description |
|---|---|
| api-token | Mandatory in each request. Provided by your Bidease account manager. |
| fromdate | Start date (inclusive), formatted as YYYY-MM-DD. |
| todate | End date (exclusive), also in YYYY-MM-DD format. |
| noheader | Add &noheader=true to exclude the CSV header. |
FROM_DATE and TO_DATE also support relative dates matching this regular expression:
^today(-\d+d)?$
The API call uses the date in the API token's timezone, and today refers to the start of the day when the call is made:
&fromdate=today-1d&todate=today
You can group data by up to 9 values with repeated group parameters:
| Value | Description |
|---|---|
| Application | Bundle of the application where the impression was served |
| Carrier | Carrier of the connection |
| City | City |
| Country | Country (ISO-3) |
| Day | Day of the event |
| Exchange | Exchange name |
| Hour | Hour of the event (in the API token timezone) |
| Model | Mobile phone model |
| Region | Region or subarea |
| Make | Mobile phone make |
| CreativeHash | Unique value of creative resources |
| DeviceType | Type of device (Mobile, Tablet) |
| OperationSystem | Operating system |
| CampaignID | ID of the campaign |
| CampaignName | Name of the campaign |
| CreativeID | ID of the creative |
| OperationSystemVersion | Operating system version |
| PlacementID | In-app placement ID (e.g. one bundle can have different ad placements: 320x50 at the bottom and an interstitial) |
| HasIFA | Whether the device advertising identifier was passed |
| AdvertiserID | ID of the advertiser on ui.bidease.com |
| ProductID | ID of the product on ui.bidease.com |
| AdBundle | Bundle of the advertised app (product) |
| AdvertiserProductName | Advertiser and product name, as Advertiser / Product |
| ReklID | ID of the advertiser (same as AdvertiserID) |
| ReklName | Name of the advertiser |
| Currency | Currency of the payment during a payment event |
| ConvHour | Hour of the conversion (install) |
| ImpressionHour | Hour of the impression |
| ConvDay | Day of the conversion (install) |
| ImpressionDay | Day of the impression |
| Resources | The combination of resources the creative used in the ad impression. Each row is one combination, not one resource. Recommended: group=resources.name — returns a comma-separated list of resource IDs. |
| MainResource | The main resource the creative used in the ad impression. Recommended: group=mainresource.resource_id — returns the resource ID. |
https://ui-api.bidease.com/api/reporting/v1/stats?api-token={API_TOKEN}&fromdate={FROM_DATE}&todate={TO_DATE}&group=Day&group=CampaignID&group=CampaignName
https://ui-api.bidease.com/api/reporting/v1/stats?api-token={API_TOKEN}&fromdate={FROM_DATE}&todate={TO_DATE}&group=CreativeID&group=HasIFA&group=PlacementIDFilter data with these parameters; each accepts zero or more values:
| Parameter | Description |
|---|---|
| rekls | Advertiser IDs from the Bidease UI |
| products | Product IDs from the Bidease UI |
| campaigns | Campaign IDs from the Bidease UI |
| bundles | App bundles from Google Play and the App Store |
&campaigns=10&campaigns=11&bundles=com.bidease&bundles=1133415133&rekls=304&rekls=404
There are three types of time attribution:
| Type | Timestamp used |
|---|---|
| Event | When an action (impression, click, conversion, purchase) was recorded |
| Impression | When the impression occurred |
| Conversion | When the conversion occurred |
Accordingly, there are three day groupings:
| Grouping | Description |
|---|---|
| Day | Day of the event (YYYY-MM-DD) |
| ImpressionDay | Day of the impression (YYYY-MM-DD) |
| ConvDay | Day of the conversion, applied to the conversion and all related events, including events before it such as the impression or click (YYYY-MM-DD) |
Select the attribution with the attr-type parameter:
| attr-type | Groups by |
|---|---|
| ByEvent | Event timestamp (default) |
| ByImpression | Impression timestamp |
| ByConv | Conversion timestamp |
&group=ImpressionDay&attr-type=ByImpression
Add more columns to the CSV with repeated extra-column parameters. Available values can be found in the Bidease UI.
&extra-column=UniqClicks&extra-column=Ecpa4&extra-column=UniqImpressions
Data for advertisers 300 and 310, grouped by application, country, creative ID and campaign ID, for December 2019:
https://ui-api.bidease.com/api/reporting/v1/stats?api-token=XXX-XXX-XXXX-XXX-XXXX&fromdate=2019-12-01&todate=2020-01-01&rekls=300&rekls=310&group=Application&group=Country&group=CreativeID&group=CampaignID
The resulting CSV includes columns such as:
| Column | Description |
|---|---|
| spend | Media cost in dollars |
| impressions | Number of impressions |
| clicks | Number of clicks |
| conversions | Number of installs |
| revenue | Value passed from MMPs; required for agencies to calculate their revenue |
| iap_sum | Sum of in-app purchases |
| iap | Number of in-app purchases |
| goal1–goal6 | Number of in-app events, as configured in the Bidease UI |
| ctr | Click-through rate |
| ecpm | Effective cost per thousand impressions |
| ecpc | Effective cost per click |
| cpi | Cost per install |
To get only the metric columns you need, list them with repeated field parameters. The rest of the metrics are then left out of the CSV; the grouping columns are still included.
&field=spend&field=impressions&field=clicks
You can use the Bidease Reporting API directly in Google Sheets with Google Apps Script. The example script below goes into a spreadsheet-bound Apps Script project: it requests the previous day's data and appends the results to the specified sheet.
// Main Config
// Specify your Bidease API token in apiToken parameter.
// Specify name of spreadsheet which will be used as sheet for getting API results.
const CONFIG = {
apiToken: "YOUR-API-TOKEN",
sheetName: "Sheet1",
baseUrl: "https://ui-api.bidease.com/api/reporting/v1/stats",
// GROUPINGS
// Put any groupings supported by Bidease API here.
groups: [
"Day",
"CampaignID"
],
// FILTERS
// Put any filters supported by Bidease API here.
filters: {
//rekls: [123, 1234],
//campaigns: [111, 222],
},
// EXTRA COLUMNS
// Put any extra columns supported by Bidease API here.
extras: {
//"extra-column": ["Ecpa4", "Ecpa3"]
}
};
function run() {
console.log("run(): START");
try {
const { url } = _buildBideaseUrl_();
console.log("===== Bidease API REQUEST =====");
console.log("Method: GET");
console.log("URL: " + url);
console.log("================================");
const response = UrlFetchApp.fetch(url, {
method: "GET",
muteHttpExceptions: true,
});
const status = response.getResponseCode();
console.log("Response status: " + status);
if (status !== 200) {
console.log("Response body (non-200): " + response.getContentText());
return;
}
const csvText = response.getContentText();
if (!csvText) {
console.log("Empty API response");
return;
}
const csvData = Utilities.parseCsv(csvText);
console.log(`CSV rows received: ${csvData.length}`);
_appendToSheet_(csvData);
} catch (e) {
console.log("Execution error: " + (e && e.stack ? e.stack : e));
} finally {
console.log("run(): END");
}
}
function _getDateParams_() {
const now = new Date();
const todayUTC = new Date(Date.UTC(
now.getUTCFullYear(),
now.getUTCMonth(),
now.getUTCDate()
));
const yesterdayUTC = new Date(todayUTC);
yesterdayUTC.setUTCDate(todayUTC.getUTCDate() - 1);
const format = (d) => Utilities.formatDate(d, "UTC", "yyyy-MM-dd");
return {
fromdate: format(yesterdayUTC),
todate: format(todayUTC),
};
}
function _buildBideaseUrl_() {
const dates = _getDateParams_();
const params = {
"api-token": CONFIG.apiToken,
fromdate: dates.fromdate,
todate: dates.todate,
};
const pairs = [];
_pushParamPairs_(pairs, params);
(CONFIG.groups || []).forEach((g) => pairs.push(["group", g]));
_pushParamPairs_(pairs, CONFIG.filters || {});
_pushParamPairs_(pairs, CONFIG.extras || {});
const query = pairs
.map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(String(v))}`)
.join("&");
return { url: `${CONFIG.baseUrl}?${query}` };
}
function _pushParamPairs_(targetPairs, obj) {
Object.keys(obj || {}).forEach((key) => {
const value = obj[key];
if (value === null || value === undefined) return;
if (Array.isArray(value)) {
value.forEach((item) => {
if (item === null || item === undefined || item === "") return;
targetPairs.push([key, item]);
});
return;
}
if (value === "") return;
targetPairs.push([key, value]);
});
}
function _appendToSheet_(csvData) {
const ss = SpreadsheetApp.getActiveSpreadsheet();
if (!ss) throw new Error("Active spreadsheet not found");
const sheet = ss.getSheetByName(CONFIG.sheetName);
if (!sheet) throw new Error(`Sheet "${CONFIG.sheetName}" not found`);
const lastRow = sheet.getLastRow();
let rowsToAppend;
if (lastRow === 0) {
console.log("Sheet is empty → writing header and data");
rowsToAppend = csvData;
} else {
console.log("Sheet not empty → skipping CSV header");
rowsToAppend = csvData.slice(1);
}
if (!rowsToAppend.length) {
console.log("No data rows to append");
return;
}
sheet
.getRange(lastRow + 1, 1, rowsToAppend.length, rowsToAppend[0].length)
.setValues(rowsToAppend);
console.log(`Appended ${rowsToAppend.length} rows`);
}support@bidease.com
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article