# Evidence Pack Builder (`flintglade/evidence-pack-builder`) Actor

Build portable, deterministic, checksum-verified ZIP evidence packages from selected Apify datasets, KVS records, or inline JSON. Includes provenance, redaction logs, manifests, and round-trip verification. $1.00 per verified package.

- **URL**: https://apify.com/flintglade/evidence-pack-builder.md
- **Developed by:** [Flintglade](https://apify.com/flintglade) (community)
- **Categories:** Developer tools, Automation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1,000.00 / 1,000 evidence packages

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Evidence Pack Builder

Build a portable, deterministic, checksum-verified ZIP from selected Apify datasets, selected key-value-store records, or bounded inline JSON.

### What this does not do

- No source collection.
- No alteration or silent repair of input evidence.
- No signing claim unless a real configured signing key is used. Version 0.1 does not sign.
- No legal or compliance certification.
- No cloud storage outside Apify.
- No executable files inside the package.

### Sources and authorization

Select up to 10 Apify datasets and 10 key-value stores through Apify's resource picker. For every selected store, provide exact `recordKeys`. The Actor uses only the run's limited, user-granted storage permissions; it accepts no Apify token and makes no remote URL requests. Up to 100 inline JSON objects are supported for demos and automated health checks.

### Input example

```json
{"inlineItems":[{"id":"demo-1","claim":"Example evidence row","source":"Flintglade fixture"}],"archiveFormat":"zip","includeSourceSchemas":true,"deterministic":true,"maxRows":100}
````

Optional `redactionRules` are non-root RFC 6901 JSON Pointers. Applied and missing pointers are recorded; the original value is represented only by its SHA-256 hash.

### Outputs

The run KVS receives `EVIDENCE_PACK.zip`, `MANIFEST.json`, `VERIFICATION.json`, and `RUN.json`. The ZIP contains canonical UTF-8/LF JSON Lines, a readable README, provenance, redaction log, source schema, empty-or-populated error log, and an internal manifest. Every path and checksum is re-read and verified before delivery.

The default dataset receives one result row and one uncharged run summary. A successful result includes the package SHA-256, row/resource/byte counts, verification status, and artifact keys.

### Pricing

`evidence-package` costs **$1.00 per verified package**. The event is charged exactly once and only after archive path safety, round-trip extraction, manifest equality, and every entry checksum succeeds. Invalid, oversized, inaccessible, partial, corrupt, serialization-failed, verification-failed, or charge-cap-refused requests are not charged. Platform usage is additional.

### State and repeated runs

The Actor is stateless. Identical normalized input produces an identical package hash within the pinned runtime. A new run is a new requested package and may charge once after verification.

### Failure behavior

No selected item is silently dropped. If any selected source cannot be read or serialized, the package is rejected and uncharged. Empty selected sources return an uncharged terminal result. The result and run summary explain the stable status and error code.

### Limits

Default limits are 50,000 rows, 250 MB uncompressed input, and 100 MB ZIP output; hard limits are 100,000 rows and 500 MB uncompressed input. Launch memory is 512-4096 MB (2048 MB default) with an 1800-second timeout.

### Source rights and attribution

Users remain responsible for authorization to read and package selected evidence. The Actor records hashed source provenance but makes no ownership, license, legal, or compliance conclusion. See `SOURCE_POLICY.md`.

### Limitations

Version 0.1 supports ZIP only. Byte-identical compression is guaranteed within the pinned Python 3.12 container runtime, not across arbitrary future Python or zlib builds. KVS binary values are preserved as base64 JSON and never executed or recursively unpacked.

### Privacy and deletion

Source storage identifiers and record keys are hashed in outputs. Selected evidence is read only for the run and written to that run's Apify storage. No data is sent outside Apify. Delete the run's dataset and KVS to remove outputs. See `PRIVACY.md` and `SOURCE_POLICY.md`.

Support: support@flintglade.com

# Actor input Schema

## `inputSchemaVersion` (type: `integer`):

Versioned runtime input contract.

## `datasetIds` (type: `array`):

Up to 10 user-authorized Apify datasets.

## `keyValueStoreIds` (type: `array`):

Up to 10 user-authorized Apify key-value stores.

## `recordKeys` (type: `object`):

Map each selected key-value store ID to 1-100 exact record keys. Runtime validation enforces the key and list bounds.

## `inlineItems` (type: `array`):

Up to 100 small JSON objects for demos and automation.

## `includeSourceSchemas` (type: `boolean`):

Include a record schema inside the package.

## `archiveFormat` (type: `string`):

Version 0.1 supports deterministic ZIP only.

## `redactionRules` (type: `array`):

Explicit non-root RFC 6901 JSON Pointers removed from JSON object records and logged in the manifest.

## `maxRows` (type: `integer`):

Stop without charging if selected records exceed this bound.

## `maxUncompressedBytes` (type: `integer`):

Stop without charging if canonical source bytes exceed this bound.

## `maxArchiveBytes` (type: `integer`):

Stop without charging if the generated ZIP exceeds this bound.

## `deterministic` (type: `boolean`):

Required in version 0.1; runtime validation rejects false. Identical normalized input produces identical bytes.

## Actor input object example

```json
{
  "inputSchemaVersion": 1,
  "inlineItems": [
    {
      "id": "demo-1",
      "claim": "Example evidence row",
      "source": "Flintglade fixture"
    }
  ],
  "includeSourceSchemas": true,
  "archiveFormat": "zip",
  "maxRows": 50000,
  "maxUncompressedBytes": 250000000,
  "maxArchiveBytes": 100000000,
  "deterministic": true
}
```

# Actor output Schema

## `defaultDataset` (type: `string`):

No description

## `evidencePack` (type: `string`):

No description

## `manifest` (type: `string`):

No description

## `verification` (type: `string`):

No description

## `run` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "inlineItems": [
        {
            "id": "demo-1",
            "claim": "Example evidence row",
            "source": "Flintglade fixture"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("flintglade/evidence-pack-builder").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "inlineItems": [{
            "id": "demo-1",
            "claim": "Example evidence row",
            "source": "Flintglade fixture",
        }] }

# Run the Actor and wait for it to finish
run = client.actor("flintglade/evidence-pack-builder").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "inlineItems": [
    {
      "id": "demo-1",
      "claim": "Example evidence row",
      "source": "Flintglade fixture"
    }
  ]
}' |
apify call flintglade/evidence-pack-builder --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=flintglade/evidence-pack-builder",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Evidence Pack Builder",
        "description": "Build portable, deterministic, checksum-verified ZIP evidence packages from selected Apify datasets, KVS records, or inline JSON. Includes provenance, redaction logs, manifests, and round-trip verification. $1.00 per verified package.",
        "version": "0.1",
        "x-build-id": "5dIZVdO36wlLAtneC"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/flintglade~evidence-pack-builder/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-flintglade-evidence-pack-builder",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/flintglade~evidence-pack-builder/runs": {
            "post": {
                "operationId": "runs-sync-flintglade-evidence-pack-builder",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/flintglade~evidence-pack-builder/run-sync": {
            "post": {
                "operationId": "run-sync-flintglade-evidence-pack-builder",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "inputSchemaVersion": {
                        "title": "Input schema version",
                        "minimum": 1,
                        "maximum": 1,
                        "type": "integer",
                        "description": "Versioned runtime input contract.",
                        "default": 1
                    },
                    "datasetIds": {
                        "title": "Datasets",
                        "maxItems": 10,
                        "type": "array",
                        "description": "Up to 10 user-authorized Apify datasets."
                    },
                    "keyValueStoreIds": {
                        "title": "Key-value stores",
                        "maxItems": 10,
                        "type": "array",
                        "description": "Up to 10 user-authorized Apify key-value stores."
                    },
                    "recordKeys": {
                        "title": "Selected record keys",
                        "type": "object",
                        "description": "Map each selected key-value store ID to 1-100 exact record keys. Runtime validation enforces the key and list bounds.",
                        "additionalProperties": true
                    },
                    "inlineItems": {
                        "title": "Inline JSON items",
                        "maxItems": 100,
                        "type": "array",
                        "description": "Up to 100 small JSON objects for demos and automation.",
                        "items": {
                            "type": "object"
                        }
                    },
                    "includeSourceSchemas": {
                        "title": "Include source schemas",
                        "type": "boolean",
                        "description": "Include a record schema inside the package.",
                        "default": true
                    },
                    "archiveFormat": {
                        "title": "Archive format",
                        "enum": [
                            "zip"
                        ],
                        "type": "string",
                        "description": "Version 0.1 supports deterministic ZIP only.",
                        "default": "zip"
                    },
                    "redactionRules": {
                        "title": "Redaction JSON Pointers",
                        "maxItems": 100,
                        "uniqueItems": true,
                        "type": "array",
                        "description": "Explicit non-root RFC 6901 JSON Pointers removed from JSON object records and logged in the manifest.",
                        "items": {
                            "type": "string",
                            "pattern": "^/.+"
                        }
                    },
                    "maxRows": {
                        "title": "Maximum rows",
                        "minimum": 1,
                        "maximum": 100000,
                        "type": "integer",
                        "description": "Stop without charging if selected records exceed this bound.",
                        "default": 50000
                    },
                    "maxUncompressedBytes": {
                        "title": "Maximum uncompressed bytes",
                        "minimum": 1,
                        "maximum": 500000000,
                        "type": "integer",
                        "description": "Stop without charging if canonical source bytes exceed this bound.",
                        "default": 250000000
                    },
                    "maxArchiveBytes": {
                        "title": "Maximum archive bytes",
                        "minimum": 1,
                        "maximum": 100000000,
                        "type": "integer",
                        "description": "Stop without charging if the generated ZIP exceeds this bound.",
                        "default": 100000000
                    },
                    "deterministic": {
                        "title": "Deterministic archive",
                        "type": "boolean",
                        "description": "Required in version 0.1; runtime validation rejects false. Identical normalized input produces identical bytes.",
                        "default": true
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
