Ads · Ad Insights

Flexible live insights query

Returns the flexible live insights query, one page at a time. Works with Meta Ads, Google Ads and TikTok Ads.

GEThttps://api.pozy.ai/v1/ads/insights
Facebook and Instagram, Google Workspace and TikTokqueryAdInsights

Guides: Meta Ads, TikTok Ads, Ads reporting

Request

Send your API key as Authorization: Bearer pz_live_.... Read-only keys can call it. Keys with the ads resource group disabled get 403 resource_group_disabled. Authentication

Query parameters

NameTypeNotes
accountIdrequiredstring
objectIdstring
querystringUp to 10000 characters
adAccountIdstring
reportTypestringOne of BASIC, AUDIENCEDefault BASIC
dataLevelstringOne of AUCTION_ADVERTISER, AUCTION_CAMPAIGN, AUCTION_ADGROUP, AUCTION_AD
dimensionsstring
metricsstring
pageintegerDefault 1At least 1
pageSizeintegerDefault 1001 to 1000
customerIdstring
pageTokenstring
levelstringOne of ad, adset, campaign, account
fieldsstring
breakdownsstring
actionBreakdownsstring
actionAttributionWindowsstring
actionReportTimestring
useUnifiedAttributionSettingboolean
filteringstring
datePresetstring
fromDatestring (date)
toDatestring (date)
timeIncrementstring
limitintegerDefault 251 to 500
afterstring

Example

curl -X GET "https://api.pozy.ai/v1/ads/insights?accountId=696e0b682d0a31188e7a2ba9&limit=25" \
  -H "Authorization: Bearer $POZY_API_KEY"

Response

200 on success

  • objectIdstring
  • adAccountIdstring
  • customerIdstring
  • fieldMaskstring

    Can be null.

  • dataarray of object
  • pagingobject
    • afterstring

      Can be null.

    • nextPageTokenstring

      Can be null.

    • pageinteger
    • pageSizeinteger
    • totalRowsinteger
    • totalPagesinteger
200 response
{
  "objectId": "6cd1b53a19a7e157d2d46b68",
  "adAccountId": "666219aad7bab67ace411e4f",
  "customerId": "691909ff82eb5ed7c816716d",
  "fieldMask": "string",
  "data": [
    {}
  ],
  "paging": {
    "after": "string",
    "nextPageToken": "string",
    "page": 1,
    "pageSize": 1,
    "totalRows": 42,
    "totalPages": 42
  }
}

Errors

Errors use one shape: { error, type, code, param?, details? }. The ones you are most likely to see here:

400invalid_request_errorA parameter or body field is missing or invalid. param names it.
401authentication_errorThe API key is missing, revoked or expired.
403permission_errorThe key is scoped to other profiles or has this resource group disabled.
429rate_limit_errorToo many requests this minute. Wait for Retry-After seconds.

Every code is listed in Errors.

More in Ad Insights