
Google Ads Scraper
Pricing
$30.00/month + usage

Google Ads Scraper
Extract text, image and video ads from Google Ads, scraped from the ad library provided by Google Ads Transparency Center. Gain access to ad details, ad copy, locations, and more. Dive deeper into the Google Ads Transparency Center for a competitive edge.
5.0 (4)
Pricing
$30.00/month + usage
55
Monthly users
197
Runs succeeded
>99%
Response time
12 hours
Last modified
15 days ago
The scrapper returns 0 results
Hi, I ran your actor with the following url: https://adstransparency.google.com/advertiser/AR05753369569305559041?region=anywhere and it does not return any results but when you check on the adstrasparency web page, you can clearly see there are 3 video ads!
Can you please quickly fix this, I just paid and subscribed to your actor and I need this to work perfectly as soon as possible. Thank you.
Gustavo Silva (silva95gustavo)
Hi!
There are indeed some ads active for this advertiser, however these ads are marked as age-restricted. You can confirm this if you logout from your Google account or visit Ads Transparency Center from an Incognito session.
This scraper tool runs in anonymous mode (without logging in), which means that Google does not serve age-restricted ads. Some advertisers may focus mainly on ads that are restricted to certain ages and therefore this tool cannot retrieve some of their ads.
KLoic
Ok ok I see. Thanks for the quick reply and explanation. Do you have another idea on how to scrape these type of ads? Thanks
Gustavo Silva (silva95gustavo)
Unfortunately, I’ve decided not to implement support for age-restricted ads. Here’s why:
- Accessing age-restricted ads requires being logged in, which could violate Google’s Terms of Service.
- Adding this feature could pose a risk of account termination for users, which I want to avoid.
That said, if you’d like to proceed at your own discretion, you can customize the requests made by the scraper to include your session cookies. Here’s an example of how to pass custom headers in the input:
1{ 2 "startUrls": [ 3 { 4 "headers": { 5 "cookie": "<insert_cookies>", 6 "x-framework-xsrf-token": "<insert_token>" 7 }, 8 "url": "https://adstransparency.google.com/advertiser/AR08888592736429539329?authuser=0®ion=ES&preset-date=Last+7+days" 9 } 10 ] 11}
How to Configure:
- If you’re running the scraper from the Apify Console (UI), switch from "Manual" to "JSON" input mode.
- Add your headers under the headers object, as shown above.
- Replace
<insert_cookies>
and<insert_token>
with your session cookies and any required tokens.
Please keep in mind that using this approach carries the risks mentioned earlier, so proceed with caution.
KLoic
Thank you for sharing this workaround.
octagonal_expression
Where do you get the xsrf token
Gustavo Silva (silva95gustavo)
Please refer to the attached screenshot.
octagonal_expression
Thank you this worked, but only issue is the cookies eventually expiring and having to remake my api requests. Any way to set these to never expire?
Gustavo Silva (silva95gustavo)
I’m glad to hear it worked for you! However, I don’t provide explicit support for maintaining logged-in sessions or preventing cookies from expiring, as this could potentially violate Google’s Terms of Service. The actor allows customizing headers, which enables you to use your own session cookies, but how you manage those sessions is entirely up to you.
If you’re running into session expiration issues, I’d recommend looking into automated ways to refresh your cookies, but keep in mind that maintaining a persistent logged-in session while scraping may carry risks related to Google’s Terms of Service.
KLoic
Hi there, the following run id: gd3a4n4QLJxDeSHWK returned zero results and I would like to know why? As you told me few weeks ago, I tested the URL in incognito mode just to make sure that I don't need to be logged in to see ads, and I am able to see the ads in incognito mode. Yet, I got 0 results from your actor. Do you know why??
Tks in advance.
Gustavo Silva (silva95gustavo)
Thanks for flagging this, looks like there's an issue scraping political ads. I will get back to you soon.
Gustavo Silva (silva95gustavo)
Thanks for your patience. I’ve fixed the issue with scraping political ads, so your searches should now return results correctly. You can try running it again, and let me know if you run into any further issues.
KLoic
Looks like the issue is fixed for political ads. Thanks for the quick fix.
KLoic
Just a quick question, not an issue. When you enabled the preview ad option, you get a https://api.apify.com/v2/key-value-stores/.... link. Is there way or workaround to get a .png format of the preview instead of html? Thanks.
Gustavo Silva (silva95gustavo)
You can try using another Apify actor to convert from HTML to image. Here's a suggestion: https://apify.com/vojtam/screenshots-from-html
KLoic
Thank you!
Pricing
Pricing model
RentalTo use this Actor, you have to pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period. You also pay for the Apify platform usage.
Free trial
1 day
Price
$30.00