1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "queries": [
12 "Dune Frank Herbert"
13 ],
14 "isbns": [
15 "9780441172719"
16 ],
17 "authors": [],
18 "manualBooks": [
19 {
20 "title": "Dune",
21 "authors": [
22 "Frank Herbert"
23 ],
24 "isbn13": "9780441172719",
25 "publisher": "Ace",
26 "publishedDate": "1965",
27 "rating": 4.3,
28 "ratingsCount": 1200000,
29 "sourceUrl": "https://openlibrary.org/works/OL893415W/Dune"
30 }
31 ],
32 "language": "en",
33 "country": "US"
34};
35
36
37const run = await client.actor("runtime/book-market-intelligence").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