'Facebook's Graph API Explorer returns no results when filtering the insights endpoint by adlabels

I'm attempting to get the total spend across my Facebook Ads account for all campaigns that have a particular tag. When I attempt to filter by tag, I get an empty data object returned.

I'm doing this using the Graph API Explorer found here. https://developers.facebook.com/tools/explorer

When I submit the request without tag filtering, I get back the correct spend data for all campaigns. This is what I'm submitting without the filtering.

act_XXXX/insights?fields=spend&level=account&time_range[since]=2022-02-04&time_range[until]=2022-02-10

And this is the response I get.

{
  "data": [
    {
      "spend": "357.32",
      "date_start": "2022-02-04",
      "date_stop": "2022-02-10"
    }
  ],
  "paging": {
    "cursors": {
      "before": "MAZDZD",
      "after": "MAZDZD"
    }
  }
}

When I add tag filtering, my request looks like this.

act_XXXX/insights?fields=spend&level=account&time_range[since]=2022-02-04&time_range[until]=2022-02-10&filtering[0][field]=campaign.adlabels&filtering[0][operator]=ANY&filtering[0][value][0]=MY_TAG_NAME

And the response I get is this.

{
  "data": [
  ]
}

I have verified that the tag exists in two different ways. Here is a screenshot of a campaign in my selected date range that is using the tag.

campaign screenshot with tag

Also, I have queried the adlabels endpoint to ensure that what shows up in the "Tags" column in the Facebook Ads Manager UI is the same thing the API refers to as "adlabels."

Again, in the Graph API Explorer, I submitted the following.

act_XXXX/adlabels

In the response, there are many adlabels returned including this one.

{
      "name": "MY_TAG_NAME",
      "id": "XXXXXXXXXXXXXXXXX"
}

So, my question is what am I doing wrong? What do I need to do to filter my spend by tag/adlabel?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source