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.

User avatar

Return also input URL

Closed

tan_mat opened this issue
a month ago

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

User 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!
User avatar

tan_mat-owner

a month 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? :)

User 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>

User avatar

tan_mat-owner

a month 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

User 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?

User avatar

tan_mat-owner

a month ago

Yap.

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

User 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.

User avatar

tan_mat-owner

a month 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?

User 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?

User avatar

tan_mat-owner

a month ago

Exactly :)

User avatar

tan_mat

17 days ago

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

User avatar

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

User avatar

tan_mat

13 days ago

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

User avatar

tan_mat

10 days 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!

User 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!

User avatar

tan_mat-owner

7 days ago

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

Developer
Maintained by Community
Actor metrics
  • 55 monthly users
  • 4 stars
  • 99.6% runs succeeded
  • 14 hours response time
  • Created in Oct 2023
  • Modified 10 days ago