2

How do these websites like BigSpy get the latest ads from Facebook?

Do you need to scrape all the pages on FB to a database and then use Puppeteer or Selenium to click through the Facebook page UI and look at the ads?

Or is it somehow done through Facebook Ad library?

Could someone share the process by which one could code it up themselves?

Thanks.

Example website: https://bigspy.com/adspy/facebook/

wongz
  • 3,255
  • 2
  • 28
  • 55

2 Answers2

0

You can do with scraping tools puppeteer with searching special items on facebook or instagram.

i-Guru
  • 164
  • 4
  • 25
  • Wouldn't Facebook block it though? Do you think it's done on Facebook.com or the ad library? – wongz May 02 '20 at 17:14
  • It also can be done with facebook library. You need to create developer account to get token key and use facebook api with that token key. But it only depends with one account. Puppeteer also can be done for wide search. – i-Guru May 03 '20 at 00:29
  • Thank you. I'm familiar with puppeteer and getting a developer account and token... but could you clarify what you mean by "searching special items" and "wide search"? My understanding is the only way to get a majority of ads would be to have all the pages in a database and go through each of them and look at the active ads via the page. :S – wongz May 03 '20 at 00:51
  • 1
    Sorry, I think my English is not good enough to let you understand well. – i-Guru May 03 '20 at 18:06
  • 1
    I think facebook library is good as they already developed and provided roughly. But puppeteer is strong option even it can control mouse and keyboard to search things. – i-Guru May 03 '20 at 18:07
  • 1
    thanks. Do you have any suggestions on how to query the Facebook Ad Library API for "all" results? Putting in a blank for the search term doesn't work – wongz Jul 07 '20 at 23:47
  • @iGuru1994 I am also interested in this topic, could you describe a bit how you would approach this? How did you tackle this Wongz? – Svenisok Nov 07 '20 at 16:53
0

Adspy tools collect ads from Facebook in two different ways:

  1. They get their data from Facebook’s “Ad Library” archive, which does not give detailed information and is outdated. Some adspy tools use this feature to collect ads like Spytex. They do this by utilizing add-ons and similar techniques.

  2. Another method is a bit advanced: Getting data directly from Facebook Graph API itself. There are some adspy tools, like AdFlex, that collect ads in a direct matter, without any intermediary. AdFlex uses its own developed crawlers to scrape ads from FB.

AugusH
  • 1
  • Does the Facebook Graph API allow one to get data from a newsfeed as if on Facebook? From what I know... my conclusion is that people just use bots (possibly on mobile phones) under fake accounts to click on and scrape the ads directly on the site – wongz Sep 28 '22 at 03:19