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 "query": "concerts",
13 "market": "us",
14 "urls": [
15 "https://www.ticketmaster.com/search?q=concerts",
16 "https://www.ticketmaster.com/search?q=concerts&page=2",
17 "https://www.ticketmaster.com/search?q=concerts&sort=date",
18 "https://www.ticketmaster.com/hertz-arena-tickets-estero/venue/107143",
19 "https://www.ticketmaster.com/barry-manilow-tickets/artist/735585",
20 "https://www.ticketmaster.co.uk/search?q=coldplay",
21 "https://www.ticketmaster.com.au/search?q=concerts",
22 "https://www.ticketmaster.ca/search?q=hockey"
23 ],
24 "maxItems": 20,
25 "maxPages": 0,
26 "proxyConfiguration": {
27 "useApifyProxy": true,
28 "apifyProxyGroups": [
29 "RESIDENTIAL"
30 ]
31 },
32 "incrementalMode": false,
33 "emitUnchanged": false,
34 "emitExpired": false,
35 "compactUpdates": false,
36 "expireAfterMissedScans": 1,
37 "ignoreFieldsForChanges": [],
38 "maxNotifyListings": 50
39};
40
41
42const run = await client.actor("abotapi/ticketmaster-event-discovery").call(input);
43
44
45console.log('Results from dataset');
46console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
47const { items } = await client.dataset(run.defaultDatasetId).listItems();
48items.forEach((item) => {
49 console.dir(item);
50});
51
52