1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "ids": [
12 "32515302"
13 ],
14 "myids": {
15 "input": [
16 {
17 "id": "https://www.discogs.com/label/1430979-Daft-Punk",
18 "process": "get",
19 "category": "label"
20 },
21 {
22 "id": "855971",
23 "process": "get",
24 "category": "artist"
25 },
26 {
27 "id": "855971",
28 "process": "get",
29 "category": "artistReleases"
30 },
31 {
32 "id": "daft punk",
33 "process": "search",
34 "category": "artist"
35 },
36 {
37 "id": "https://www.discogs.com/sell/release/32515302",
38 "process": "sell",
39 "category": "release"
40 },
41 {
42 "id": "00602508108556",
43 "process": "sell",
44 "category": "list"
45 }
46 ]
47 },
48 "mycookie": "",
49 "proxy": {
50 "useApifyProxy": true,
51 "apifyProxyGroups": [
52 "RESIDENTIAL"
53 ]
54 }
55};
56
57
58const run = await client.actor("canadesk/discogs").call(input);
59
60
61console.log('Results from dataset');
62console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
63const { items } = await client.dataset(run.defaultDatasetId).listItems();
64items.forEach((item) => {
65 console.dir(item);
66});
67
68