FAcebook Ads library src video/images

Hi everyone,

I'm building a scraper using Apify for the Facebook Ads Library. I'm fetching ad data via the Ads Library API, which provides details including an ad_snapshot_url. The issue is that the direct URL for the ad creative (the image or video file) is not included in the API response.

My approach is to open the ad_snapshot_url with Playwright and attempt to extract the <img> or <video> element from the DOM.

However, Facebook detects this and blocks my attempt. The page doesn't load correctly, and the target element is missing from the DOM structure.

What is the most effective way to bypass this block and get the direct URL for the creative? Are there any established best practices for using Playwright in this scenario, or is there an alternative method to get this URL?

Thanks for any advice. @Helper
Was this page helpful?