1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "jurisdiction": "CA_CPRA",
12 "requestDate": "2026-03-02",
13 "responseDate": "2026-03-20",
14 "extensionNotices": [
15 {
16 "noticeDate": "2026-03-10",
17 "expectedDate": "2026-03-24",
18 "reason": "VOLUMINOUS_RECORDS",
19 "noticeSource": "Portal message of 2026-03-10"
20 }
21 ],
22 "documents": [
23 {
24 "name": "response-letter.txt",
25 "text": "Dated March 20, 2026. Records are released in part. Portions marked [REDACTED] are withheld. See attached Exhibit B for the log.\nPersonnel email on 2025-11-03 follows."
26 },
27 {
28 "name": "release-2.txt",
29 "text": "Email dated 2026-01-15. The manager wrote that Maria Alvarez approved the overtime budget request on Friday afternoon."
30 },
31 {
32 "name": "release-1.txt",
33 "text": "Email dated 2026-01-15. The manager wrote that [REDACTED] approved the overtime budget request on Friday afternoon. Withheld per Gov. Code 7922.000."
34 }
35 ],
36 "agencyName": "City of Example Public Works Department",
37 "requestReference": "PRA-2026-0142"
38};
39
40
41const run = await client.actor("davidcondrey/wl-audit-public-record").call(input);
42
43
44console.log('Results from dataset');
45console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
46const { items } = await client.dataset(run.defaultDatasetId).listItems();
47items.forEach((item) => {
48 console.dir(item);
49});
50
51