Skip to main content
GET
Get live Facebook ad performance, one row per day, for your campaigns or ads. Pick the metrics you want, split them by age, gender, country or placement, and page through long date ranges.
  • Numbers are read from Meta when you call, not from a nightly copy.
  • Use History for the spend we bill. Use Insights for reporting and analysis.
  • All money values are in the ad account’s currency, returned in currency on each row.
  • Campaigns must have been created through Ayrshare for this profile. An ad created through Ayrshare for another profile is refused. Other ad ids are read with this profile’s linked Meta account, so Meta only returns ads that account can see.
  • One request covers one ad account. Ids from several ad accounts return code 101, and so do several ad ids that Ayrshare has no record of. Ask for those one at a time.

Header Parameters

Query Parameters

string
required
What each row reports on: campaign or ad.adSet is not supported yet and returns code 101.
string
Comma-separated campaign or ad ids, up to 50. Required for level=campaign.With level=ad, you can leave ids out and send accountId instead. This reports on the ads you created through Ayrshare for this profile in that ad account, not on every ad in it. It works for up to 50 such ads. For more, send their ids, or report by campaign. If none are found, the report is empty.
string
The ad account id, with or without the act_ prefix (1234567890 or act_1234567890).Required with level=ad when ids is left out.
string
Comma-separated metrics to return. Leave it out to get them all. See Metrics.
string
Comma-separated breakdowns: age, gender, country, placement. Each day then has one row per value, or per combination with age,gender. Send one breakdown at a time, or age,gender; Meta refuses other mixes (such as age,country), so they return code 101.
string
default:"30 days ago"
First day, as YYYY-MM-DD. It can be up to 37 months ago.
string
default:"today"
Last day, as YYYY-MM-DD.
string
The nextCursor from the previous response, to get the next page.

Metrics

Facebook reports every metric in this table. One exception: Meta does not report reach for a report with breakdowns that starts more than 13 months ago, so reach is left out of those rows. On networks that don’t report a metric, it is left out of the rows rather than returned as 0, and asking for it returns code 101.
Meta counts some actions under more than one type, so don’t add actions values together. For example, omni_purchase already includes purchase. conversionValue counts each purchase once.

Paging

Each response returns up to 500 rows. If there are more, nextCursor is set. Send the same request again with cursor set to that value to get the next page. On the last page, nextCursor is null.

Errors