1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "targets": [
12 {
13 "id": "123456789",
14 "title": "Example Product",
15 "price": 100,
16 "url": "https://es.wallapop.com/item/example"
17 }
18 ],
19 "netscapeCookies": `# Netscape HTTP Cookie File
20 # Paste your exported cookies here from Cookie Editor extension
21 # Example:
22 # .wallapop.com TRUE / FALSE 1798893836 device_id your-device-id`,
23 "credentials": {
24 "email": "your@email.com",
25 "password": "yourpassword"
26 }
27};
28
29
30const run = await client.actor("autoclient/wallapop-autosend").call(input);
31
32
33console.log('Results from dataset');
34console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
35const { items } = await client.dataset(run.defaultDatasetId).listItems();
36items.forEach((item) => {
37 console.dir(item);
38});
39
40