App Ad Revenue

Revenue Reporting API

Use this API to retrieve aggregated ad revenue statistics of your Application in the Nefta AdNetwork.

Authorisation

To access the app revenue reporting API, authorisation is required. Authorisation is in the form of an API key and is present in every API request in the Authorization header. Please contact your Nefta account manager to generate an API key for you.

The revenue reporting API is accessed via HTTPS POST requests.

$ curl -X POST \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '$REQUEST_BODY' \
https://api.nefta.io/v1.4/reporting/apps

Request body

The revenue reporting API uses request body parameters to filter your request. Please note, certain parameters are required and others aren't.

from_date (Required): The starting date for your report data in YYYY-MM-DD format.

to_date (Required): The ending date for your report data in YYYY-MM-DD format.

Please note, the date range cannot exceed 31 days.

metrics (Required): A list of metrics you want to include in the report. Supported metrics are:

requests
impressions
clicks
ad_revenue

dimensions (Optional): A list of dimensions you want your data grouped by. Supported dimensions are:

date
country
sdk_version
app_id
ad_unit_id
platform
app_store
app_version
ad_format
app_name
app_bundle
ad_unit_name
device_type

Request Body Example

The following snippet is an example of a request body.

{
  "from_date": "2024-10-31",
  "to_date": "2024-11-01",
  "dimensions": [
    "ad_format",
    "app_id"
  ],
  "metrics": [
    "requests",
    "impressions",
    "ad_revenue"
  ]
}

This example retrieves data for requests, impressions, and ad revenue for the period of October 31st, 2024 to November 1st, 2024, grouped by ad format and app id.

Response

The revenue reporting AP returns data in the JSON format. The data is an array of JSON objects, as shown below.

[
    {
        "ad_format": "interstitial",
        "app_id": "1234567891234567",
        "requests": 13021,
        "impressions": 8154,
        "ad_revenue": 104.2
    },
    {
        "ad_format": "banner",
        "app_id": "1234567891234567",
        "requests": 4752,
        "impressions": 3857,
        "ad_revenue": 84.5
    },
    {
        "ad_format": "rewarded",
        "app_id": "1234567891234567",
        "requests": 3835,
        "impressions": 2987,
        "ad_revenue": 74.2
    },
    {
        "ad_format": "interstitial",
        "app_id": "1234567891234568",
        "requests": 2581,
        "impressions": 2421,
        "ad_revenue": 50.8
    }
]

Please note, the currency of ad_revenue is always USD.