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 "searchTerms": [
13 "Sherine"
14 ],
15 "urls": [
16 "https://play.anghami.com/artist/422",
17 "https://play.anghami.com/artist/422?page=2",
18 "https://play.anghami.com/song/108861",
19 "https://play.anghami.com/album/1",
20 "https://play.anghami.com/playlist/just-sherine-abdel-wahab-2050981",
21 "https://play.anghami.com/tag/1",
22 "https://play.anghami.com/search/Sherine"
23 ],
24 "kinds": [],
25 "excludePodcasts": false,
26 "excludeAudiobooks": false,
27 "explicitOnly": false,
28 "fetchDetails": false,
29 "maxItems": 20,
30 "proxy": {
31 "useApifyProxy": true
32 },
33 "incrementalMode": false,
34 "emitUnchanged": false,
35 "emitExpired": false,
36 "ignoreFieldsForChanges": []
37};
38
39
40const run = await client.actor("abotapi/anghami-catalog-scraper").call(input);
41
42
43console.log('Results from dataset');
44console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
45const { items } = await client.dataset(run.defaultDatasetId).listItems();
46items.forEach((item) => {
47 console.dir(item);
48});
49
50