1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "seeds": [
12 "coffee grinder"
13 ],
14 "engines": [
15 "google",
16 "bing"
17 ],
18 "country": "US",
19 "language": "en",
20 "expansions": [
21 "alphabet",
22 "questions"
23 ],
24 "depth": 1,
25 "recursionTopN": 10,
26 "maxIdeasPerSeed": 500,
27 "includeTrend": false,
28 "trendTopN": 20,
29 "trendGeo": "",
30 "maxConcurrency": 4,
31 "maxQueriesPerSeed": 0
32};
33
34
35const run = await client.actor("khalilbenali/keyword-ideas-autocomplete").call(input);
36
37
38console.log('Results from dataset');
39console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
40const { items } = await client.dataset(run.defaultDatasetId).listItems();
41items.forEach((item) => {
42 console.dir(item);
43});
44
45