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 "queries": [
13 "daft punk"
14 ],
15 "searchType": "track",
16 "source": "search",
17 "chartGenreId": 0,
18 "urls": [
19 {
20 "url": "https://www.deezer.com/track/3135556"
21 },
22 {
23 "url": "https://www.deezer.com/en/album/302127"
24 },
25 {
26 "url": "https://www.deezer.com/en/artist/27"
27 },
28 {
29 "url": "https://www.deezer.com/en/playlist/3155776842"
30 },
31 {
32 "url": "https://www.deezer.com/en/channels/charts"
33 },
34 {
35 "url": "https://www.deezer.com/en/channels/rap"
36 },
37 {
38 "url": "https://www.deezer.com/en/search/daft%20punk"
39 },
40 {
41 "url": "https://www.deezer.com/mixes/genre/30771"
42 },
43 {
44 "url": "https://api.deezer.com/track/3135556"
45 },
46 {
47 "url": "https://api.deezer.com/chart/0/tracks"
48 },
49 {
50 "url": "https://api.deezer.com/genre/116"
51 },
52 {
53 "url": "https://api.deezer.com/radio/30771"
54 },
55 {
56 "url": "https://api.deezer.com/user/5"
57 },
58 {
59 "url": "https://api.deezer.com/search?q=daft%20punk"
60 },
61 {
62 "url": "https://api.deezer.com/artist/27/albums?index=25"
63 },
64 {
65 "url": "https://api.deezer.com/playlist/3155776842"
66 }
67 ],
68 "sortBy": "relevance",
69 "proxy": {
70 "useApifyProxy": true
71 },
72 "incrementalMode": false,
73 "emitUnchanged": false,
74 "emitExpired": false,
75 "ignoreFieldsForChanges": [],
76 "mcpConnectors": []
77};
78
79
80const run = await client.actor("abotapi/deezer-com-scraper").call(input);
81
82
83console.log('Results from dataset');
84console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
85const { items } = await client.dataset(run.defaultDatasetId).listItems();
86items.forEach((item) => {
87 console.dir(item);
88});
89
90