{
  "openapi": "3.0.1",
  "info": {
    "title": "HS Code Duties and Trade Flows: US EU CA AU",
    "description": "One record per 6-digit HS code: base import duty rate in the US, EU, Canada and Australia, crossed with real EU27 trade flows (value, weight, top 3 partners). Pay per record.",
    "version": "1.0",
    "x-build-id": "XSRIHcPpJYphY2ich"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/phonic_lily~hs-code-duties-and-trade-flows/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-phonic_lily-hs-code-duties-and-trade-flows",
        "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/phonic_lily~hs-code-duties-and-trade-flows/runs": {
      "post": {
        "operationId": "runs-sync-phonic_lily-hs-code-duties-and-trade-flows",
        "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/phonic_lily~hs-code-duties-and-trade-flows/run-sync": {
      "post": {
        "operationId": "run-sync-phonic_lily-hs-code-duties-and-trade-flows",
        "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": {
          "hsPrefix": {
            "title": "HS code prefix",
            "type": "string",
            "description": "HS chapter (2 digits), heading (4 digits) or full HS6 (6 digits), e.g. 85, 8517 or 851762. Dots and spaces are ignored. Matches the start of the HS6 code."
          },
          "query": {
            "title": "Description text",
            "type": "string",
            "description": "Word or phrase searched in the Eurostat HS6 description, e.g. 'lithium' or 'motor cars'. Accent- and case-insensitive."
          },
          "importPartners": {
            "title": "EU27 import partner countries (top 3)",
            "type": "array",
            "description": "ISO 2-letter country codes, e.g. CN, US, TR. Keeps HS6 codes where at least one listed country is among the top 3 suppliers of EU27 imports. Records without a partner list never match.",
            "items": {
              "type": "string"
            }
          },
          "exportPartners": {
            "title": "EU27 export partner countries (top 3)",
            "type": "array",
            "description": "ISO 2-letter country codes, e.g. US, GB, CH. Keeps HS6 codes where at least one listed country is among the top 3 destinations of EU27 exports. Records without a partner list never match.",
            "items": {
              "type": "string"
            }
          },
          "minImportValueEur": {
            "title": "Min EU27 import value (EUR)",
            "type": "number",
            "description": "Minimum extra-EU27 import value in EUR for 2025. Records with an empty value never match."
          },
          "maxImportValueEur": {
            "title": "Max EU27 import value (EUR)",
            "type": "number",
            "description": "Maximum extra-EU27 import value in EUR for 2025. Records with an empty value never match."
          },
          "minExportValueEur": {
            "title": "Min EU27 export value (EUR)",
            "type": "number",
            "description": "Minimum extra-EU27 export value in EUR for 2025. Records with an empty value never match."
          },
          "maxExportValueEur": {
            "title": "Max EU27 export value (EUR)",
            "type": "number",
            "description": "Maximum extra-EU27 export value in EUR for 2025. Records with an empty value never match."
          },
          "minUsRatePct": {
            "title": "Min US base rate (%)",
            "type": "number",
            "description": "Minimum US base duty rate in percent. Records whose US rate is null (not a single plain ad valorem rate) never match."
          },
          "maxUsRatePct": {
            "title": "Max US base rate (%)",
            "type": "number",
            "description": "Maximum US base duty rate in percent; use 0 for duty-free. Records whose US rate is null never match."
          },
          "minEuRatePct": {
            "title": "Min EU base rate (%)",
            "type": "number",
            "description": "Minimum EU third-country duty in percent. Records whose EU rate is null never match."
          },
          "maxEuRatePct": {
            "title": "Max EU base rate (%)",
            "type": "number",
            "description": "Maximum EU third-country duty in percent; use 0 for duty-free. Records whose EU rate is null never match."
          },
          "minCaRatePct": {
            "title": "Min Canada base rate (%)",
            "type": "number",
            "description": "Minimum Canada MFN duty in percent. Records whose Canada rate is null never match."
          },
          "maxCaRatePct": {
            "title": "Max Canada base rate (%)",
            "type": "number",
            "description": "Maximum Canada MFN duty in percent; use 0 for duty-free. Records whose Canada rate is null never match."
          },
          "minAuRatePct": {
            "title": "Min Australia base rate (%)",
            "type": "number",
            "description": "Minimum Australia general duty in percent. Records whose Australia rate is null never match."
          },
          "maxAuRatePct": {
            "title": "Max Australia base rate (%)",
            "type": "number",
            "description": "Maximum Australia general duty in percent; use 0 for duty-free. Records whose Australia rate is null never match."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "hs6",
              "importValueDesc",
              "exportValueDesc"
            ],
            "type": "string",
            "description": "Sort order of results. Default: file order (or distance when a radius is given)."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum records returned and billed (1..10000).",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}