Search code examples
facebookfacebook-graph-apifacebook-marketing-api

facebook marketing insights empty response


I am trying really hard to get insights for an ad account my business manager manages.

I have been digging through the documentation for past couple days and read many stack overflow questions to no result.

No matter what I try, I simply get

{
    "data" : []
}

These are some things I have tried:

<facebook_url>/v2.10/act_<accountID>/insights?fields=account_id <facebook_url>/v2.10/act_<accountID>/insights?fields=impressions&date_preset=lifetime

They all respond with empty response.

Strangely enough, <facebook_url>/v2.10/act_<accountID>?fields=name gives me exactly what I want:

{
    "name": <account_name>,
    "id"  : <account_id>
}

What am i doing wrong?


Solution

  • If you have not run any ads and have 0 ad spend, insights endpoint will not return those nodes. Only nodes which have data in the given time range are sent via the insights endpoint.