1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "startUrls": [
12 {
13 "url": "https://www.sec.gov/edgar/search/#/q=drives&dateRange=all&locationCode=CA&entityName=DRIVES"
14 }
15 ],
16 "keywords": "",
17 "companyNames": [
18 "pizza"
19 ],
20 "states": [
21 "CA"
22 ],
23 "dateRange": "1y",
24 "filingTypes": [],
25 "filingCategory": "form-cat0",
26 "maxPagesPerSearch": 3,
27 "businessTypes": [
28 "LLC"
29 ],
30 "proxyConfiguration": {
31 "useApifyProxy": true,
32 "apifyProxyGroups": [
33 "RESIDENTIAL"
34 ],
35 "apifyProxyCountry": "US"
36 }
37};
38
39
40const run = await client.actor("scrapyspider/sec-gov-compony-data-scp").call(input);
41
42
43console.log('Results from dataset');
44console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
45const { items } = await client.dataset(run.defaultDatasetId).listItems();
46items.forEach((item) => {
47 console.dir(item);
48});
49
50