1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "mode": "search",
12 "postalCode": "75001",
13 "searchTerm": "lait",
14 "urls": [
15 "https://www.auchan.fr/lactel-lait-demi-ecreme-bio-uht/pr-C1177205",
16 "https://www.auchan.fr/recherche?text=lait",
17 "https://www.auchan.fr/recherche?text=lait&page=2",
18 "https://www.auchan.fr/recherche?text=lait&sort=asc_price_pos",
19 "https://www.auchan.fr/oeufs-produits-laitiers/cremerie-oeufs-laits/ca-n0101",
20 "https://www.auchan.fr/oeufs-produits-laitiers/cremerie-oeufs-laits/ca-n0101?page=2",
21 "https://www.auchan.fr/oeufs-produits-laitiers/ca-n01",
22 "https://auchan.fr/lactel-lait-demi-ecreme-bio-uht/pr-C1177205",
23 "https://www.auchan.fr/lactel-lait-demi-ecreme-bio-uht/pr-C1177205?x=1",
24 "https://www.auchan.fr/pr-C1177205",
25 "https://www.auchan.fr/jouets-jeux-video-loisirs/ca-101042021"
26 ],
27 "proxy": {
28 "useApifyProxy": true
29 },
30 "incrementalMode": false,
31 "emitUnchanged": false,
32 "emitExpired": false,
33 "ignoreFieldsForChanges": []
34};
35
36
37const run = await client.actor("abotapi/auchan-fr-scraper").call(input);
38
39
40console.log('Results from dataset');
41console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
42const { items } = await client.dataset(run.defaultDatasetId).listItems();
43items.forEach((item) => {
44 console.dir(item);
45});
46
47