1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "keywords": [
12 "wireless earbuds"
13 ],
14 "marketplace": "US",
15 "marketplaces": [],
16 "departments": [
17 "aps"
18 ],
19 "expandAlphabet": false,
20 "expandPrefixAlphabet": false,
21 "expandNumbers": false,
22 "expandQuestions": false,
23 "expandComparisons": false,
24 "expandPrepositions": false,
25 "expandBuyerModifiers": false,
26 "customSuffixes": [],
27 "maxDepth": 0,
28 "queryMode": "enhanced",
29 "includeWidgets": false,
30 "includeSeed": false,
31 "dedupe": true,
32 "resultOrder": "source",
33 "mustContainSeed": false,
34 "includeTerms": [],
35 "excludeTerms": [],
36 "onlyQuestions": false,
37 "onlyLongTail": false,
38 "minWordCount": 0,
39 "maxSuggestions": 3,
40 "maxSuggestionsPerKeyword": 0,
41 "maxQueries": 3,
42 "maxConcurrency": 1,
43 "requestDelayMs": 0
44};
45
46
47const run = await client.actor("vexaloom-labs/amazon-autocomplete-keyword-expander").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