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 "mediaType": "anime",
13 "searchTerms": [
14 "Frieren"
15 ],
16 "chartKind": "top",
17 "urls": [
18 "https://myanimelist.net/anime/5114/Fullmetal_Alchemist__Brotherhood"
19 ],
20 "fetchDetails": true,
21 "maxReviews": 3,
22 "maxItems": 20,
23 "maxPages": 0,
24 "incrementalMode": false,
25 "emitUnchanged": false,
26 "emitExpired": false,
27 "proxy": {
28 "useApifyProxy": true
29 },
30 "maxNotifyListings": 50
31};
32
33
34const run = await client.actor("abotapi/myanimelist-scraper").call(input);
35
36
37console.log('Results from dataset');
38console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
39const { items } = await client.dataset(run.defaultDatasetId).listItems();
40items.forEach((item) => {
41 console.dir(item);
42});
43
44