List the events of a Meta Pixel
Live read. Asks Meta now for the events that one Meta Pixel received in the last days days, with one row for each event name: its count in the window, and lastSeenAt, the start of the last hour with an event of this name.
Read it before you create an ad set that optimizes for an event. An ad set that optimizes for an event that never fires gets no delivery. The counts are the ones that Meta reports for the Pixel. Meta keeps 7 days of events in hourly results, and the top 100 event names of each hour.
The Pixel must be a Pixel of the ad account of the advertiser: a row of GET /observe/{advertiserId}/pixels. Another Pixel answers 404, with error of not_found, and AdCrunch reads none of its events.
An advertiser that your organization does not own answers 404, with error of not_found. An advertiser that does not exist, and one that is not a Meta ad account, answer the same.
AdCrunch stores nothing from this read. Each request counts against the rate limits of Meta.
The answer has no page: it holds every event name of the window.
/observe/{advertiserId}/pixels/{pixelId}/eventsAuthorizationBearer token · headerrequiredSend Authorization: Bearer <credential>.
Use an API key (acr_…), from the AdCrunch console under Settings → API keys.
The credential names the organization, and no operation takes an organization parameter.
See https://docs.adcrunch.dev/api/authentication.
advertiserIdstringrequiredpixelIdstringrequireddaysintegerThe events of the Pixel in the window.
dataobject[]requiredOne row for each event name that the Pixel received in the window, the greatest count first. An empty array means that the Pixel received no event in the window.
Show propertiesHide properties
objectcountintegerrequiredThe number of events of this name in the window.
eventstringrequiredThe event name, as the Pixel sends it: PageView, StartTrial. The standard event StartTrial is the customEventType START_TRIAL of an ad set.
lastSeenAtstringrequiredThe start of the last hour with an event of this name, as Meta writes it (ISO 8601).
The request does not match the schema of this operation: a field is missing or has the wrong type, or the body is not valid JSON. error is invalid_request, and issues names each field. Nothing was changed.
issuesobject[]requiredOne entry for each field that does not match.
Show propertiesHide properties
objectinstringrequiredThe part of the request that holds the field.
bodycookieheadersparamsquerymessagestringrequiredA sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.
pathstringrequiredA JSON Pointer into that part of the request, such as /filename. An empty string is the whole part.
errorstringrequiredA stable code for the failure. This is the field to branch on. It does not change for a given failure.
invalid_requestmessagestringrequiredA sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.
No API key, or one that does not resolve. See the security scheme. error is unauthorized.
errorstringrequiredA stable code for the failure. This is the field to branch on. It does not change for a given failure.
unauthorizedmessagestringrequiredA sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.
The organization has no active subscription. An owner subscribes at paywallUrl. error is organization_unentitled.
paywallUrlstring<uri>requiredThe page where an owner of the organization subscribes. Show it to the person.
errorstringrequiredA stable code for the failure. This is the field to branch on. It does not change for a given failure.
organization_unentitledmessagestringrequiredA sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.
The caller does not hold observe:read. error is forbidden.
errorstringrequiredA stable code for the failure. This is the field to branch on. It does not change for a given failure.
forbiddenmessagestringrequiredA sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.
Your organization does not own the advertiser in the path, it does not exist, or it is not a Meta ad account. The answer does not tell them apart. error is not_found. AdCrunch asks Meta nothing. The same answer comes for a Pixel that is not a Pixel of the ad account. Then AdCrunch reads none of its events.
errorstringrequiredA stable code for the failure. This is the field to branch on. It does not change for a given failure.
not_foundmessagestringrequiredA sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.
This advertiser has no usable connection to Meta. A person must reconnect it.
providerstringrequiredThe ad platform this failure came from: meta.
errorstringrequiredA stable code for the failure. This is the field to branch on. It does not change for a given failure.
provider_not_connectedmessagestringrequiredA sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.
The provider refused the request, or could not answer it. This failure is often transient. Send the request again.
platformErroranyrequiredThe provider’s own error object, unchanged. For Meta it carries code, error_subcode, type, error_user_title and error_user_msg — branch on the subcode for anything AdCrunch does not model. It never holds the request AdCrunch sent.
providerstringrequiredThe ad platform this failure came from: meta.
errorstringrequiredA stable code for the failure. This is the field to branch on. It does not change for a given failure.
provider_errormessagestringrequiredA sentence to show a person. Written to say what to do next. Reworded whenever it can be said better, so never branch on it.