{
  "openapi": "3.0.1",
  "info": {
    "title": "Import Duty & Tariff Calculator, HS Code Lookup",
    "description": "Look up US import duty by HS code or product keyword, keyless. Rates resolved down to the 10-digit line, free trade agreement eligibility by origin country, duty estimate on a shipment value, Chapter 99 Section 301 and IEEPA lookups, and UN Comtrade trade flows.",
    "version": "0.1",
    "x-build-id": "eLNsvZLbqkw3gMqT4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapemint~import-duty-tariff-calculator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapemint-import-duty-tariff-calculator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/scrapemint~import-duty-tariff-calculator/runs": {
      "post": {
        "operationId": "runs-sync-scrapemint-import-duty-tariff-calculator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/scrapemint~import-duty-tariff-calculator/run-sync": {
      "post": {
        "operationId": "run-sync-scrapemint-import-duty-tariff-calculator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "duty",
              "additionalTariffs",
              "tradeFlow"
            ],
            "type": "string",
            "description": "Duty lookup returns tariff lines with the rate that applies. Additional tariffs returns Chapter 99 headings, where Section 301, Section 232 and IEEPA duties live. Trade flows returns who actually ships the goods, from UN Comtrade.",
            "default": "duty"
          },
          "hsCodes": {
            "title": "HS / HTS codes",
            "type": "array",
            "description": "Codes to look up, with or without dots: 8541, 8541.43.00, 8541430010. A 4-digit heading returns every line under it. Required for trade flow mode, where codes are truncated to 6 digits because Comtrade is keyed at that level.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keyword": {
            "title": "Product keyword",
            "type": "string",
            "description": "Search the tariff schedule by product description, for example \"solar panel\" or \"cotton t-shirt\". In additional tariffs mode this filters Chapter 99 by country or product text instead, for example \"Mexico\" or \"aluminum\"."
          },
          "originCountry": {
            "title": "Country of origin",
            "type": "string",
            "description": "ISO2 code of where the goods are made, for example CN, MX, DE, VN. Decides which tariff column applies and flags any trade agreement the country takes part in. Leave empty to get the general rate."
          },
          "shipmentValueUsd": {
            "title": "Shipment value (USD)",
            "type": "string",
            "description": "Customs value of the shipment. Adds an estimated duty and landed cost per line. Lines charged per kilo or per pair report no estimate rather than a made-up one, because that needs a weight or piece count."
          },
          "forceColumn": {
            "title": "Tariff column",
            "enum": [
              "auto",
              "general",
              "special",
              "other"
            ],
            "type": "string",
            "description": "Auto picks column 2 for countries without normal trade relations, then the best trade agreement rate the origin country qualifies for, then the general rate. Override to compare columns directly.",
            "default": "auto"
          },
          "includeStatisticalLines": {
            "title": "Include 10-digit statistical lines",
            "type": "boolean",
            "description": "10-digit lines are what you actually declare at entry, and they inherit their duty rate from the 8-digit line above. Turn off to get only the 8-digit legal rate lines.",
            "default": true
          },
          "reporterCountry": {
            "title": "Reporting country (trade flows)",
            "type": "string",
            "description": "ISO2 code of the country whose customs reported the trade, for example US, DE, JP. Trade flow mode only.",
            "default": "US"
          },
          "partnerCountry": {
            "title": "Partner country (trade flows)",
            "type": "string",
            "description": "ISO2 code of the other side of the trade. Leave empty for every partner, which also returns a World aggregate row flagged as such. Trade flow mode only."
          },
          "year": {
            "title": "Year (trade flows)",
            "minimum": 1962,
            "maximum": 2100,
            "type": "integer",
            "description": "Reporting year. Comtrade runs about two years behind, so leave empty to use the most recent year likely to have data."
          },
          "flow": {
            "title": "Flow direction (trade flows)",
            "enum": [
              "M",
              "X"
            ],
            "type": "string",
            "description": "Imports into the reporting country, or exports out of it.",
            "default": "M"
          },
          "maxRows": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Stop after this many rows.",
            "default": 200
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}