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 "queries": [
13 "leche"
14 ],
15 "categories": [
16 "https://www.carrefour.es/supermercado/lacteos-huevos/leche/cat20093/c",
17 "Vinos"
18 ],
19 "urls": [
20 "https://www.carrefour.es/supermercado/R-521007071/p",
21 "836507271",
22 "https://www.carrefour.es/glorioso-blanco-2025-vino-blanco-espana-rioja-doca-75-cl-120/8410351213004/p",
23 "https://www.carrefour.es/extractor-portatil-de-leche-kikkaboo/VC4A-27082334/p",
24 "https://www.carrefour.es/supermercado/lacteos-huevos/leche/cat20093/c",
25 "https://www.carrefour.es/supermercado/bebidas-promocion/F-1086Z13rjo/c",
26 "https://www.carrefour.es/?q=leche",
27 "https://www.carrefour.es/#!q=cerveza"
28 ],
29 "products": [
30 "https://www.carrefour.es/supermercado/leche-semidesnatada-la-cantara-brik-1-l/R-VC4AECOMM-700248/p"
31 ],
32 "maxReviews": 20,
33 "proxy": {
34 "useApifyProxy": true,
35 "apifyProxyGroups": [
36 "RESIDENTIAL"
37 ],
38 "apifyProxyCountry": "ES"
39 },
40 "incrementalMode": false,
41 "emitUnchanged": false,
42 "emitExpired": false,
43 "ignoreFieldsForChanges": []
44};
45
46
47const run = await client.actor("abotapi/carrefour-es-scraper").call(input);
48
49
50console.log('Results from dataset');
51console.log(`πΎ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
52const { items } = await client.dataset(run.defaultDatasetId).listItems();
53items.forEach((item) => {
54 console.dir(item);
55});
56
57