
Facebook Ads Scraper
Pricing
$5.00 / 1,000 campaigns

Facebook Ads Scraper
Extract advertising data from one or multiple Facebook Pages. Get page details, reach estimates, publisher platforms, report count, number of impressions, ad IDs, timestamps, and more. Download Facebook ads data in JSON, CSV, and Excel and use it in apps, spreadsheets, and reports.
4.5 (11)
Pricing
$5.00 / 1,000 campaigns
133
Total users
7.6k
Monthly users
751
Runs succeeded
>99%
Issue response
5.1 days
Last modified
7 days ago
onlyTotal field not working properly in Clay API call
Closed
Hi, I'm trying to call this actor via my clay.com table, and I think the onlyTotal field is not working properly.
I want only the total number of ads a page is running. However, when calling the actor, I get a ton of data back, and I can't work with it. Note - Clay.com only allows for 200KB data per cell, so the onlyTotal field is crucial when scraping Facebook pages with many ads (if it returns too much data, Clay can't parse it).
So - this error is causing me not to be able to see the total number of active ads for pages that run a lot of ads.
Here's the JSON I send to the actor:
{ "onlyTotal": true, "isDetailsPerAd": false, "activeStatus": "active", "startUrls": [ { "url": "Facebook Page URL", "method": "GET" } ] }
For some reason, I still get a ton of data about ads, as if the first two fields don't matter. Limiting the number of results via the results field does not help either, as the actor seemingly always returns 1 result, but in it there are JSONS with a ton of data for each ad.
Please help!
Thanks.

Hi!
I see that all your recent runs have been done as expected, for example https://console.apify.com/view/runs/M0debqv0bjh04AWmQ
If you want to exclude partial results for the ads, please omit unwanted data: https://api.apify.com/v2/datasets/idTxIfdxhyABLZ08A/items?clean=true&format=json&omit=results or directly specify what to get from the dataset: https://api.apify.com/v2/datasets/idTxIfdxhyABLZ08A/items?clean=true&format=json&fields=inputUrl,totalCount
I will close the issue now, but if there is anything else we can help with, please let us know.
idannim
Hi, not all my results have been done as expected. A large percentage fail for the reason specified in the ticket (see attached screenshot).
Regarding the partial results - I have no way to parse this after running because Clay discards the result if it's over 200 KB. Is there a way to have Apify only return the total number of ads without more information, so that I don't exceed the 200 KB limit? onlyTotal is not working for this.
Thanks.

Hi!
Please try to contact Clay support. The actor can not duplicate the Apify platform logic for dataset filtering. Hope Clay can provide some other approaches.
I will close the issue now, but if there is anything else we can help with, please let us know.