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 "includeArtistProfiles": false,
30 "maxItems": 20,
31 "proxy": {
32 "useApifyProxy": true
33 },
34 "incrementalMode": false,
35 "emitUnchanged": false,
36 "emitExpired": false,
37 "ignoreFieldsForChanges": []
38};
39
40
41const run = await client.actor("abotapi/anghami-catalog-scraper").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