1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "isbns": [
12 "9780143127741",
13 "978-0-06-112008-4",
14 "0451524934"
15 ],
16 "includeGoogleBooks": true,
17 "skipNotFound": false,
18 "outputFields": [
19 "isbn13",
20 "isbn10",
21 "title",
22 "authors",
23 "publisher",
24 "publishDate",
25 "pageCount",
26 "subjects",
27 "description",
28 "language",
29 "coverImageUrl",
30 "googleBooksUrl",
31 "openLibraryUrl",
32 "googleRating",
33 "googleRatingsCount",
34 "inputIsbn",
35 "source",
36 "error"
37 ]
38};
39
40
41const run = await client.actor("automation-lab/isbn-lookup").call(input);
42
43
44console.log('Results from dataset');
45console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
46const { items } = await client.dataset(run.defaultDatasetId).listItems();
47items.forEach((item) => {
48 console.dir(item);
49});
50
51