1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "source_url": "local-fixture://contracts-finder-ocds",
12 "keywords": [
13 "cleaning"
14 ],
15 "max_results": 10,
16 "releases": [
17 {
18 "ocid": "ocds-demo/clean-001",
19 "id": "release-clean-001",
20 "tag": [
21 "tender"
22 ],
23 "parties": [
24 {
25 "name": "Example Borough Council",
26 "roles": [
27 "buyer"
28 ]
29 }
30 ],
31 "tender": {
32 "title": "Deep cleaning services for civic buildings",
33 "description": "The council seeks suitably qualified cleaning suppliers for a three-year service.",
34 "status": "active",
35 "tenderPeriod": {
36 "endDate": "2026-12-01T12:00:00Z"
37 },
38 "value": {
39 "amount": 120000,
40 "currency": "GBP"
41 },
42 "items": [
43 {
44 "classification": {
45 "id": "90910000",
46 "description": "Cleaning services"
47 },
48 "deliveryAddresses": [
49 {
50 "locality": "Exampletown",
51 "countryName": "United Kingdom"
52 }
53 ]
54 }
55 ],
56 "documents": [
57 {
58 "title": "Tender notice",
59 "url": "https://example.gov.uk/notice/clean-001"
60 }
61 ],
62 "submissionMethod": [
63 "electronicSubmission"
64 ]
65 }
66 }
67 ]
68};
69
70
71const run = await client.actor("sentry_zero/public-procurement-evidence-packet").call(input);
72
73
74console.log('Results from dataset');
75console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
76const { items } = await client.dataset(run.defaultDatasetId).listItems();
77items.forEach((item) => {
78 console.dir(item);
79});
80
81