Skip to content
API reference Top creatives
API reference Assets

Top creatives

Ranks creatives by spend, ROAS, CTR, impressions or purchases over a date window, from the Meta ads linked to each creative.

GET/api/v1/public/assets/top

Scope: read. The key's creator needs access to Meta Ads. Ranking by money and seeing amounts need read:money.

Only creatives with at least one linked Meta ad that delivered in the window are ranked. Each creative's numbers are the sums over all of its linked ads.

Query parameters

metricstringquerydefault spend
spend, roas, ctr, impressions or purchases. Without the Money scope, roas and purchases fall back to spend order and the response says so in note.
daysintegerquerydefault 30
Window length ending today (UTC), 1 to 365. Used when date_from is not set.
date_fromstringquery
Start date, YYYY-MM-DD.
date_tostringquery
End date, YYYY-MM-DD. Defaults to today.
limitintegerquerydefault 10
How many creatives, 1 to 25.
min_impressionsintegerquerydefault 0
Skip creatives with fewer impressions in the window.

A ranking by roas skips creatives with no spend in the window.

Response

metric_usedstring
The metric the ranking actually used.
window.fromstring
First day of the window.
window.tostring
Last day of the window.
revenue_visibleboolean
Whether money fields are included.
countinteger
Creatives returned.
creativesarray
Ranked creatives.
creatives[].idstring
Asset UUID.
creatives[].namestring
Asset name.
creatives[].urlstring
App path of the asset, such as /library/8f2c....
creatives[].media_typestring
image, video or audio.
creatives[].tagsarray
Tags.
creatives[].hookstring | null
Hook.
creatives[].anglestring | null
Angle.
creatives[].stylestring | null
Style.
creatives[].impressionsinteger
Impressions in the window.
creatives[].clicksinteger
Clicks in the window.
creatives[].ctrnumber | null
Clicks divided by impressions.
creatives[].spendnumber
Money scope only.
creatives[].purchasesinteger
Money scope only.
creatives[].revenuenumber
Money scope only.
creatives[].roasnumber | null
Money scope only.
notestring
Present when the metric fell back to spend order, or when nothing delivered in the window.

Example request

curl "https://api.pipory.com/api/v1/public/assets/top?metric=roas&days=30&limit=5" \
  -H "Authorization: Bearer pip_your_key"

Example response

{
  "metric_used": "roas",
  "window": { "from": "2026-10-12", "to": "2026-11-10" },
  "revenue_visible": true,
  "count": 1,
  "creatives": [
    {
      "id": "8f2c4a1e-6b3d-4c9f-a2e1-7d5b3c1a9e8f",
      "name": "UGC hook v3",
      "url": "/library/8f2c4a1e-6b3d-4c9f-a2e1-7d5b3c1a9e8f",
      "media_type": "video",
      "tags": ["ugc"],
      "hook": "I stopped hitting snooze",
      "angle": "Problem solution",
      "style": "UGC",
      "impressions": 48210,
      "clicks": 1290,
      "ctr": 0.0268,
      "spend": 1840.5,
      "purchases": 61,
      "revenue": 7302.0,
      "roas": 3.9674
    }
  ]
}

Errors

StatusCodeMeaning
401invalid_api_keyMissing, unknown, revoked or expired key
403insufficient_scopeThe key or its creator's role cannot read Meta Ads
403upgrade_requiredThe workspace is not on a paid plan
422noneA parameter is out of range or not a valid date
429rate_limitedOver the key's rate limit