Google Ads Scraper avatar

Google Ads Scraper

Try for free

1 day trial then $30.00/month - No credit card required now

Go to Store
Google Ads Scraper

Google Ads Scraper

silva95gustavo/google-ads-scraper
Try for free

1 day trial then $30.00/month - No credit card required now

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.

DN

Is there anyway to limit what to scrape?

Closed

dantrials2 opened this issue
a month ago

So for my use case I'm not interested in the image or vide urls is there any way to get everything else apart from the urls ?

silva95gustavo avatar

Thanks for your message! I'd like to understand your use case better to see how this fits with the scraper’s standard functionality. Could you clarify:

  • What data format are you currently exporting to (Excel, CSV, JSON, etc.)?
  • What issue does the presence of image or video URLs cause in your workflow?

While these fields don’t affect the scraper’s execution time, knowing more about your goals will help me provide the best guidance.

DN

dantrials2

a month ago

So currently I take the results from the scraper (json) and put it into api to chatgpt, but it takes a lot of tokens everytime. but by removing the imageurl,videourl,previewurl and starturl i was able to reduce the tokens by 50%(HUGE savings), this does vary with what was scraped but i was wondering if there is the option to not scrape the video and img urls. Also side question, im suprised that the urls dont add to the scraping time, what contribute to the time of the scraper ? Is there anyway i can have it scraper faster ?

silva95gustavo avatar

You should be able to select the list of output fields that you want to see included in the JSON result. Please see the attached screenshot.

However this solution won't work for you if you are aiming to extract specific fields inside the variations section such as the body, headline and CTA. If that's your use case, then I would suggest to use an online converter to transform your data according to your needs. Here's my suggestion:

  1. Go to https://zod-playground.vercel.app/
  2. Paste the output of this scraper in the middle panel (the panel named "Value").
  3. In the left panel paste the following code:
1z.array(z.object({
2  advertiserName: z.string().optional(),
3  creativeId: z.string().optional(),
4  format: z.string().optional(),
5  variations: z.array(z.object({
6    body: z.string().optional(),
7    cta: z.string().optional(),
8    description: z.string().optional(),
9    headline: z.string().optional()
10  })).optional(),
11}))

After following these steps you will see the resulting JSON on the right side.

Let me know if this works for you!

DN

dantrials2

a month ago

Thanks that worked

DN

dantrials2

a month ago

*Sorry i made a mistake when I initially said it reduced the tokens count to 50% its reduced roughly 25%

Developer
Maintained by Community

Actor Metrics

  • 68 monthly users

  • 35 stars

  • >99% runs succeeded

  • 16 hours response time

  • Created in Oct 2023

  • Modified 16 days ago