# CPSC eFiling Checker & Registry CSV Validator (`entrycert/cpsc-efiling-checker`) Actor

Look up whether an HTS code is on CPSC's eFiling flag list (CP1/CP2), see likely CPC/GCC citation codes from official CPSC files, and validate a Product Registry CSV. Built by EntryCert. Not legal advice.

- **URL**: https://apify.com/entrycert/cpsc-efiling-checker.md
- **Developed by:** [EntryCert](https://apify.com/entrycert) (community)
- **Categories:** Developer tools, Business
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.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?

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

## CPSC eFiling Checker & Registry CSV Validator

Look up whether a US HTS code is on the CPSC eFiling flag list (CP1 or CP2), see the likely certificate type (CPC, GCC, or none) and the official citation codes that usually go with that CPSC product category, and optionally validate a CPSC Product Registry bulk-upload CSV.

Built by [EntryCert](https://entrycerts.com), a data-preparation tool for CPSC eFiling. The actor uses the same official files and the same CSV validation logic as the free tools on that site.

### What this actor does

- Accepts a list of HTS codes (10-digit, or a 4/6/8-digit heading such as `9503.00` or `9506`) and/or short product descriptions.
- For each HTS code, reports whether it appears on CPSC's October 2026 eFiling HTS list, the CP1 or CP2 flag, the CPSC product category, official rule names for the starting-point citation codes, and the matching page on entrycerts.com.
- Optionally accepts Product Registry CSV text, or an `http(s)` URL of such a CSV, and returns validation errors and warnings using the same rules as [the free CSV validator](https://entrycerts.com/validate) (CPSC User Guide for CSV Upload V3, plus the official citation and testing-exclusion lists).
- Writes one dataset item per HTS or description, plus one item for a CSV validation when you provide a file. A short run summary is stored in the default key-value store as `SUMMARY`.

It does **not** scrape CPSC.gov at runtime, file anything with CBP or CPSC, issue a certificate, or give legal advice. All lookup data is bundled with the actor.

### Data sources (bundled, not scraped)

- CPSC *eFiling Citation and Testing Exclusion Codes*, December 18, 2025.
- CPSC *HTS list for filing electronic certificates*, October 2026.
- Official USITC HTS descriptions for the flagged 10-digit codes only (for display).
- CSV column and field rules as implemented on entrycerts.com from CPSC's *User Guide for CSV Upload V3*.

CPSC may update those lists. The official files are the source of truth.

### Input

Provide at least one of: HTS codes, product descriptions, CSV text, or a CSV URL.

```json
{
  "htsCodes": ["9503.00.0073", "9506.29.0080", "0101.21.0010"],
  "items": [
    {
      "hts": "6101.20.0020",
      "description": "men's cotton overcoat",
      "forChildren12AndUnder": false
    }
  ],
  "csvText": "Product Update,New Version ID,...\nN,V1,..."
}
```

- `htsCodes` — list of HTS codes or headings.
- `items` — optional objects with `hts`, `description`, and `forChildren12AndUnder` when you know whether the product is intended primarily for children 12 or under.
- `productDescriptions` — keyword-only starting points when you do not have an HTS code. Less precise than an HTS lookup.
- `csvText` — paste a Product Registry CSV (template V3). The text stays in the run; it is not sent to EntryCert.
- `csvUrl` — optional `http`/`https` URL of a CSV. The actor fetches it only to validate this run (5 MB limit). Do not put passwords in the URL. Ignored if `csvText` is also set.

### Example output (shortened)

Dataset item for a flagged toys heading:

```json
{
  "type": "hts_check",
  "inputHts": "9503.00.0073",
  "flagged": true,
  "flags": ["CP2"],
  "cpscCategories": ["Toys"],
  "certificateType": "CPC",
  "citationCodes": [
    {
      "code": "4.6",
      "regulation": "ASTM F963: Small Objects",
      "pageUrl": "https://entrycerts.com/codes/astm-f963/#s4-6"
    }
  ],
  "pageUrl": "https://entrycerts.com/hts/9503/",
  "freeFirstCertificateUrl": "https://entrycerts.com/free-first-certificate",
  "disclaimer": "EntryCert is a data-preparation tool, not a law firm..."
}
```

`certificateType` is one of `CPC`, `GCC`, `CPC_OR_GCC`, `NONE`, or `REVIEW`. CP1 means certificate-related data *may* be needed; CP2 means CPSC labels it as *required*. Category starting-point codes are not a finding that every code applies to your SKU. Use your lab report and CPSC guidance.

Every dataset row includes the disclaimer above and a link to the matching entrycerts.com page, plus the [free first certificate data package](https://entrycerts.com/free-first-certificate).

### Pricing

This first version is free to start. A pay-per-event price may be added later; none is configured now.

### Related tools on entrycerts.com

- [Free eFiling checker](https://entrycerts.com/check)
- [Product Registry CSV validator](https://entrycerts.com/validate)
- [Citation code reference](https://entrycerts.com/codes/)
- [When no certificate is required (Disclaim A vs B)](https://entrycerts.com/codes/no-certificate-required/)
- [Free first certificate data package](https://entrycerts.com/free-first-certificate)

EntryCert does not file on your behalf. The importer or domestic manufacturer is the certifier.

### Publishing (after you create an Apify account)

This repository is ready to push. It does not include an Apify account or token. After you sign up in the browser and create an API token (Apify Console → Settings → Integrations / API tokens):

```bash
cd /workspace/company/apify/entrycert-checker
## Install the CLI once if you do not already have it: npm install -g apify-cli
apify login --token apify_api_YOUR_TOKEN
apify push
```

`apify push` uses `.actor/actor.json` (actor name `cpsc-efiling-checker`) and does not require a spend. Do not commit the token or `~/.apify/auth.json`.

# Actor input Schema

## `htsCodes` (type: `array`):

US Harmonized Tariff Schedule codes to look up on CPSC's eFiling flag list. 10-digit codes, or a 4/6/8-digit heading or prefix (for example 9503.00 or 9506). Dots and spaces are ignored.

## `items` (type: `array`):

Optional structured rows. Each object may include hts, description, and forChildren12AndUnder (true/false) when you know the age grading.

## `productDescriptions` (type: `array`):

Free-text descriptions used only as a keyword starting point when you do not have an HTS code. Less precise than an HTS lookup.

## `csvText` (type: `string`):

Paste the contents of a CPSC Product Registry bulk-upload CSV (template V3). Validated with the same rules as the free validator on entrycerts.com. The text stays in this run; it is not sent to EntryCert.

## `csvUrl` (type: `string`):

Optional http(s) URL of a Product Registry CSV. The actor fetches it only to validate this run (5 MB limit). Do not put passwords in the URL. Unused if CSV text is also provided.

## Actor input object example

```json
{
  "htsCodes": [
    "9503.00.0073",
    "9506.29.0080"
  ]
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset items: one per HTS or product-description lookup, plus one CSV validation item when a CSV was provided. Each item includes a not-legal-advice disclaimer and links to entrycerts.com.

## `summary` (type: `string`):

Short counts of flagged and unflagged HTS codes and CSV error totals, stored as the SUMMARY record in the default key-value store.

# 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 = {
    "htsCodes": [
        "9503.00.0073",
        "9506.29.0080"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("entrycert/cpsc-efiling-checker").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 = { "htsCodes": [
        "9503.00.0073",
        "9506.29.0080",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("entrycert/cpsc-efiling-checker").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 '{
  "htsCodes": [
    "9503.00.0073",
    "9506.29.0080"
  ]
}' |
apify call entrycert/cpsc-efiling-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,entrycert/cpsc-efiling-checker"
        }
    }
}
```

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/P4u3RBACuFlw0dLte/builds/86Mc1gcSqqvG5GsuL/openapi.json
