1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "locations": [
12 "Los Angeles, CA",
13 "New York, NY",
14 "Miami, FL",
15 "San Francisco, CA",
16 "Chicago, IL",
17 "Las Vegas, NV",
18 "Houston, TX",
19 "Phoenix, AZ",
20 "Seattle, WA",
21 "Denver, CO",
22 "Atlanta, GA",
23 "Orlando, FL",
24 "San Diego, CA",
25 "Dallas, TX",
26 "Boston, MA"
27 ],
28 "maxResults": 50,
29 "proxyConfiguration": {
30 "useApifyProxy": true,
31 "apifyProxyGroups": [
32 "RESIDENTIAL"
33 ],
34 "apifyProxyCountry": "US"
35 }
36};
37
38
39const run = await client.actor("thirdwatch/turo-scraper").call(input);
40
41
42console.log('Results from dataset');
43console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
44const { items } = await client.dataset(run.defaultDatasetId).listItems();
45items.forEach((item) => {
46 console.dir(item);
47});
48
49