1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "urls",
12 "searchTerms": [
13 "drill"
14 ],
15 "urls": [
16 {
17 "url": "https://www.lowes.com/search?searchTerm=drill"
18 },
19 {
20 "url": "https://www.lowes.com/pd/CRAFTSMAN-20-volt-Max-1-2-in-Keyless-Brushless-Cordless-Drill-1-Batteries-Included-Soft-Bag-Included/5016412045"
21 }
22 ],
23 "proxyConfiguration": {
24 "useApifyProxy": true,
25 "apifyProxyGroups": [
26 "RESIDENTIAL"
27 ],
28 "apifyProxyCountry": "US"
29 },
30 "incrementalMode": false,
31 "emitUnchanged": false,
32 "emitExpired": false,
33 "compactUpdates": false,
34 "watchStockQuantity": false,
35 "ignoreFieldsForChanges": []
36};
37
38
39const run = await client.actor("abotapi/lowes-com-scraper").call(input);
40
41
42console.log('Results from dataset');
43console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
44const { items } = await client.dataset(run.defaultDatasetId).listItems();
45items.forEach((item) => {
46 console.dir(item);
47});
48
49