1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "items": [
12 {
13 "doi": "10.1038/nature14539",
14 "title": "Deep learning",
15 "authors": [
16 "LeCun",
17 "Bengio",
18 "Hinton"
19 ],
20 "year": 2015
21 },
22 {
23 "doi": "10.1038/s41586-024-99999-1",
24 "title": "Scaling laws for quantum cognition"
25 },
26 {
27 "url": "https://arxiv.org/abs/1706.03762",
28 "quote": "The dominant sequence transduction models are based on complex recurrent or convolutional neural networks"
29 },
30 {
31 "url": "https://en.wikipedia.org/wiki/Neural_Lattice_Dynamics_Theory"
32 },
33 "Vaswani et al. 2017. Attention is all you need."
34 ]
35};
36
37
38const run = await client.actor("shafnir/source-guard").call(input);
39
40
41console.log('Results from dataset');
42console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
43const { items } = await client.dataset(run.defaultDatasetId).listItems();
44items.forEach((item) => {
45 console.dir(item);
46});
47
48