1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "stacRoot": "https://earth-search.aws.element84.com/v1",
12 "collections": [
13 "sentinel-2-l2a"
14 ],
15 "bbox": [
16 -122.6,
17 37.6,
18 -122.2,
19 37.9
20 ],
21 "datetime": "2024-06-01T00:00:00Z/2024-06-30T23:59:59Z",
22 "limit": 100,
23 "maxResults": 25
24};
25
26
27const run = await client.actor("datamule/stac-catalog-extractor").call(input);
28
29
30console.log('Results from dataset');
31console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
32const { items } = await client.dataset(run.defaultDatasetId).listItems();
33items.forEach((item) => {
34 console.dir(item);
35});
36
37