minimaxir / facebook-ad-library-scraper

A Python scraper for the Facebook Ad Library, using the official Facebook Ad Library API.
MIT License
117 stars 26 forks source link

KeyError: 'demographic_distribution' #1

Open minimaxir opened 4 years ago

minimaxir commented 4 years ago

It appears Demographic distribution info is not included 100% of the time? Weird, but should catch that.

Only seems to happen when searching INACTIVE ads.

hamik112 commented 4 years ago

@minimaxir a lot of inactivate ads are ones that have actually been flagged for targeting certain audiences/demographics, that might explain why the demographic distribution doesn't show. If your looking to scrape facebook ads data real time without the limitations I can help you out with the nonofficial way.

minimaxir commented 4 years ago

Thanks for the offer, but for kosherness this script needs to follow the official approach.

I'll take a look to see if it is a distribution flag.