Facebook Ads Scraper avatar
Facebook Ads Scraper
Try for free

Pay $5.00 for 1,000 Campaigns

View all Actors
Facebook Ads Scraper

Facebook Ads Scraper

apify/facebook-ads-scraper
Try for free

Pay $5.00 for 1,000 Campaigns

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.

Do you want to learn more about this Actor?

Get a demo
MO

Issue with Extracting Ads for Adapta using Facebook Ads Scraper API

Closed

Moscatelli opened this issue
2 months ago

Hi Support Team,

I am encountering an issue with the Facebook Ads Scraper API from APIFY. I am trying to extract ads for the brand Adapta during this period: https://www.facebook.com/ads/library/?active_status=all&ad_type=all&country=BR&view_all_page_id=104584352010554&start_date[min]=2024-06-06&start_date[max]=&search_type=page&media_type=all

Despite the presence of numerous ads, the API is not returning any results. The JSON response I am receiving is as follows:

[ { "isResultComplete": false, "results": [], "pageResults": [], "forwardCursor": "AQHR1IlTQ645IR4j325aQJ7-W7osK7rDBGDSv_Ajngs3_PgW4I14NwJip6_iNqhvi7if", "backwardCursor": "", "totalCount": 191, "collationToken": "db3e7630-498a-4f39-b4eb-3101123844f1", "pageInfo": { "page": null, "ad_library_page_info": { "page_info": { "page_name": "Adapta", "is_profile_page": false, "page_is_deleted": false, "page_is_restricted": true, "related_pages": [], "has_blank_ads": false, "hidden_ads": 0, "page_profile_uri": "https://facebook.com/adapta.org", "page_id": "104584352010554", "page_verification": "NOT_VERIFIED", "entity_type": "PERSON_PROFILE", "page_alias": "adapta.org", "likes": 2037, "page_category": "Education", "ig_verification": false, "ig_username": "adapta_org", "ig_followers": 125298 }, "page_spend": { "is_political_page": false } }, "ad_library_main": { "top_keywords": null }, "audience_page_info": { "page_info": { "page_has_any_siep_ads": false, "page_name": "Adapta" } } }, "inputUrl": "https://www.facebook.com/ads/library/?active_status=all&ad_type=all&country=BR&view_all_page_id=104584352010554&start_date[min]=2024-06-06&start_date[max]=&search_type=page&media_type=all" } ]

New try giving the same problem: [ { "isResultComplete": false, "results": [ ], "pageResults": [ ], "forwardCursor": "AQHRZwVrtpSt5QYZ5IIm4dzRy_cbYshbF0uKTeCRKiwdeFMduhFGoqMMf0e3CdLpMamn", "backwardCursor": "", "totalCount": 212, "collationToken": "76d15dc8-4c80-42b0-a7f0-ab49e11f1da3", "pageInfo": { "page": null, "ad_library_page_info": { "page_info": { "page_name": "Adapta", "is_profile_page": false, "page_is_deleted": false, "page_is_restricted": true, "related_pages": [ ], "has_blank_ads": false, "hidden_ads": 0, "page_profile_uri": "https://facebook.com/adapta.org", "page_id": "104584352010554", "page_verification": "NOT_VERIFIED", "entity_type": "PERSON_PROFILE", "page_alias": "adapta.org", "likes": 2043, "page_category": "Education", "ig_verification": false, "ig_username": "adapta_org", "ig_followers": 125433 }, "page_spend": { "is_political_page": false } }, "ad_library_main": { "top_keywords": null }, "audience_page_info": { "page_info": { "page_has_any_siep_ads": false, "page_name": "Adapta" } } }, "inputUrl": "https://www.facebook.com/ads/library/?active_status=all&ad_type=all&country=BR&view_all_page_id=104584352010554&sort_data[direction]=desc&sort_data[mode]=relevancy_monthly_grouped&search_type=page&media_type=all&start_date[min]=2024-06-07&start_date[max]=2024-07-05" } ]

Could you please help me understand why the API is not returning the correct results?

Thank you in advance!

Best regards,

Eduardo!

MO

Moscatelli

2 months ago

Hello everyone, any predictions to resolve this question?

alexey avatar

Hi!

Thanks for your feedback, sorry for delay with answering, its first issue of such kind - actually bug in Facebook Ads itself:

https://www.facebook.com/ads/library/?active_status=all&ad_type=all&country=BR&view_all_page_id=104584352010554&start_date[min]=2024-06-06&start_date[max]=&search_type=page&media_type=all

In incognito browser (means not logged as Facebook user) counter is 240, but no actual ads data ("No ads match your search criteria")

In regular browser both counter and ad results available, means it works if viewed as user logged in to Facebook

Actor can not use Facebook logins of any kind because of legal reasons, so solution is to search ads just by page: https://www.facebook.com/ads/library/?active_status=all&ad_type=all&country=ALL&view_all_page_id=104584352010554&search_type=page&media_type=all and both counter (270) and ads visible in incognito browser

Screens attached

I´m going to close the issue now, but if there would be anything else we could help with, please let us know.

alexey avatar

Follow up: https://www.facebook.com/ads/library/?active_status=all&ad_type=all&country=ALL&view_all_page_id=104584352010554&search_type=page&media_type=all works in browser but not in actor, something really specific about targeted page, got only 12 actual ads from couple dozens of internal Fb Ad API calls without results. For right now please consider it as unsupported page format.

Developer
Maintained by Apify
Actor metrics
  • 302 monthly users
  • 40 stars
  • 100.0% runs succeeded
  • 5 days response time
  • Created in Apr 2023
  • Modified 1 day ago