Skip to content

Report API

Overview

This API allows advertisers to retrieve daily report data including impressions, clicks, conversions, and spend metrics.

Endpoint

POST https://ofa.adx.opera.com/oapi/v1/report/campaign_daily

Authentication

Use Bearer token authentication.

Authorization: Bearer <token>

Note: Please contact Opera Ads to obtain your API token.

Request

Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
AuthorizationYesBearer <token>

Parameters

ParameterTypeRequiredDescription
filtersarrayYesFilter conditions for the query
measurementsarrayNoFields to return. If not provided, defaults to all available measurements
pageintNoPage number (starts from 1), default: 1
page_sizeintNoNumber of records per page, default: 50, max: 1000

Filters

NameTypeRequiredDescription
daydayRangeYesDate range in format ["YYYYMMDD", "YYYYMMDD"]. Max 90 days.
order_idstringArrayNoFilter by order IDs
lineitem_idstringArrayNoFilter by line item IDs
creative_idstringArrayNoFilter by creative IDs

Filter Example:

json
{
  "filters": [
    { "name": "day", "value": ["20260101", "20260107"] },
    { "name": "order_id", "value": ["order123", "order456"] }
  ]
}

Measurements

NameDescription
dayDate (YYYYMMDD format)
advertiser_idAdvertiser ID
order_idOrder ID
lineitem_idLine item ID
creative_idCreative ID
spentSpend amount in USD
impressionsNumber of impressions
clicksNumber of clicks
conversionsNumber of conversions

Default Measurements (when not specified):

json
["day", "advertiser_id", "order_id", "lineitem_id", "creative_id", "spent", "impressions", "clicks", "conversions"]

Response

Success Response

json
{
  "code": 0,
  "message": "ok",
  "pagination": {
    "page": 1,
    "page_size": 50,
    "total_count": 100,
    "total_pages": 2
  },
  "data": [
    {
      "day": "20260107",
      "advertiser_id": "adv123456",
      "advertiser_name": "Example Advertiser",
      "order_id": "order789",
      "order_name": "Campaign Q1",
      "lineitem_id": "ad456",
      "lineitem_name": "Banner Ad 1",
      "creative_id": "crid789",
      "creative_name": "Creative 300x250",
      "spent": "125.500",
      "impressions": 50000,
      "clicks": 1500,
      "conversions": 75
    }
  ]
}

Response Fields

FieldTypeDescription
codeintStatus code. 0 = success
messagestringStatus message
paginationobjectPagination information
dataarrayArray of report data records

Pagination Object

FieldTypeDescription
pageintCurrent page number
page_sizeintNumber of records per page
total_countintTotal number of records matching the query
total_pagesintTotal number of pages

Error Responses

HTTP StatusCodeMessageDescription
4001invalid requestInvalid request parameters (e.g., invalid date range, missing required filters)
4012token not provided or invalid tokenAuthorization header is missing. Or Token is invalid / disabled.
4293too many requestRate limit exceeded (100 requests per minute)
5004internal errorServer error

Rate Limiting

  • Rate Limit: 100 requests per minute.
  • Exceeding the rate limit returns HTTP status 429 with code 3

Examples

Basic Request

Query with only the required date filter, returns all default measurements.

bash
curl --location 'https://ofa.adx.opera.com/oapi/v1/report/campaign_daily' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer your_token_here' \
--data '{
    "filters": [
        {"name": "day", "value": ["20260101", "20260107"]}
    ]
}'

Advanced Request

Query with multiple filters, custom measurements, and pagination.

bash
curl --location 'https://ofa.adx.opera.com/oapi/v1/report/campaign_daily' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer your_token_here' \
--data '{
    "filters": [
        {"name": "day", "value": ["20260101", "20260107"]},
        {"name": "order_id", "value": ["order123"]},
        {"name": "lineitem_id", "value": ["ad456", "ad789"]}
    ],
    "measurements": ["day", "order_id", "lineitem_id", "spent", "impressions", "clicks"],
    "page": 1,
    "page_size": 50
}'

Notes

  1. Pagination: Use page and page_size for pagination. The pagination object in the response contains total_count (total matching records) and total_pages (total number of pages).