Skip to content

List ad groups with a performance summary

PubNio API ads.listAdGroups: list ad groups with a performance summary. Request fields, examples in five clients, errors, and idempotency.

List ad groups with a performance summary with GET /api/v1/ads/ad-groups. Requires an API key with the read scope or a signed-in workspace member.

Request

Lists selected-account ad groups newest first, optionally filtered by account, campaign, provider, status, or date range. Each ad group includes a summary for the range.

Parameter In Type Required
workspaceId query UUID Yes
accountId query UUID No
campaignId query UUID No
provider query one of 9 strings No
status query one of 9 strings No
from query string No
to query string No
cursor query string No
limit query string No

Response

  • HTTP 200: AdGroupList with data, hasMore, nextCursor, freshness.

The OpenAPI document has each field’s type.

Examples

const adGroups = await workspace.ads.adGroups({ campaignId });
ad_groups = workspace.ads.list_ad_groups()
curl "https://pubnio.com/api/v1/ads/ad-groups?workspaceId=$WORKSPACE_ID" \
  -H "Authorization: Bearer $PUBNIO_API_KEY"
pnio ads list-ad-groups --campaign-id "$CAMPAIGN_ID"
async () => {
  const response = await codemode.request({
    method: "GET",
    path: "/api/v1/ads/ad-groups",
    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 nextCursor back as cursor. See Pagination.

Type to search…

↑↓ navigate↵ selectEsc close