Case study 14
Ads Library. One search, one spreadsheet.
A research tool for sales and marketing. It takes a keyword, a country, and a count, reads publicly listed advertiser fields from Facebook Ads Library, and exports one Excel file.
- Sector
- Sales research
- Type
- Browser automation from a public ads archive to Excel
- Role
- End-to-end owner: the flow, the tool, the browser session, field extraction, export, and failure handling
The business problem
- Each ad was opened alone, and the page name and link were copied by hand.
- Phone, email, and website were read one by one from the public About section.
- The same steps repeated across dozens of ads.
- Sign-in was repeated, and a layout change or a dialog lost the work.
- Egypt, Saudi Arabia, the Emirates, and the United States could not be compared in one shape.
What the tool changes
How many ads an hour used to take by hand is not listed. No phone numbers, emails, or page names are shown. The run reads fields the advertiser has already published.
EgyptSaudi ArabiaUnited Arab EmiratesUnited States
- One run replaces opening each ad.
- Duplicate ad links are removed before processing.
- A saved browser profile keeps the sign-in for the next run.
- The four markets use the same flow.
- The run stops when results end or loading stalls, and keeps a screenshot when a search returns nothing.
System workflow
Ad idAd linkPage idPage namePage linkPhonesEmailsWebsiteExtracted at
- 01Check for a saved Facebook session
- 02If needed, sign in once in the browser
- 03Enter keyword, country, and count
- 04Open Ads Library and wait for cards
- 05Scroll until the count, or until results stop
- 06Keep unique ad links
- 07Read the public page fields and the public About fields
- 08Export Excel and close the browser
Technical architecture
| Runtime | Python |
|---|---|
| Browser | Selenium with Chrome, and a local profile for the session |
| Export | Pandas and openpyxl |
| Start | An interactive command-line prompt |