Linkedin Ads Library Scraper
Try for free
3 days trial then $18.00/month - No credit card required now
View all Actors
Linkedin Ads Library Scraper
saswave/linkedin-ads-library-scraper
Try for free
3 days trial then $18.00/month - No credit card required now
The linkedin ads library scraper tool allows you to extract data from https://www.linkedin.com/ad-library/search using multiple type of input. Get data like document transcript, total impressions, date ranges, CTA, advertiser and paying entity ...
The code examples below show how to run the Actor and get its results. To run the code, you need to have an Apify account. Replace <YOUR_API_TOKEN> in the code with your API token, which you can find under Settings > Integrations in Apify Console. Learn more
1import { ApifyClient } from 'apify-client';
2
3// Initialize the ApifyClient with your Apify API token
4const client = new ApifyClient({
5 token: '<YOUR_API_TOKEN>',
6});
7
8// Prepare Actor input
9const input = {
10 "proxyConfiguration": {
11 "useApifyProxy": true,
12 "apifyProxyGroups": []
13 },
14 "search_url": "https://www.linkedin.com/ad-library/search?accountOwner=les+echos&keyword=entreprise&countries=FR&dateOption=last-30-days",
15 "accountOwner": "",
16 "word_search": "",
17 "date_start": "",
18 "date_end": "",
19 "companies": [
20 "https://www.linkedin.com/company/les-echos"
21 ],
22 "company_word_search": "",
23 "company_date_start": "",
24 "company_date_end": ""
25};
26
27(async () => {
28 // Run the Actor and wait for it to finish
29 const run = await client.actor("saswave/linkedin-ads-library-scraper").call(input);
30
31 // Fetch and print Actor results from the run's dataset (if any)
32 console.log('Results from dataset');
33 console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
34 const { items } = await client.dataset(run.defaultDatasetId).listItems();
35 items.forEach((item) => {
36 console.dir(item);
37 });
38})();
39
40// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs
Developer
Maintained by Community
Actor metrics
- 15 monthly users
- 2 stars
- 86.8% runs succeeded
- Created in Jul 2024
- Modified about 1 month ago
Categories