Ad Insights

Get ad analytics

Changed on

Returns one ad's performance summary and daily timeline, with optional audience breakdowns on Meta, TikTok and LinkedIn.

Includes summary metrics, a daily timeline over the requested date range, and optional demographic breakdowns (Meta, TikTok and LinkedIn only). If no date range is provided, defaults to the last 90 days. Date range is capped at 730 days max.

History: when an ad account connects, Zernio imports its last 90 days of metrics. summary and daily come from those synced metrics, so they hold no data for days before that. Breakdowns are read live from the platform over the requested range, so they are not limited by the import. When the ad belongs to a Meta ad account, a range reaching further back answers 202 with backfillPending: true and the covered part while the older days (up to 730 days back) are imported in the background; repeat the request until it returns 200. Other platforms never return 202.

get/v1/ads/{adId}/analytics

Request

  • Base URL: https://zernio.com/api
  • URL: https://zernio.com/api/v1/ads/{adId}/analytics
  • Auth: HTTP bearer

Path parameters

adIdstring required

Query parameters

fromDatestring date

Start of date range (YYYY-MM-DD). Defaults to 90 days ago.

toDatestring date

End of date range (YYYY-MM-DD). Defaults to today. Max 730-day range.

breakdownsstring

Comma-separated breakdown dimensions.

Meta: age, gender, country, publisher_platform, device_platform, region, platform_position, impression_device, video_asset, image_asset, body_asset, title_asset.

TikTok: gender, age, country (or country_code), publisher_platform (or platform), ac, language, placement. TikTok serves at most 365 days per breakdown, so a longer range is read over its last 365 days and analytics.breakdownsRange says which window.

LinkedIn (firmographics): job_title, job_function, seniority, industry, company, company_size, country, region. Rows carry the raw pivot value plus a resolved name. LinkedIn serves these aggregated over the whole range, delays the data 12-24h, and omits segments with fewer than 3 events.

A known dimension the platform cannot break down by is listed in analytics.unsupportedBreakdowns instead of being dropped (with guidance in analytics.breakdownHints where there is an alternative); the rest of the response is unchanged. An unknown name returns 400. A TikTok dimension that fails is listed in analytics.breakdownErrors and the response stays 200. Metrics TikTok refuses for a dimension are listed in analytics.breakdownDroppedMetrics, and the row values derived from them are null.

Response

Ad analytics

backfillPendingboolean

Meta only. Present and true while historical data is being backfilled.

Example response

{
  "analytics": {
    "summary": {
      "actions": {
        "link_click": 160,
        "post_engagement": 300,
        "offsite_conversion.fb_pixel_purchase": 42
      },
      "actionValues": {
        "offsite_conversion.fb_pixel_purchase": 2456.78,
        "offsite_conversion.fb_pixel_add_to_cart": 980.5
      },
      "costPerAction": {
        "link_click": 0.1052,
        "offsite_conversion.fb_pixel_purchase": 4.0114
      }
    },
    "daily": [
      {
        "actions": {
          "link_click": 160,
          "post_engagement": 300,
          "offsite_conversion.fb_pixel_purchase": 42
        },
        "actionValues": {
          "offsite_conversion.fb_pixel_purchase": 2456.78,
          "offsite_conversion.fb_pixel_add_to_cart": 980.5
        },
        "costPerAction": {
          "link_click": 0.1052,
          "offsite_conversion.fb_pixel_purchase": 4.0114
        }
      }
    ],
    "breakdownDroppedMetrics": {
      "publisher_platform": [
        "total_purchase",
        "total_purchase_value",
        "total_initiate_checkout_value"
      ]
    }
  }
}

Changes

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property /////////// to the response with the status

    • info

      added the optional property /////////// to the response with the status

    • info

      added the optional property /////////// to the response with the status

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property /////// to the response with the status

    • info

      added the optional property /////// to the response with the status

    • info

      added the optional property /////// to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status