# DutyDelta — Tariff Change Impact (`critd/duty-delta`) Actor

See which tariff-source updates matter to your catalog. Compare official HTS editions, review affected items, and focus on the purchase lines that deserve attention.

- **URL**: https://apify.com/critd/duty-delta.md
- **Developed by:** [Critical Distinction](https://apify.com/critd) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.20 / 1,000 catalog item revieweds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## DutyDelta — Tariff Change Impact

**Tariff updates. A clearer view of your catalog.**

Bring your product list. Compare official HTS editions and get a clear view of
changed items, unchanged items and codes that need another look. Add purchase
values to focus your review where more of your supplied value is involved.

DutyDelta compares source information. It does not calculate your duties.

[Try the demo](#demo) · [Compare your catalog](#start-here) · [Pricing](#pricing) · [Help](#help)

### What you get

**A before-and-after review and a CSV working list.** See the source text behind
a change, find items that need attention and keep unresolved coverage visible.
Start with the catalog alone; purchase-line analysis is optional.

### Demo

Leave **Demo** selected to explore three fictional items: changed, unchanged
and unresolved. Run and open **REPORT.html** from Output. Demo rates are
illustrative, not real applicable duties.

There is no custom item-review charge for the demo. Apify's automatic
**$0.00005 per start** still applies; check the displayed maximum cost.

### Start here

1. Select **Compare**. The bundled defaults compare **2026-18** with **2026-19**.
2. Paste your catalog into **Catalog CSV** using the template below.
3. Run and open **REPORT.html**. Download **REVIEW.csv** for your working list.

```csv
itemId,sku,htsCode,originCountry
0001,SAMPLE-A,2908.91.00.00,US
0002,SAMPLE-B,0101.21.00.10,CA
```

These are fictional products paired with official source captures. Use your
existing eight- or ten-digit HTS codes and keep IDs as text. The Actor does not
guess classifications.

#### Add purchase values when useful

Paste purchase lines linked to your catalog by `itemId`:

```csv
purchaseLineId,itemId,declaredCustomsValueUsd,plannedEntryDate
po-1,0001,5000.00,2026-10-15
po-2,0002,,
```

The supplied USD value is the line total; it is not multiplied by quantity
again. Blank values stay missing. This helps organize a review, not estimate
the duties or savings on a purchase.

### Coverage before you start

The bundled **2026-18** and **2026-19** HTS editions support source-text
comparisons for **26,779 codes**. Another **27 indexed codes** have unresolved
source hierarchy and remain marked for review. Codes not found in the selected
editions are also shown as unresolved, not unchanged.

Use your existing eight- or ten-digit HTS codes. DutyDelta brings in the relevant
bundled source information for those codes; you do not need to prepare reference
packs for this included coverage. These are fixed editions, not today's latest
tariff. A supported comparison does not determine the duty applicable to a shipment.

#### How much can I review in one run?

You can submit up to **5,000 catalog rows** and **10,000 linked purchase lines**,
subject to input, source-evidence and result-size limits. A catalog containing
many different codes can reach a source-evidence limit before the row limit.
Not every 5,000-code catalog will fit in one run.

Start with a small sample. If the Actor asks you to split a catalog, use smaller
groups and keep each purchase line with its matching `itemId`. Keep original IDs
and include each purchase line only once. This does not automatically start more
runs. Each run has its own displayed pricing and limits.

A source-evidence-limit refusal stops before catalog results or completed-item
review charges are submitted. The normal startup/platform charges may still
apply; inspect the run before retrying. Other interrupted-run outcomes follow
the recovery guidance below.

Qualified supplied reference packs remain an advanced option. Narrow prepared
packs can require less work during evaluation, but they need separate preparation
and must meet the supported input and source-validation rules.

### Pricing

**Base price: $4.00 per 1,000 completed catalog-item reviews** ($0.004 per item).
Platform usage is included, plus Apify's automatic **$0.00005 per start**.
No Dataset-row surcharge.

| Apify plan | Price per completed item review |
| --- | ---: |
| Free | $0.0040 |
| Bronze | $0.0036 |
| Silver | $0.0034 |
| Gold / Platinum / Diamond | $0.0032 |

Multiple changed fields or attached purchase lines do not multiply an item's
charge. Unsupported items and unresolved required source coverage are not
completed reviews. Results are saved before the custom charge; your spending
limit is respected. Check [current pricing](https://apify.com/critd/duty-delta/pricing)
before running. Unknown charge outcomes are not automatically retried.

### Help

Ask about code coverage, preparing a catalog or a result in the
[Issues tab](https://apify.com/critd/duty-delta/issues). Include the run ID for a
run problem. Use fictional examples in public discussions, not private purchase
files, credentials or access links.

A stopped run may already have saved results or charges. Inspect its Output and
charge information before starting again.

### Advanced reference

#### Input parameters

`catalogCsv` supports up to 5,000 items; optional `purchasesCsv` supports up to
10,000 lines. Catalog fields are `itemId,sku,htsCode,originCountry`; origin is
a two-letter country code. Duplicate/conflicting identities and invalid purchase
joins fail early. `latest` is rejected: select an explicit bundled edition or
supply qualified prepared baseline/target packs. Supplied pack provenance is
retained; new defaults require an operator-validated pinned capture.

Bundled references are loaded in bounded parts, and all required source checks
finish before comparison results are published. A missing or damaged required
part is reported as unavailable, not as an unchanged code. Source coverage and
run capacity are separate: a code can be supported while a large combination
of codes needs smaller jobs.

The internal source-work limits are 96 MiB of decoded reference work across
both sides and 16 MiB of retained source evidence; result output is also bounded
at 16 MiB. These are processing limits, not predictions of memory usage or duty
amounts. Supplied packs retain their own combined-input limits and validation.

#### Output format

`REPORT.html` and `REVIEW.csv` are the main review files. `OUTPUT` links canonical
JSON and reports; Dataset rows are a convenience view. Partial coverage is
explicit. A failed Dataset append does not remove the saved report.

For repeated comparisons, Monitor uses a named history store and `state.scopeId`,
with optional `baselineSnapshotId`. `CHANGES.json`/CSV explains source, decision,
clock and input changes. History is accepted for 90 days; missing or ambiguous
history is disclosed. Select `historyStoreId` for hosted Monitor; any supplied
`state.storeId` must match. This grants the stated read/write access, not a
schedule.

#### Interpretation and privacy

Displayed rate text is source evidence, not an applicable-rate determination.
A source change need not change the duty owed. Known-value exposure excludes
missing purchase values; unresolved coverage stays separate from unchanged.
Numerical duties, classification advice, eligibility decisions, total-duty and
savings calculations remain disabled.

#### Permissions

Use permitted business data and suitable Apify storage/sharing settings.
Limited permissions apply; selected history storage needs its stated access.
Keep credentials, unrelated personal identifiers and payment details out of
input. Evidence excludes raw upstream error bodies and unselected fields.
The charge event remains `catalog-item-reviewed`.

See the bundled changelog for implementation history.

# Changelog

This Actor's version history is a separate document: https://apify.com/critd/duty-delta/changelog.md

# Actor input Schema

## `baselineEdition` (type: `string`):

In Compare/Monitor, leave empty to use bundled 2026-18 when no baseline reference pack is supplied. The included 2026-18/2026-19 comparison supports 26,779 codes; 27 indexed codes need source review. These are fixed editions, not today's tariff. Leave empty in Demo.

## `targetEdition` (type: `string`):

In Compare/Monitor, leave empty to use bundled 2026-19 when no target reference pack is supplied. The included 2026-18/2026-19 comparison supports 26,779 codes; 27 indexed codes need source review. These are fixed editions, not today's tariff. Leave empty in Demo.

## `mode` (type: `string`):

Choose Demo for fictional examples, Compare for your catalog, or Monitor for a named history comparison.

## `catalogCsv` (type: `string`):

Paste catalog CSV with itemId, sku, htsCode and originCountry columns. Keep identifiers as text. Up to 5,000 rows; catalogs with many distinct codes may need smaller groups to fit source-evidence limits.

## `catalog` (type: `array`):

Catalog items to compare against the selected bundled editions or supplied reference packs. Up to 5,000 rows, subject to source-evidence and result-size limits. A catalog with many distinct codes may need to be split.

## `purchases` (type: `array`):

Optional purchase lines joined to catalog item IDs; no duty amount is calculated.

## `baseline` (type: `object`):

Prepared baseline reference pack with retained source provenance; omit to use the bundled edition.

## `target` (type: `object`):

Prepared target reference pack with retained source provenance; omit to use the bundled edition.

## `state` (type: `object`):

Monitor scope and optional exact baseline. Select the history store in historyStoreId for hosted runs.

## `purchasesCsv` (type: `string`):

Optional purchase CSV joined by itemId. Supplied USD values are line totals.

## `historyStoreId` (type: `string`):

For monitor runs, select the history key-value store here and set state.scopeId. If state.storeId is also supplied, it must match.

## Actor input object example

```json
{
  "mode": "demo"
}
```

# Actor output Schema

## `report` (type: `string`):

No description

## `review` (type: `string`):

No description

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

// Run the Actor and wait for it to finish
const run = await client.actor("critd/duty-delta").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("critd/duty-delta").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 critd/duty-delta --silent --output-dataset

```

## MCP server setup

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

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/TVWEHK9ZinX7Ml5rO/builds/nxLF6NaIyvsUlrgsq/openapi.json
