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 "searchQuery": "bitcoin",
13 "category": "news",
14 "categories": [],
15 "tagSlugs": [],
16 "coinSlugs": [],
17 "authorSlugs": [],
18 "articleIds": [
19 "375656"
20 ],
21 "locale": "en",
22 "sortBy": "newest",
23 "includeContent": true,
24 "onlyNew": false,
25 "maxItems": 1,
26 "proxyConfiguration": {
27 "useApifyProxy": false
28 }
29};
30
31
32const run = await client.actor("dataspryva/decrypt-crypto-news-finder-by-category-and-keyword").call(input);
33
34
35console.log('Results from dataset');
36console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
37const { items } = await client.dataset(run.defaultDatasetId).listItems();
38items.forEach((item) => {
39 console.dir(item);
40});
41
42