Skip to content

List ads with a performance summary

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

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

Request

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

Parameter In Type Required
workspaceId query UUID Yes
accountId query UUID No
campaignId query UUID No
adGroupId 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: AdList with data, hasMore, nextCursor, freshness.

The OpenAPI document has each field’s type.

Examples

const ads = await workspace.ads.ads({ adGroupId, status: "active" });
ads = workspace.ads.list_ads()
curl "https://pubnio.com/api/v1/ads/ads?workspaceId=$WORKSPACE_ID" \
  -H "Authorization: Bearer $PUBNIO_API_KEY"
pnio ads list-ads --ad-group-id "$AD_GROUP_ID" --status active
async () => {
  const response = await codemode.request({
    method: "GET",
    path: "/api/v1/ads/ads",
    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