1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "geojsonText": "{\"type\": \"FeatureCollection\", \"features\": [{\"type\": \"Feature\", \"properties\": {\"productionplace\": \"Plot 1\", \"Area\": \"2.5\"}, \"geometry\": {\"type\": \"Point\", \"coordinates\": [-5.547219, 7.539989]}}, {\"type\": \"Feature\", \"properties\": {\"ProductionPlace\": \"Plot 2\"}, \"geometry\": {\"type\": \"Polygon\", \"coordinates\": [[[-5.551, 7.541], [-5.548, 7.541], [-5.548, 7.538], [-5.551, 7.538]]]}}, {\"type\": \"Feature\", \"properties\": {\"ProductionPlace\": \"Plot 3\", \"Area\": 9}, \"geometry\": {\"type\": \"Point\", \"coordinates\": [7.531204, -5.560113]}}]}",
12 "producerCountry": "CI"
13};
14
15
16const run = await client.actor("nemata/eudr-geolocation-validator").call(input);
17
18
19console.log('Results from dataset');
20console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
21const { items } = await client.dataset(run.defaultDatasetId).listItems();
22items.forEach((item) => {
23 console.dir(item);
24});
25
26