Google Ads Scraper avatar
Google Ads Scraper
Try for free

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

View all Actors
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.

TM

Return also input URL

Closed

tan_mat opened this issue
2 months ago

Return also, on each crawled item, the (input) ad library URL that generated it - as it contains important information

silva95gustavo avatar

Hi! I'm interested in learning more about how you are calling this actor:

  • Do you use the Apify Console (UI) or do you call it using Apify SDK/API?
  • Why do you need the input URL to be included as part of the actor output? Answering the questions above will help me understand your use case better. Thanks!
TO

tan_mat-owner

2 months ago

Hello,

Thank you for your reply.

I use your actor through API.

I crawl multiple (hundreds / thousands) URLs. On each URL I filter by domain name and country. To save money (and also not to hit Apify limits) I group those URLs, let’s say 30 by 30 (randomly).

Now, when the results come, I have difficulties knowing which item came from which URL (so from which domain and country code).

Does this help? :)

silva95gustavo avatar

Do you use this endpoint or a different one? https://api.apify.com/v2/acts/silva95gustavo~google-ads-scraper/run-sync-get-dataset-items?token=<YOUR_API_TOKEN>

TO

tan_mat-owner

2 months ago

I use this endpoint: datasets/#{dataset_id}/items

https://docs.apify.com/api/v2#/reference/datasets/dataset/get-dataset API reference | Apify Documentation docs.apify.com

silva95gustavo avatar

Got it, you use that endpoint to fetch the results. But how do you actually tell Apify to run the actor? Perhaps with a POST to https://api.apify.com/v2/acts/silva95gustavo~google-ads-scraper/runs?

TO

tan_mat-owner

2 months ago

Yap.

call(method: :post, path: "acts/#{actor_id}/runs", params: params, json: json)

silva95gustavo avatar

Ok, when you submit a new run via https://api.apify.com/v2/acts/silva95gustavo~google-ads-scraper/runs this endpoint will return a few helpful fields about your new run, including the run id, an actorTaskId and many other fields. With this information you can store the ID of your run in a local variable and then use that ID to query for the correct data once the job is complete. This way you can keep track of which input data generated each output item.

TO

tan_mat-owner

2 months ago

OK. I did not explain it correctly. I’m already doing this.

Let’s say I do one and only one run, with 100 URLs (so 100 domains, from multiple countries). Now, from those 100 URLs, I may get thousands of results (of items in the dataset). I don’t know which result came from which of those 100 URLs.

Is it more clear?

silva95gustavo avatar

I think I understand it. You are calling the actor with a list of search queries by domain, you are not actually passing a list of advertiser or creative IDs, is that right? And that is why you are unable to map each individual input search domain to a given output item?

TO

tan_mat-owner

2 months ago

Exactly :)

TM

tan_mat

2 months ago

Hello Gustavo, any update here, please? :) I really need this feature - to push the usage of the actor even higher. Thanks!

silva95gustavo avatar

Hi tan_mat, you can expect this to be addressed next week.

TM

tan_mat

2 months ago

Great, thanks! :) Please let me know if you need me to do anything.

TM

tan_mat

a month ago

Hey Gustavo, any update here? Sorry for insisting, but I am using daily your great scrapper - and I would be able to use it even more if I would have this :) Thanks!

silva95gustavo avatar

Sorry for the delay. I prioritize tackling bugs in existing functionality, so new feature requests can sometimes take a bit longer to address.

You will now find a new 'startUrl' field in the output. Please let me know if it works for you!

TO

tan_mat-owner

a month ago

No problem, thank you very much! Works perfectly! :)

Developer
Maintained by Community
Actor metrics
  • 76 monthly users
  • 6 stars
  • 100.0% runs succeeded
  • 14 hours response time
  • Created in Oct 2023
  • Modified 15 days ago