# HS Code Classifier for Etsy & Shopify Products (`reverent_magic/hs-code-classifier`) Actor

Get HS codes (tariff numbers, first 6 digits of HTS/TARIC) for your products with AI: HS 2022 code, CN22/CN23 customs description, confidence and alternatives. Bulk-classify Etsy or Shopify CSV exports for USPS customs forms and EU low-value parcel duty.

- **URL**: https://apify.com/reverent_magic/hs-code-classifier.md
- **Developed by:** [Egor Marchenko](https://apify.com/reverent_magic) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $10.00 / 1,000 classified products

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

### What does HS Code Classifier do?

**HS Code Classifier** finds the **6-digit HS tariff code** (Harmonized System, 2022 edition) for your products with AI. Give it product titles, a JSON list, or your **Etsy or Shopify CSV export**, and get back for every product:

- the **HS code** (e.g. `7113.11`) and its official HS 2022 text,
- a **customs description** you can paste into CN22/CN23 forms ("Sterling silver pendant necklace", not "jewelry"),
- a **confidence** label, a one-line **reason**, **alternative codes** and the **questions** that could change the answer.

It only ever returns codes that exist in the official HS 2022 nomenclature, and it tells you when a product is a **digital download** that needs no code. The HS code is also called a **tariff number**, **customs code** or **commodity code**. It is the first 6 digits of the US **HTS** code and of the EU **TARIC/CN** code.

### Why do online sellers need HS codes now?

- **USPS**: since 1 September 2025 every item in an international shipment needs at least a 6-digit HS code.
- **EU**: since 1 July 2026 parcels under €150 pay a **€3 customs duty for each different HS code** inside (IOSS sellers, until 2028). A wrong or vague code costs money on every parcel.
- **Marketplaces**: Etsy asks sellers to review their HS codes because duty rates depend on the item type.

Looking codes up by hand in tariff books is slow and easy to get wrong. This Actor does a whole shop in one run.

### What data does it return?

| Field | Example | Meaning |
|---|---|---|
| `hsCodeFormatted` | `7113.11` | 6-digit HS 2022 subheading |
| `customsDescription` | `Sterling silver pendant necklace` | Text for customs forms |
| `confidenceLabel` | `high` | high / medium / low |
| `needsReview` | `false` | `true` when a person should check before shipping |
| `reasoning` | `Solid 925 silver, so precious-metal jewellery…` | Why this code |
| `alternatives` | `7117.19 if the chain is plated brass` | Codes that apply if a fact differs |
| `questions` | `Is the chain solid silver or plated?` | Missing facts that could change the code |
| `status` | `classified` | `classified`, `not_physical` (digital product) or `error` |

### How to get HS codes for your products

1. Click **Try for free**.
2. Fill one of the inputs:
   - **CSV file**: upload your Etsy listings export (*Shop Manager → Settings → Options → Download Data*) or Shopify product export (*Products → Export*).
   - **Products**: a JSON list with `title` and, ideally, `description` and `materials`.
   - **Product titles**: paste titles, one per line.
3. Click **Start**. Results appear in the **Output** tab as they are ready.
4. Download them as **CSV, Excel or JSON**, or get them through the **API**.

### How much does it cost?

You pay a fixed price **per product we return an answer for** (see the *Pricing* tab). Products that fail are free. At $0.015 per product, a 300-product shop costs about $4.50. On paid Apify plans the price is lower: $0.0135 on Starter, $0.012 on Scale and $0.01 on Business. Set **Maximum cost per run** in the run options and the Actor stops before going over it.

### Input

See the **Input** tab for all options. Materials matter most: "925 sterling silver" vs "gold plated brass" changes the code completely (7113 vs 7117). If your titles do not mention the material, include the description or turn on **Look at product photos**.

Example:

```json
{
    "products": [
        { "id": "NK-001", "title": "Dainty Initial Necklace", "materials": "925 sterling silver" },
        { "id": "TS-014", "title": "Retro Sunset Graphic Tee", "materials": "100% cotton jersey" }
    ]
}
```

### Output

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

```json
[
    {
        "id": "NK-001",
        "title": "Dainty Initial Necklace",
        "status": "classified",
        "hsCodeFormatted": "7113.11",
        "description": "Jewellery; of silver, whether or not plated or clad with other precious metal, and parts thereof",
        "customsDescription": "Sterling silver pendant necklace",
        "confidenceLabel": "high",
        "needsReview": false,
        "reasoning": "Solid 925 silver, so precious-metal jewellery (7113), subheading for silver.",
        "alternatives": [{ "hsCodeFormatted": "7117.19", "when": "If the chain is silver-plated brass" }],
        "questions": []
    },
    {
        "id": "DL-3",
        "title": "Printable Wall Art, Instant Download",
        "status": "not_physical",
        "hsCodeFormatted": null,
        "reasoning": "This looks like a digital or non-physical product. Nothing is shipped, so no HS code is needed."
    }
]
```

### How accurate is it?

The AI first works out what the item is (material, how it is made, what it is for), then chooses only among real HS 2022 subheadings, following the General Rules of Interpretation.

In our test on 42 typical handmade and small-shop products that were not used to tune the classifier, it found the exact 6-digit code for 39 (93%). All 31 answers marked **high** confidence were correct, and every wrong answer was marked **needs review**. **Medium** and **low** answers come with the question you need to answer to be sure. Common mistakes it avoids: plated jewellery classified as silver, knitted vs woven clothing, printed art prints vs original paintings.

#### Does it give the 8- or 10-digit national code?

Not yet. It returns the 6-digit HS code, which is what USPS requires and what the EU €3 low-value duty is based on. US HTS (10-digit) and EU CN (8-digit) extensions are planned.

### HS codes for popular Etsy products

Typical HS 2022 codes for handmade and small-shop items. The material decides the code, so always check yours. That's what this Actor does for every listing.

| Product | HS code | HS 2022 heading |
|---|---|---|
| Sterling silver jewelry (rings, necklaces, earrings) | `7113.11` | Jewellery of silver |
| Fashion jewelry of brass or steel, gold-plated | `7117.19` | Imitation jewellery of base metal |
| Cotton T-shirts (knitted) | `6109.10` | T-shirts of cotton, knitted |
| Knitted beanies and hats | `6505.00` | Hats, knitted or crocheted |
| Knitted scarves | `6117.10` | Shawls and scarves, knitted |
| Scented candles | `3406.00` | Candles |
| Handmade soap bars | `3401.11` | Soap in bars, for toilet use |
| Stoneware or earthenware mugs | `6912.00` | Ceramic tableware, not porcelain |
| Porcelain mugs and plates | `6911.10` | Porcelain tableware |
| Art prints and posters | `4911.91` | Printed pictures |
| Original paintings | `9701.91` | Paintings executed entirely by hand |
| Leather wallets and card holders | `4202.31` | Pocket items with outer surface of leather |
| Wooden and plush toys | `9503.00` | Toys |
| Digital downloads (PDF, printables, SVG) | none | Nothing is shipped, so no code is needed |

### FAQ

#### What HS code do I need for Etsy international shipping?

USPS customs forms (CN22/CN23) need a 6-digit HS code for every item, including labels you buy through Etsy. Upload your Etsy listings CSV and this Actor returns a code and a customs description for each listing.

#### What is the difference between HS, HTS, TARIC and CN codes?

The **HS code** is the international 6-digit code used by over 200 countries. The US **HTS** (10 digits) and the EU **CN/TARIC** (8 and 10 digits) add national digits after the same first 6. For postal shipping forms, the 6-digit HS code is what you need.

#### Can I classify my whole shop at once?

Yes. Export your listings from Etsy (*Shop Manager → Settings → Options → Download Data*) or Shopify (*Products → Export*) and upload the CSV. A 300-product shop takes a few minutes.

#### Can I try it for free?

Yes. The Apify free plan includes a monthly usage credit that you can spend on this Actor, so you can test it on your own listings before paying anything. You only pay for products that get an answer.

#### What if the code is wrong or uncertain?

Answers marked **needs review** or **low** confidence come with the question you need to answer (for example "is the chain solid silver or plated?"). Check those before shipping, and report wrong codes in the **Issues** tab.

### Disclaimer

HS codes from this Actor are suggestions to help you fill in customs forms faster. The shipper remains responsible for the declaration. For high-value goods, regulated goods (food, cosmetics, batteries, weapons, plants, animal products) or anything marked **needs review**, confirm the code with your customs broker or the destination country's customs authority.

Found a wrong code? Please report it in the **Issues** tab with the product title. Every report makes the classifier better.

# Actor input Schema

## `products` (type: `array`):

Products to classify. Each needs a "title". Adding "description", "materials" and "category" makes the code more accurate. "id" (your SKU) is copied to the results. "imageUrl" is used only when "Look at product photos" is on.

## `titles` (type: `array`):

Just paste product titles, one per line. Faster to fill in, but less accurate than the full "Products" field when the title does not mention the material.

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

Upload a product CSV or paste a link to one. Works with Etsy listing exports (TITLE, DESCRIPTION, MATERIALS, TAGS, SKU) and Shopify product exports (Title, Body (HTML), Product Category, Variant SKU). Any CSV with a "title" or "name" column also works.

## `useImages` (type: `boolean`):

Also show the product photo (imageUrl / IMAGE1 / Image Src) to the AI. Helps when listings do not state the material. Slower.

## `maxProducts` (type: `integer`):

Stop after this many products. Your run's maximum cost setting is also respected.

## Actor input object example

```json
{
  "products": [
    {
      "id": "NK-001",
      "title": "Dainty Sterling Silver Initial Necklace",
      "materials": "925 sterling silver",
      "description": "Solid silver chain and hand stamped disc pendant."
    },
    {
      "id": "TS-014",
      "title": "Retro Sunset Graphic Tee",
      "materials": "100% cotton jersey",
      "description": "Knitted cotton t-shirt, screen printed."
    },
    {
      "id": "MUG-7",
      "title": "Handmade Stoneware Coffee Mug",
      "materials": "stoneware clay, food safe glaze"
    }
  ],
  "useImages": false,
  "maxProducts": 1000
}
```

# Actor output Schema

## `dataset` (type: `string`):

Classified products

# 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 = {
    "products": [
        {
            "id": "NK-001",
            "title": "Dainty Sterling Silver Initial Necklace",
            "materials": "925 sterling silver",
            "description": "Solid silver chain and hand stamped disc pendant."
        },
        {
            "id": "TS-014",
            "title": "Retro Sunset Graphic Tee",
            "materials": "100% cotton jersey",
            "description": "Knitted cotton t-shirt, screen printed."
        },
        {
            "id": "MUG-7",
            "title": "Handmade Stoneware Coffee Mug",
            "materials": "stoneware clay, food safe glaze"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("reverent_magic/hs-code-classifier").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 = { "products": [
        {
            "id": "NK-001",
            "title": "Dainty Sterling Silver Initial Necklace",
            "materials": "925 sterling silver",
            "description": "Solid silver chain and hand stamped disc pendant.",
        },
        {
            "id": "TS-014",
            "title": "Retro Sunset Graphic Tee",
            "materials": "100% cotton jersey",
            "description": "Knitted cotton t-shirt, screen printed.",
        },
        {
            "id": "MUG-7",
            "title": "Handmade Stoneware Coffee Mug",
            "materials": "stoneware clay, food safe glaze",
        },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("reverent_magic/hs-code-classifier").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 '{
  "products": [
    {
      "id": "NK-001",
      "title": "Dainty Sterling Silver Initial Necklace",
      "materials": "925 sterling silver",
      "description": "Solid silver chain and hand stamped disc pendant."
    },
    {
      "id": "TS-014",
      "title": "Retro Sunset Graphic Tee",
      "materials": "100% cotton jersey",
      "description": "Knitted cotton t-shirt, screen printed."
    },
    {
      "id": "MUG-7",
      "title": "Handmade Stoneware Coffee Mug",
      "materials": "stoneware clay, food safe glaze"
    }
  ]
}' |
apify call reverent_magic/hs-code-classifier --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,reverent_magic/hs-code-classifier"
        }
    }
}
```

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/OoFTpdYGk7Ld8Aez5/builds/SXlwJWDVs9rtUFyLR/openapi.json
