1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "enableRecentlyFunded": true,
12 "maxRecentlyFunded": 10,
13 "maxStartupNews": 10,
14 "keywords": [
15 "artificial intelligence"
16 ],
17 "maxSearch": 10,
18 "investors": [],
19 "maxBackedBy": 10,
20 "companies": [],
21 "maxCompanyResearch": 10,
22 "enableLeadDetails": true,
23 "maxAgeDays": 30,
24 "region": "US",
25 "proxyConfiguration": {
26 "useApifyProxy": true,
27 "apifyProxyGroups": [
28 "RESIDENTIAL"
29 ],
30 "apifyProxyCountry": "US"
31 }
32};
33
34
35const run = await client.actor("b2b_leads/techcrunch-real-time-data-scraper-1").call(input);
36
37
38console.log('Results from dataset');
39console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
40const { items } = await client.dataset(run.defaultDatasetId).listItems();
41items.forEach((item) => {
42 console.dir(item);
43});
44
45