1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "datasets": [
12 "usnews_grad_rankings",
13 "scorecard",
14 "ipeds"
15 ],
16 "gradCategories": [
17 "top-law-schools",
18 "top-medical-schools",
19 "top-business-schools",
20 "top-engineering-schools",
21 "top-nursing-schools",
22 "top-education-schools",
23 "top-computer-science-schools",
24 "top-public-affairs-schools",
25 "top-health-schools"
26 ],
27 "ipedsTables": [
28 "directory",
29 "tuition",
30 "graduation",
31 "salaries",
32 "enrollment"
33 ],
34 "outputMode": "joined",
35 "maxResults": "20",
36 "stateFilter": "",
37 "typeFilter": "",
38 "scorecardApiKey": ""
39};
40
41
42const run = await client.actor("commanding_hotdog/us-higher-ed-intelligence").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