Rank ads by performance
Changed onReturns an ads account's ads ranked by spend, impressions, clicks, results or ROAS over a date range, each with its creative (type, thumbnail, headline, body, link) and campaign.
Use it to see which creatives perform best. accountId is sibling-expanded like /v1/ads/timeline.
Money is ranked by its raw amount, so pass adAccountId when the connection's ad accounts bill in different currencies.
A Meta range older than the imported history answers 202 with backfillPending: true and the covered part; repeat the request until it returns 200.
Request
- Base URLhttps://zernio.com/api
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
Account ID. Sibling-expanded to its linked posting and ads pair. An id the API key cannot reach answers 404.
Optional platform-native ad account ID (e.g. Meta act_…) to rank one ad account only.
Inclusive start of the range (YYYY-MM-DD).
Inclusive end of the range (YYYY-MM-DD). Max 730-day range.
Restrict to one platform.
Metric the ads are ranked by, highest first.
How many ads to return.
Response
Ads ranked by sortBy. Ads with no delivery in the range are left out.
Changes
- warning
added the new
textenum value to the///response property for the response status - warning
added the new
textenum value to the///////response property for the response status
- warning
- info
added the non-success response with the status
- info