
LinkedIn Ads Scraper
1 day trial then $25.00/month - No credit card required now

LinkedIn Ads Scraper
1 day trial then $25.00/month - No credit card required now
Extract ads of any format from LinkedIn Ad Library. Gain access to ad details, ad copy, media URL, call-to-action buttons and more. Dive deeper into the LinkedIn Ad Library for a competitive edge.
I'm only getting 2 results
I looked at the company ads they have 43 ads but I'm only getting 2 results. Is there a way to fix this? because I'm trying to run this using a code so I have to use the given API endpoint (Python) code
Gustavo Silva (silva95gustavo)
Hello @lonzchris,
Could you please let me know which URL you are using as input?
lonzchris
I saw the reason why I'm only getting 2 results is because I'm using the actor itself but I did had another issue tho so I saved the task and uses the API Client however the issue how can I change the startUrls if I want to scrape a different company because it always scrapes Palo Alto Network which is the default you put in. Am I able to configure the startUrls in the code it would be nice to be able to do that like have some inputs in the call function
1from apify_client import ApifyClient 2 3# Initialize the ApifyClient with your API token 4client = ApifyClient("<YOUR_API_TOKEN>") 5 6# Run the Actor task and wait for it to finish 7run = client.task("7MuIdym3B5x6duTQa").call() 8 9# Fetch and print Actor task results from the run's dataset (if there are any) 10for item in client.dataset(run["defaultDatasetId"]).iterate_items(): 11 print(item)
Gustavo Silva (silva95gustavo)
Currently the default example URL should refer to Niantic, Inc, as follows: https://adstransparency.google.com/advertiser/AR08888592736429539329?authuser=0®ion=ES&preset-date=Last+30+days
How exactly are you seeing Palo Alto Network? Perhaps you are already changing the URL somewhere else?
In your Python code example, you would provide the input parameters to the call()
method as arguments. See the documentation of call()
here: https://docs.apify.com/api/client/python/docs#passing-input-to-the-actor
lonzchris
okay maybe I configured it in the Apify console itself, but that doesn't fix the problem.
because here's what I tried so far. You can correct me if I'm wong...
There are 2 ways to call the Apify Client
- actor
- task
so when I use the client.actor() tho I can configure the startUrls in the python code, but I keep getting only 2 outputs.
then I changed it to client.task() however I can scraped the total ads of the company however I cannot configured the startUrls in the python code.
Gustavo Silva (silva95gustavo)
Perhaps the best way to troubleshoot your issue is for us to schedule a meeting, then I can check your specific problem and suggest a solution to your use case.
Please check the meeting link I shared with you externally.
Actor Metrics
143 monthly users
-
20 bookmarks
>99% runs succeeded
1 days response time
Created in Oct 2023
Modified 10 days ago