{
  "openapi": "3.0.1",
  "info": {
    "title": "DutyDelta — Tariff Change Impact",
    "description": "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.",
    "version": "0.3",
    "x-build-id": "nxLF6NaIyvsUlrgsq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/critd~duty-delta/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-critd-duty-delta",
        "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/critd~duty-delta/runs": {
      "post": {
        "operationId": "runs-sync-critd-duty-delta",
        "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/critd~duty-delta/run-sync": {
      "post": {
        "operationId": "run-sync-critd-duty-delta",
        "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",
        "required": [
          "mode"
        ],
        "properties": {
          "baselineEdition": {
            "title": "Baseline bundled HTS edition",
            "enum": [
              "2026-18",
              "2026-19"
            ],
            "type": "string",
            "description": "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": {
            "title": "Target bundled HTS edition",
            "enum": [
              "2026-18",
              "2026-19"
            ],
            "type": "string",
            "description": "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": {
            "title": "Review mode",
            "enum": [
              "demo",
              "compare",
              "monitor"
            ],
            "type": "string",
            "description": "Choose Demo for fictional examples, Compare for your catalog, or Monitor for a named history comparison.",
            "default": "demo"
          },
          "catalogCsv": {
            "title": "Paste catalog CSV from the template",
            "type": "string",
            "description": "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": {
            "title": "Or supply catalog records",
            "maxItems": 5000,
            "type": "array",
            "description": "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.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "itemId",
                "sku",
                "htsCode",
                "originCountry"
              ],
              "properties": {
                "itemId": {
                  "type": "string",
                  "maxLength": 128,
                  "title": "Item id",
                  "description": "Item id supplied for this review.",
                  "editor": "textfield"
                },
                "sku": {
                  "type": "string",
                  "maxLength": 256,
                  "title": "Sku",
                  "description": "Sku supplied for this review.",
                  "editor": "textfield"
                },
                "htsCode": {
                  "type": "string",
                  "maxLength": 32,
                  "title": "Hts code",
                  "description": "Hts code supplied for this review.",
                  "editor": "textfield"
                },
                "originCountry": {
                  "type": "string",
                  "pattern": "^[A-Z]{2}$",
                  "title": "Origin country",
                  "description": "Origin country supplied for this review.",
                  "editor": "textfield"
                }
              }
            }
          },
          "purchases": {
            "title": "Optional purchase lines joined by itemId",
            "maxItems": 10000,
            "type": "array",
            "description": "Optional purchase lines joined to catalog item IDs; no duty amount is calculated.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "purchaseLineId",
                "itemId"
              ],
              "properties": {
                "purchaseLineId": {
                  "type": "string",
                  "maxLength": 128,
                  "title": "Purchase line id",
                  "description": "Purchase line id supplied for this review.",
                  "editor": "textfield"
                },
                "itemId": {
                  "type": "string",
                  "maxLength": 128,
                  "title": "Item id",
                  "description": "Item id supplied for this review.",
                  "editor": "textfield"
                },
                "declaredCustomsValueUsd": {
                  "type": "string",
                  "title": "Declared customs value usd",
                  "description": "Declared customs value usd supplied for this review.",
                  "nullable": true,
                  "editor": "textfield"
                },
                "plannedEntryDate": {
                  "type": "string",
                  "title": "Planned entry date",
                  "description": "Planned entry date supplied for this review.",
                  "nullable": true,
                  "editor": "textfield"
                },
                "componentFacts": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "column",
                    "entryBasis",
                    "entryAt"
                  ],
                  "properties": {
                    "chapter98Claim": {
                      "type": "boolean",
                      "title": "Chapter98 claim",
                      "description": "Chapter98 claim supplied for this review.",
                      "nullable": true,
                      "editor": "checkbox"
                    },
                    "section232Subject": {
                      "type": "boolean",
                      "title": "Section232 subject",
                      "description": "Section232 subject supplied for this review.",
                      "nullable": true,
                      "editor": "checkbox"
                    },
                    "civilAircraftClaim": {
                      "type": "boolean",
                      "title": "Civil aircraft claim",
                      "description": "Civil aircraft claim supplied for this review.",
                      "nullable": true,
                      "editor": "checkbox"
                    },
                    "personalBaggage": {
                      "type": "boolean",
                      "title": "Personal baggage",
                      "description": "Personal baggage supplied for this review.",
                      "nullable": true,
                      "editor": "checkbox"
                    },
                    "column": {
                      "type": "string",
                      "title": "Column",
                      "description": "Column supplied for this review.",
                      "editor": "textfield"
                    },
                    "entryBasis": {
                      "type": "string",
                      "title": "Entry basis",
                      "description": "Entry basis supplied for this review.",
                      "editor": "textfield"
                    },
                    "entryAt": {
                      "type": "string",
                      "title": "Entry at",
                      "description": "Entry at supplied for this review.",
                      "editor": "textfield"
                    }
                  },
                  "title": "Component facts",
                  "description": "Component facts supplied for this review.",
                  "nullable": true,
                  "editor": "json"
                }
              }
            }
          },
          "baseline": {
            "title": "Prepared baseline source pack",
            "type": "object",
            "description": "Prepared baseline reference pack with retained source provenance; omit to use the bundled edition."
          },
          "target": {
            "title": "Prepared target source pack",
            "type": "object",
            "description": "Prepared target reference pack with retained source provenance; omit to use the bundled edition."
          },
          "state": {
            "title": "Named history store (monitor only)",
            "required": [
              "scopeId"
            ],
            "type": "object",
            "description": "Monitor scope and optional exact baseline. Select the history store in historyStoreId for hosted runs.",
            "properties": {
              "storeId": {
                "type": "string",
                "title": "Store id",
                "description": "History key-value store to read and update across monitor runs.",
                "editor": "textfield",
                "resourceType": "keyValueStore",
                "resourcePermissions": [
                  "READ",
                  "WRITE"
                ]
              },
              "scopeId": {
                "type": "string",
                "title": "Scope id",
                "description": "Stable name for this comparison scope. Use the same value in subsequent monitor runs.",
                "editor": "textfield"
              },
              "baselineSnapshotId": {
                "type": "string",
                "title": "Baseline snapshot id",
                "description": "Optional exact snapshot to compare with instead of the stored history head.",
                "nullable": true,
                "editor": "textfield"
              },
              "recoverySnapshotIds": {
                "type": "array",
                "maxItems": 5,
                "items": {
                  "type": "string"
                },
                "title": "Recovery snapshot ids",
                "description": "Optional retained snapshot IDs for explicit recovery; at most five.",
                "editor": "json"
              }
            },
            "additionalProperties": false
          },
          "purchasesCsv": {
            "title": "Or paste purchase CSV joined by itemId",
            "type": "string",
            "description": "Optional purchase CSV joined by itemId. Supplied USD values are line totals."
          },
          "historyStoreId": {
            "title": "History store",
            "type": "string",
            "description": "For monitor runs, select the history key-value store here and set state.scopeId. If state.storeId is also supplied, it must match."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}