1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "any_field_value": "",
12 "any_field_operator": "contains",
13 "title_value": "Learn Python",
14 "title_operator": "contains",
15 "creator_value": "",
16 "creator_operator": "contains",
17 "description_value": "",
18 "description_operator": "contains",
19 "collection_value": "",
20 "collection_operator": "contains",
21 "mediatype_value": "",
22 "mediatype_operator": "is",
23 "custom_field_1_name": "",
24 "custom_field_1_value": "",
25 "custom_field_1_operator": "contains",
26 "custom_field_2_name": "",
27 "custom_field_2_value": "",
28 "custom_field_2_operator": "contains",
29 "custom_field_3_name": "",
30 "custom_field_3_value": "",
31 "custom_field_3_operator": "contains",
32 "custom_field_4_name": "",
33 "custom_field_4_value": "",
34 "custom_field_4_operator": "contains",
35 "custom_field_5_name": "",
36 "custom_field_5_value": "",
37 "custom_field_5_operator": "contains",
38 "date": "",
39 "date_range_start": "",
40 "date_range_end": "",
41 "hits_per_page": 10,
42 "page": 1,
43 "sort_name": "publicdate",
44 "sort_value": "desc"
45};
46
47
48const run = await client.actor("maged120/archive-org-advanced-search-ppr").call(input);
49
50
51console.log('Results from dataset');
52console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
53const { items } = await client.dataset(run.defaultDatasetId).listItems();
54items.forEach((item) => {
55 console.dir(item);
56});
57
58