Poll an async insights report run
Status and results for a report run created via POST /v1/ads/insights/reports. While the job
runs, returns status and percentCompletion. Once status is "Job Completed" the response
also carries a data page, cursor-paginated via limit / after.
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
Query Parameters
Zernio SocialAccount id used to resolve the Meta token (must be the same connection that created the run).
251 <= value <= 500Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.adinsights.getAdInsightsReport({ path: { reportRunId: 'reportrun_abc123', }, query: { accountId: 'account_abc123', },});console.log(data);{
"reportRunId": "string",
"status": "string",
"percentCompletion": 0,
"dateStart": "string",
"dateStop": "string",
"data": [
{}
],
"paging": {
"after": "string"
}
}{
"error": "Unauthorized"
}Get ad analytics GET
Returns detailed performance analytics for an ad. Includes summary metrics, a daily timeline over the requested date range, and optional demographic breakdowns (Meta and TikTok only). If no date range is provided, defaults to the last 90 days. Date range is capped at 730 days max.
Get campaign analytics GET
Returns performance analytics for a whole campaign in one call: summary metrics, a daily timeline over the requested date range (summed across the campaign's ads), and optional demographic breakdowns. Breakdowns are fetched live from Meta at the campaign level (one call per dimension, no per-ad fan-out), so an agency dashboard gets campaign-level age/gender/etc. without summing thousands of per-ad reads. `campaignId` is the platform campaign id; pass `platform` when a campaign id could be ambiguous across platforms. If no date range is provided, defaults to the last 90 days. Date range is capped at 730 days max.