# eFile Pack — structured CPSC CPC/GCC validation (`savagnic/savage-marketplace`) Actor

Offline validation and normalization of structured CPSC CPC/GCC data, with an internal registry CSV and rejection report. No OCR/PDF/image parsing; does not file with CPSC/CBP or create ACE/PGA transactions; does not guarantee compliance.

- **URL**: https://apify.com/savagnic/savage-marketplace.md
- **Developed by:** [NICHOLAS SAVAGE](https://apify.com/savagnic) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## eFile Pack — structured CPSC CPC/GCC validation

Give eFile Pack a **structured** CSV, TSV, JSON or NDJSON certificate dataset.
It validates and normalizes the recorded CPC/GCC facts against CPSC’s seven
Children’s Product Certificate elements, then provides an **internal registry
CSV** and an itemized **rejection report CSV**.

### Boundaries

- It does **not** parse OCR, PDF, or image input.
- It does **not** file anything with CPSC or CBP, create a PGA Message Set, or
  create an ACE transaction.
- The internal registry CSV is **not** a shipment-pack export or a filing-ready
  government submission.
- It cannot verify a lab’s CPSC acceptance, the existence of test reports, or
  actual product compliance. It validates the structured facts supplied.
- It is not legal advice.

### Input

Unknown fields are rejected, including any URL, path, webhook, proxy, or other
egress-shaped field. The Actor is offline apart from the Apify platform APIs it
uses to store results and issue a charge. Supply the data exactly once:

| Field | Type | Default | Notes |
|---|---|---:|---|
| `datasetText` | string | – | bounded inline structured data; mutually exclusive with `datasetKey` |
| `datasetKey` | string | – | a plain record name in this run’s own key-value store; not a URL or path |
| `format` | `auto` | `csv` | `tsv` | `json` | `ndjson` | `auto` | structured input format |
| `includeIncomplete` | boolean | `false` | include records with error findings in the internal registry CSV |
| `failOn` | `error` | `warning` | `never` | `error` | findings threshold for exit code `1` |
| `maxRows` | integer | `50000` | hard maximum `500000` |

Inline data is bounded to 1 MiB. For a larger input, first place the existing
structured data in the **same run’s** key-value store and set `datasetKey` to its
flat record name. eFile Pack never follows a URL or a filesystem path.

### Output

Exactly one bounded `efilepack/actor-result/1` result is written **identically**
to the default dataset and the `OUTPUT` key-value record on handled success and
handled failure. Raw certificate and contact facts are not duplicated in that
JSON; it contains summary counts, findings, and CSV artifact references with
SHA-256 digests.

| Record | Contents |
|---|---|
| `internal-registry.csv` | normalized internal registry CSV; complete records only unless `includeIncomplete` is true |
| `rejection-report.csv` | per-element validation findings |

| Exit code | Meaning |
|---|---|
| `0` | handled result stored; no tripped policy or runtime/input error |
| `1` | findings at or above `failOn`; result and available CSVs are still stored |
| `2` | missing, invalid, oversized, or unknown input field |
| `3` | runtime or storage failure |

### Pricing recommendation — not configured or billed

**This is a repository recommendation only.** No Apify Console monetization is
configured, no user has been billed, and this document does not claim otherwise.
If this private Actor is ever monetized, the sole proposed per-run event is:

| Event | Recommended price | Charged when |
|---|---:|---|
| `certificate-validation-report` | **$0.18** | exactly once after a successful validation result plus its internal registry/rejection CSV records are stored in both dataset and `OUTPUT` |

The recommendation is deliberately one **per-run** event, not $0.18 per SKU and
not a $1.50 “shipment-pack export”: this implementation delivers structured data
validation plus an internal registry/rejection report, not a shipment pack,
filing, or transaction. Invalid input, findings/policy failures, runtime or
storage failures, retries, and resurrects are not charged. An idempotency key is
sent for the only possible platform charge, and `ACTOR_MAX_TOTAL_CHARGE_USD` is
checked before it is sent. A charge failure never alters the stored result or its
exit code.

### Privacy and safety

There are no secret input fields. Platform credentials, when the platform
supplies them, are used only by the storage/charging boundary and are never
written to a dataset item, `OUTPUT`, a CSV artifact, or a log. The container runs
unprivileged and bounds inline bytes, rows, and JSON depth.

# Actor input Schema

## `datasetText` (type: `string`):

Bounded CSV, TSV, JSON, or NDJSON data. Cannot be combined with datasetKey.

## `datasetKey` (type: `string`):

Plain record name in this run's own default key-value store for a larger structured dataset. It is not a path or URL and cannot be combined with datasetText.

## `format` (type: `string`):

Use auto to detect the structured format from the supplied bytes.

## `includeIncomplete` (type: `boolean`):

By default the internal registry CSV includes only records with no error findings.

## `failOn` (type: `string`):

The result and CSV reports are stored either way; controls whether findings exit 1.

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

Bounded validation work. Split a larger dataset before validation.

## Actor input object example

```json
{
  "format": "auto",
  "includeIncomplete": false,
  "failOn": "error",
  "maxRows": 50000
}
```

# Actor output Schema

## `result` (type: `string`):

The one bounded run result in the default dataset.

## `outputRecord` (type: `string`):

The identical bounded result under the OUTPUT key.

## `internalRegistry` (type: `string`):

Normalized internal registry CSV. Not a shipment pack, PGA Message Set, ACE transaction, or filing.

## `rejectionReport` (type: `string`):

Per-element validation findings as a downloadable CSV.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("savagnic/savage-marketplace").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("savagnic/savage-marketplace").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 '{}' |
apify call savagnic/savage-marketplace --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,savagnic/savage-marketplace"
        }
    }
}

```

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/RRz2sWeoQHYJcvQyg/builds/kPXEIORChQea9AFCD/openapi.json
