# Get ad analytics

Fetches ad analytics.

```http
GET https://api.pozy.ai/v1/ads/{adId}/analytics
```

- Area: Ads / Ad Insights
- Auth: Authorization: Bearer pz_live_...

## Path parameters

- `adId` (string, required)

## Query parameters

- `fromDate` (string (date))
- `toDate` (string (date))
- `breakdowns` (string)

## Example request

```bash
curl -X GET "https://api.pozy.ai/v1/ads/6f40fa2fb0a7e728dd1a73b7/analytics" \
  -H "Authorization: Bearer $POZY_API_KEY"
```

```ts
const res = await fetch("https://api.pozy.ai/v1/ads/6f40fa2fb0a7e728dd1a73b7/analytics", {
  headers: { Authorization: `Bearer ${process.env.POZY_API_KEY}` },
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.get(
    "https://api.pozy.ai/v1/ads/6f40fa2fb0a7e728dd1a73b7/analytics",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `backfillPending`, boolean
- `ad`, object
  - `id`, string
  - `name`, string
  - `platform`, string
  - `status`, string
  - `currency`, string: Can be null
- `analytics`, object
  - `summary`, object
    - `spend`, number
    - `impressions`, integer
    - `reach`, integer
    - `clicks`, integer
    - `ctr`, number
    - `cpc`, number
    - `cpm`, number
    - `engagement`, integer
    - `conversions`, number
    - `allConversions`, number
    - `costPerConversion`, number
    - `actions`, map of integer
    - `actionValues`, map of number
    - `purchaseValue`, number
    - `roas`, number
    - `costPerAction`, map of number
    - `outboundClicks`, integer
    - `outboundClicksCtr`, number
    - `inlineLinkClicks`, integer
    - `inlineLinkClickCtr`, number
    - `uniqueClicks`, integer
    - `uniqueCtr`, number
    - `videoPlayActions`, integer
    - `video30SecWatchedActions`, integer
    - `videoThruplayWatchedActions`, integer
    - `videoP25WatchedActions`, integer
    - `videoP50WatchedActions`, integer
    - `videoP75WatchedActions`, integer
    - `videoP95WatchedActions`, integer
    - `videoP100WatchedActions`, integer
    - `video2SecWatchedActions`, integer
    - `video6SecWatchedActions`, integer
    - `video6SecFocusedViews`, integer
    - `videoAvgTimeWatchedActions`, number
    - `costPerThruplay`, number
    - `funnel`, object
      - `landingPageViews`, integer
      - `contentViews`, integer
      - `searches`, integer
      - `wishlistAdds`, integer
      - `cartAdds`, integer
      - `checkoutsInitiated`, integer
      - `paymentInfoAdds`, integer
      - `purchases`, integer
      - `leads`, integer
      - `registrationsCompleted`, integer
      - `appInstalls`, integer
      - `messagingConversationsStarted`, integer
      - `messagingFirstReplies`, integer
    - `engagementBreakdown`, object
      - `postEngagement`, integer
      - `pageEngagement`, integer
      - `reactions`, integer
      - `comments`, integer
      - `shares`, integer
      - `saves`, integer
      - `pageLikes`, integer
      - `videoViews`, integer
      - `linkClicks`, integer
    - `lastSyncedAt`, string (date-time)
  - `daily`, array of object
    - `spend`, number
    - `impressions`, integer
    - `reach`, integer
    - `clicks`, integer
    - `ctr`, number
    - `cpc`, number
    - `cpm`, number
    - `engagement`, integer
    - `conversions`, number
    - `allConversions`, number
    - `costPerConversion`, number
    - `actions`, map of integer
    - `actionValues`, map of number
    - `purchaseValue`, number
    - `roas`, number
    - `costPerAction`, map of number
    - `outboundClicks`, integer
    - `outboundClicksCtr`, number
    - `inlineLinkClicks`, integer
    - `inlineLinkClickCtr`, number
    - `uniqueClicks`, integer
    - `uniqueCtr`, number
    - `videoPlayActions`, integer
    - `video30SecWatchedActions`, integer
    - `videoThruplayWatchedActions`, integer
    - `videoP25WatchedActions`, integer
    - `videoP50WatchedActions`, integer
    - `videoP75WatchedActions`, integer
    - `videoP95WatchedActions`, integer
    - `videoP100WatchedActions`, integer
    - `video2SecWatchedActions`, integer
    - `video6SecWatchedActions`, integer
    - `video6SecFocusedViews`, integer
    - `videoAvgTimeWatchedActions`, number
    - `costPerThruplay`, number
    - `funnel`, object
      - `landingPageViews`, integer
      - `contentViews`, integer
      - `searches`, integer
      - `wishlistAdds`, integer
      - `cartAdds`, integer
      - `checkoutsInitiated`, integer
      - `paymentInfoAdds`, integer
      - `purchases`, integer
      - `leads`, integer
      - `registrationsCompleted`, integer
      - `appInstalls`, integer
      - `messagingConversationsStarted`, integer
      - `messagingFirstReplies`, integer
    - `engagementBreakdown`, object
      - `postEngagement`, integer
      - `pageEngagement`, integer
      - `reactions`, integer
      - `comments`, integer
      - `shares`, integer
      - `saves`, integer
      - `pageLikes`, integer
      - `videoViews`, integer
      - `linkClicks`, integer
    - `lastSyncedAt`, string (date-time)
    - `date`, string (date)
  - `breakdowns`, map of array of object
  - `unsupportedBreakdowns`, array of string
  - `breakdownHints`, map of string
  - `breakdownErrors`, array of object
    - `breakdown`, string
    - `message`, string
  - `breakdownDroppedMetrics`, map of array of string
  - `breakdownsRange`, object
    - `fromDate`, string (date)
    - `toDate`, string (date)

```json
{
  "backfillPending": true,
  "ad": {
    "id": "6bfebd43ddc270f6d2c56fc5",
    "name": "Acme",
    "platform": "instagram",
    "status": "active",
    "currency": "USD"
  },
  "analytics": {
    "summary": {
      "spend": 12.5,
      "impressions": 1,
      "reach": 1,
      "clicks": 1,
      "ctr": 12.5,
      "cpc": 12.5,
      "cpm": 12.5,
      "engagement": 1,
      "conversions": 12.5,
      "allConversions": 12.5,
      "costPerConversion": 12.5,
      "actions": {
        "key": 1
      },
      "actionValues": {
        "key": 12.5
      },
      "purchaseValue": 12.5,
      "roas": 12.5,
      "costPerAction": {
        "key": 12.5
      },
      "outboundClicks": 1,
      "outboundClicksCtr": 12.5,
      "inlineLinkClicks": 1,
      "inlineLinkClickCtr": 12.5,
      "uniqueClicks": 1,
      "uniqueCtr": 12.5,
      "videoPlayActions": 1,
      "video30SecWatchedActions": 1,
      "videoThruplayWatchedActions": 1,
      "videoP25WatchedActions": 1,
      "videoP50WatchedActions": 1,
      "videoP75WatchedActions": 1,
      "videoP95WatchedActions": 1,
      "videoP100WatchedActions": 1,
      "video2SecWatchedActions": 1,
      "video6SecWatchedActions": 1,
      "video6SecFocusedViews": 1,
      "videoAvgTimeWatchedActions": 12.5,
      "costPerThruplay": 12.5,
      "funnel": {
        "landingPageViews": 1,
        "contentViews": 1,
        "searches": 1,
        "wishlistAdds": 1,
        "cartAdds": 1,
        "checkoutsInitiated": 1,
        "paymentInfoAdds": 1,
        "purchases": 1,
        "leads": 1,
        "registrationsCompleted": 1,
        "appInstalls": 1,
        "messagingConversationsStarted": 1,
        "messagingFirstReplies": 1
      },
      "engagementBreakdown": {
        "postEngagement": 1,
        "pageEngagement": 1,
        "reactions": 1,
        "comments": 1,
        "shares": 1,
        "saves": 1,
        "pageLikes": 1,
        "videoViews": 1,
        "linkClicks": 1
      },
      "lastSyncedAt": "2026-10-02T09:00:00.000Z"
    },
    "daily": [
      {
        "spend": 12.5,
        "impressions": 1,
        "reach": 1,
        "clicks": 1,
        "ctr": 12.5,
        "cpc": 12.5,
        "cpm": 12.5,
        "engagement": 1,
        "conversions": 12.5,
        "allConversions": 12.5,
        "costPerConversion": 12.5,
        "actions": {
          "key": 1
        },
        "actionValues": {
          "key": 12.5
        },
        "purchaseValue": 12.5,
        "roas": 12.5,
        "costPerAction": {
          "key": 12.5
        },
        "outboundClicks": 1,
        "outboundClicksCtr": 12.5,
        "inlineLinkClicks": 1,
        "inlineLinkClickCtr": 12.5,
        "uniqueClicks": 1,
        "uniqueCtr": 12.5,
        "videoPlayActions": 1,
        "video30SecWatchedActions": 1,
        "videoThruplayWatchedActions": 1,
        "videoP25WatchedActions": 1,
        "videoP50WatchedActions": 1,
        "videoP75WatchedActions": 1,
        "videoP95WatchedActions": 1,
        "videoP100WatchedActions": 1,
        "video2SecWatchedActions": 1,
        "video6SecWatchedActions": 1,
        "video6SecFocusedViews": 1,
        "videoAvgTimeWatchedActions": 12.5,
        "costPerThruplay": 12.5,
        "funnel": {
          "landingPageViews": 1,
          "contentViews": 1,
          "searches": 1,
          "wishlistAdds": 1,
          "cartAdds": 1,
          "checkoutsInitiated": 1,
          "paymentInfoAdds": 1,
          "purchases": 1,
          "leads": 1,
          "registrationsCompleted": 1,
          "appInstalls": 1,
          "messagingConversationsStarted": 1,
          "messagingFirstReplies": 1
        },
        "engagementBreakdown": {
          "postEngagement": 1,
          "pageEngagement": 1,
          "reactions": 1,
          "comments": 1,
          "shares": 1,
          "saves": 1,
          "pageLikes": 1,
          "videoViews": 1,
          "linkClicks": 1
        },
        "lastSyncedAt": "2026-10-02T09:00:00.000Z",
        "date": "2026-10-02T09:00:00.000Z"
      }
    ],
    "breakdowns": {
      "key": [
        {}
      ]
    },
    "unsupportedBreakdowns": [
      "string"
    ],
    "breakdownHints": {
      "key": "string"
    },
    "breakdownErrors": [
      {
        "breakdown": "string",
        "message": "Hello from Pozy"
      }
    ],
    "breakdownDroppedMetrics": {
      "key": [
        "string"
      ]
    },
    "breakdownsRange": {
      "fromDate": "2026-10-01",
      "toDate": "2026-10-01"
    }
  }
}
```
