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 "searchQueries": [
13 "nirvana nevermind"
14 ],
15 "searchType": "release",
16 "sortBy": "relevance",
17 "sortOrder": "desc",
18 "startUrls": [
19 "https://www.discogs.com/release/249504"
20 ],
21 "maxItems": 20,
22 "fetchDetails": false,
23 "priceStats": false,
24 "maxPriceVersions": 5,
25 "currency": "USD",
26 "incrementalMode": false,
27 "emitUnchanged": false,
28 "emitExpired": false,
29 "maxNotifyListings": 50,
30 "proxyConfiguration": {
31 "useApifyProxy": true
32 }
33};
34
35
36const run = await client.actor("abotapi/discogs-scraper").call(input);
37
38
39console.log('Results from dataset');
40console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
41const { items } = await client.dataset(run.defaultDatasetId).listItems();
42items.forEach((item) => {
43 console.dir(item);
44});
45
46