skylarcheung/Facebook-Ad-Library-Scraper — reverse-engineered prompt
Reverse engineered prompt
Build me a simple Python tool that pulls ads from the official Facebook Ad Library API and saves the results into spreadsheet friendly CSV files.
I want to be able to put my Facebook access token and search settings in a config file, then run one script to fetch ads. It should support searching by Facebook Page ID, search terms, country, ad type, active or inactive status, and funding entity or disclaimer if the API allows it. Keep it beginner friendly, with clear comments and simple instructions for someone who isn’t very technical.
The script should handle lots of results, up to around 20000 ads, show progress while it runs, and let me stop and rerun without making a mess. Save separate CSV files for the main ad data, region data, and demographic data so I can open them in Excel or Google Sheets. Don’t include anything that needs a web app, just a clean command line Python scraper. Look up the current Facebook Ad Library API docs online if needed.
Want more depth? Deep Reverse