{
  "openapi": "3.0.1",
  "info": {
    "title": "USITC Trade Remedy Intelligence MCP — Section 337 & Trade",
    "description": "The USITC Trade Intelligence MCP is an Apify actor that exposes US international trade data via the Model Context Protocol. It gives AI assistants — Claude, GPT-4, and any MCP-compatible agent — structured access to two critical trade intelligence datasets:",
    "version": "0.1",
    "x-build-id": "ROcMFR2nLT7ohr5GQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/andrew_avina~usitc-intelligence-mcp/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-andrew_avina-usitc-intelligence-mcp",
        "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/andrew_avina~usitc-intelligence-mcp/runs": {
      "post": {
        "operationId": "runs-sync-andrew_avina-usitc-intelligence-mcp",
        "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/andrew_avina~usitc-intelligence-mcp/run-sync": {
      "post": {
        "operationId": "run-sync-andrew_avina-usitc-intelligence-mcp",
        "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": "Query Mode",
            "enum": [
              "trade",
              "337",
              "countries"
            ],
            "type": "string",
            "description": "What to query: trade statistics, Section 337 IP investigations, or top import country rankings",
            "default": "trade"
          },
          "hts_code": {
            "title": "HTS Code",
            "type": "string",
            "description": "4-10 digit Harmonized Tariff Schedule code for trade data queries. Examples: '8703' (automobiles), '8471' (computers), '8517' (smartphones), '8541' (semiconductors), '2709' (petroleum), '0901' (coffee), '6110' (sweaters/knitwear). Required for modes: trade, countries.",
            "default": "8471"
          },
          "tradeType": {
            "title": "Trade Type",
            "enum": [
              "imports",
              "exports"
            ],
            "type": "string",
            "description": "Whether to query US import data (goods entering the US) or export data (goods leaving the US)",
            "default": "imports"
          },
          "year": {
            "title": "Data Year",
            "minimum": 2010,
            "maximum": 2024,
            "type": "integer",
            "description": "Year for trade statistics (e.g. 2023, 2022, 2021). Census Bureau data typically available with 1-2 year lag.",
            "default": 2023
          },
          "countryCode": {
            "title": "Country Code (Trade Data)",
            "type": "string",
            "description": "Optional Census Bureau 4-character country code to filter trade data to a single country. Examples: '5700' (China), '2010' (Canada), '2030' (Mexico), '4120' (Germany), '5880' (Japan). Leave blank for all countries.",
            "default": ""
          },
          "query": {
            "title": "Search Query (Section 337 Mode)",
            "type": "string",
            "description": "Keyword search for Section 337 investigations. Searches title, product, technology, complainant, and respondent. Examples: 'battery', 'semiconductor', 'Apple', 'OLED', 'solar', 'EV', 'AI chip'.",
            "default": ""
          },
          "status": {
            "title": "Investigation Status (Section 337 Mode)",
            "type": "string",
            "description": "Filter Section 337 investigations by status: 'Active', 'Terminated', 'Settlement', 'Import Ban'",
            "default": ""
          },
          "respondent": {
            "title": "Respondent Company (Section 337 Mode)",
            "type": "string",
            "description": "Filter Section 337 investigations by respondent (defendant) company name (e.g. 'Apple', 'NVIDIA', 'Samsung')",
            "default": ""
          },
          "technology": {
            "title": "Technology Area (Section 337 Mode)",
            "type": "string",
            "description": "Filter Section 337 investigations by technology area (e.g. 'semiconductor', 'battery', 'solar', 'AI', 'robotics')",
            "default": ""
          },
          "limit": {
            "title": "Result Limit",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum number of records to return (max 100)",
            "default": 20
          },
          "serveMcp": {
            "title": "MCP Server Mode",
            "type": "boolean",
            "description": "When enabled, starts an MCP-compatible HTTP server on port 4321 instead of returning a batch dataset. Use this to connect Claude Desktop or any MCP client directly to USITC trade intelligence.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}