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 "entityType": "beer",
13 "queries": [
14 "hazy ipa"
15 ],
16 "breweries": [
17 "Dogfish Head Craft Brewery"
18 ],
19 "urls": [
20 "https://untappd.com/b/blue-moon-brewing-company-belgian-white/3839",
21 "https://untappd.com/beer/3839",
22 "https://untappd.com/b/blue-moon-brewing-company-belgian-white/3839?ref=share",
23 "https://untappd.com/b/blue-moon-brewing-company-belgian-white/3839/photos",
24 "https://untappd.com/DogfishBeer",
25 "https://untappd.com/DogfishBeer/beer",
26 "https://untappd.com/brewery/1",
27 "https://untappd.com/w/dogfish-head-craft-brewery/1",
28 "https://untappd.com/v/bowditch-field/932830",
29 "https://untappd.com/beer/top_rated",
30 "https://untappd.com/beer/top_rated?type=belgian-quad",
31 "https://untappd.com/beer/top_rated?country=belgium",
32 "https://untappd.com/beer/top_rated?type=belgian-quad&country=belgium",
33 "https://untappd.com/search?q=hazy+ipa&type=beer"
34 ],
35 "proxy": {
36 "useApifyProxy": true
37 },
38 "incrementalMode": false,
39 "emitUnchanged": false,
40 "emitExpired": false
41};
42
43
44const run = await client.actor("abotapi/untappd-scraper").call(input);
45
46
47console.log('Results from dataset');
48console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
49const { items } = await client.dataset(run.defaultDatasetId).listItems();
50items.forEach((item) => {
51 console.dir(item);
52});
53
54