1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "offerUrls": [
12 "https://detail.1688.com/offer/1046010624334.html"
13 ],
14 "maxItems": 100,
15 "maxResults": 60,
16 "mode": "full",
17 "includeDescriptionHtml": false,
18 "reviews": true,
19 "translate": false,
20 "translateTo": "en",
21 "trackHistory": false,
22 "skipProcessed": false,
23 "excludeAds": true,
24 "maxTotalChargeUsd": 1,
25 "requestDelaySecs": 1,
26 "proxyConfiguration": {
27 "useApifyProxy": true,
28 "apifyProxyGroups": [
29 "RESIDENTIAL"
30 ],
31 "apifyProxyCountry": "CN"
32 },
33 "runBudgetSecs": 205
34};
35
36
37const run = await client.actor("ai-lead-gen-tools/1688-product-detail-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