# IIIF Presentation Preflight (`immemorial_sarinda/iiif-presentation-preflight`) Actor

Check a supplied IIIF Presentation 3 Manifest against a narrow inline-image profile. Inspect declaration shapes, language maps, IDs and targets without fetching resources. Receive one complete JSON report. USD 0.10 per completed report, platform usage included. Not full IIIF conformance.

- **URL**: https://apify.com/immemorial_sarinda/iiif-presentation-preflight.md
- **Developed by:** [Picknotes](https://apify.com/immemorial_sarinda) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$100.00 / 1,000 completed reports

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## IIIF Presentation Preflight

Check one supplied Manifest against a narrow Presentation 3.0 inline-image profile: inline Canvas, AnnotationPage and painting Annotation objects with a single Image body. The report checks declaration shapes, language maps, IDs and target relationships. It does not fetch contexts, pages, images or services. It does not provide full IIIF conformance, viewer compatibility, rights, ownership, authentication, image availability or pixel assurance. Unsupported coverage produces an incomplete report and cannot become an eligible completed delivery. A complete report may contain error findings.

Use the synthetic demo with own-data fields absent. Own mode requires useDemo=false, manifestJson and authorizedNonpersonalNonconfidentialData=true. Supply only authorized, nonpersonal and nonconfidential data. The exact original Manifest text is passed to the reviewed native parser; no input trimming, URI normalization or report rewriting occurs. The platform stores input before execution. No confidentiality, retention, deletion, location or secret-detection guarantee is made.

One eligible completed report uses one full thirteen-field dataset item. Export raw JSON without field selection, cleaning, flattening or unwinding. No report files are written to key-value storage. Each completed report costs USD 0.10, including platform usage and reports with findings; check the current platform price before running. The receipt binds the expected identity of the completion event. It does not prove sender authenticity, configured billing, a charge or settlement. An uncertain append may already be billed: never automatically repost or rerun it.

The optional four-file buyer helper verifies the complete source-free public consistency policy and extracts the exact report bytes. If you have the helper, run python3 -B extract.py item.json new-report.json using a raw item or singleton export. It checks shapes, canonical encoding, hashes, occurrence capacities, finding roles and locations, language and identity relationships, expected receipt and delivery identity. It does not have original input and cannot prove semantic completeness or sender authenticity. Optional unobserved maps and possible per-Page allocations remain genuine ambiguities. The private original-input semantic verifier is separate and is not bundled. Existing output files and symlink paths are refused; use trusted local parent directories and review reports before sharing them.

Limits remain 2 MiB for raw Manifest input, depth 32, 500 Canvas slots, 1,000 AnnotationPage slots and 1,000 Annotation slots. Native reports remain bounded at 4 MiB, while the exact eight-byte worker frame and actual escaped singleton dataset item each fit 4,500,000 bytes. Dynamic report capacity is min(4194304,4499992-inputBytes); receipt capacity is 2,048 bytes. Oversized results fail before append without truncation. Private workers retain 10 seconds, the outer entry 50 seconds, CPU soft/hard 30 seconds and Linux AS 448 MiB lower-only ceilings. Execution rejects unsupported inherited signal/timer or consumed-CPU state.

### Read or save your report

The full report is already in the dataset item's reportJson field. You do not need a helper download to read or save it. Open the raw dataset items output, export JSON with every field intact, and save it locally as item.json. Do not enable cleaning, flattening, unwinding or field selection. Use either a single item object or a one-item JSON array.

To save the report with only Python's standard library, save the following as save_report.py, then run `python3 save_report.py item.json new-report.json`. Use a new output filename and a trusted local directory. This checks the recorded byte count and hash and writes the UTF-8 report text without changing its final newline. It is basic extraction, not full report consistency validation, original-input verification or sender authentication.

```python
import hashlib
import json
import sys
from pathlib import Path

value = json.loads(Path(sys.argv[1]).read_text(encoding="utf-8"))
if isinstance(value, list):
    if len(value) != 1:
        raise ValueError("Expected exactly one dataset item")
    value = value[0]
raw = value["reportJson"].encode("utf-8")
if len(raw) != value["reportBytes"]:
    raise ValueError("Report byte count mismatch")
if hashlib.sha256(raw).hexdigest() != value["reportSha256"]:
    raise ValueError("Report hash mismatch")
with open(sys.argv[2], "xb") as output:
    output.write(raw)
```

For additional consistency checks, use the optional reviewed buyer helper with its extract.py, README.md, TERMS.md and MANIFEST.json kept together. The helper also checks the expected receipt and delivery identity and refuses existing output files and symlink output paths. It does not establish the truth of the original input or settled billing. Review reports before sharing them. No separate public hosting service or helper download is required for the basic extraction above.

# Actor input Schema

## `authorizedNonpersonalNonconfidentialData` (type: `boolean`):

Required true for your own Manifest: confirm processing rights and that the supplied data is nonpersonal and nonconfidential, without secrets.

## `manifestJson` (type: `string`):

Own mode only. Required with useDemo=false and explicit consent. One inline Manifest, at most 2 MiB UTF-8; no fetching. Omit in demo mode.

## `useDemo` (type: `boolean`):

Use the bundled synthetic IIIF Manifest example; omit manifestJson and leave own-data authorization absent or false in demo mode.

## Actor input object example

```json
{
  "authorizedNonpersonalNonconfidentialData": false,
  "useDemo": true
}
```

# Actor output Schema

## `results` (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 = {
    "useDemo": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("immemorial_sarinda/iiif-presentation-preflight").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 = { "useDemo": True }

# Run the Actor and wait for it to finish
run = client.actor("immemorial_sarinda/iiif-presentation-preflight").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "useDemo": true
}' |
apify call immemorial_sarinda/iiif-presentation-preflight --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,immemorial_sarinda/iiif-presentation-preflight"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/xHELNgELwJpEYjUdO/builds/MWylPMdzI6FUY7oHc/openapi.json
