Read daily insights across selected ad accounts with GET /api/v1/ads/insights. Requires an API key with the read scope or a signed-in workspace member.
Request
Stored daily rows with a currency-aware summary and freshness. Dates are account-local provider days. Ranges are capped at 730 days. No provider call happens during the request.
| Parameter | In | Type | Required |
|---|---|---|---|
workspaceId |
query | UUID | Yes |
accountId |
query | UUID | No |
campaignId |
query | UUID | No |
adGroupId |
query | UUID | No |
adId |
query | UUID | No |
from |
query | string | No |
to |
query | string | No |
level |
query | "campaign", "ad_group", "ad" |
No |
metrics |
query | array of string | No |
cursor |
query | string | No |
limit |
query | string | No |
Response
- HTTP 200:
AdInsightListwithdata,summary,hasMore,nextCursor,freshness.
The OpenAPI document has each field’s type.
Examples
const insights = await workspace.ads.insights({
level: "ad",
from: "2026-11-01",
to: "2026-11-07",
});insights = workspace.ads.list_workspace_insights()curl "https://pubnio.com/api/v1/ads/insights?workspaceId=$WORKSPACE_ID" \
-H "Authorization: Bearer $PUBNIO_API_KEY"pnio ads list-workspace-insights --level ad --from 2026-11-01 --to 2026-11-07async () => {
const response = await codemode.request({
method: "GET",
path: "/api/v1/ads/insights",
query: { workspaceId: codemode.workspaceId },
});
return response.data;
};Errors
It declares no problem of its own.
It declares the problems every Ads operation and most operations declare.
Idempotency
None needed: a read is safe to retry.
Limits
- Up to 100 items a page; pass
nextCursorback ascursor. See Pagination.