1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "recordIds": [
12 "10016307"
13 ],
14 "searches": [
15 {
16 "siteName": "Keystone",
17 "nameMatch": "contains",
18 "state": "Colorado",
19 "country": "United States",
20 "commodity": "Gold"
21 }
22 ],
23 "boundingBoxes": [
24 {
25 "west": -107.06,
26 "south": 38.87,
27 "east": -107.03,
28 "north": 38.89,
29 "commodity": "Lead"
30 }
31 ]
32};
33
34
35const run = await client.actor("automation-lab/usgs-mrds-mineral-resource-records").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