{
  "openapi": "3.1.0",
  "info": {
    "title": "p2-tariff-hscode-calc Open-Data API & Agent Catalog",
    "version": "1.0.0",
    "description": "P2 Data Lab machine-readable B2B dataset and Pro API.",
    "x-polar-products": {
      "portal_tiers": [
        {
          "sku_key": "hs-duty-dataset",
          "product_id": "dadf7985-ef36-42b3-956b-cf8ca6b0643a",
          "name": "Cross-Border HS-Code Duty & Tariff Schedule Dataset (CSV/JSON)",
          "price_usd": 39,
          "billing": "one_time",
          "checkout_url": "https://buy.polar.sh/polar_cl_kCVXGNbbuSSsaS90tHiYwcQMkEPATdNT2QqXV0Wk8hi"
        },
        {
          "sku_key": "pro-bulk-api-license",
          "product_id": "b5f8e130-e509-460b-9f59-761364c04953",
          "name": "Pro Bulk Landed-Cost CSV & API License Key",
          "price_usd": 29,
          "billing": "monthly",
          "checkout_url": "https://buy.polar.sh/polar_cl_V5YAPdk7eioynllqz9kWPezIYzH2I70ASQ60S3t5wZI"
        },
        {
          "sku_key": "importer-audit-pack",
          "product_id": "09fa3e74-af18-4385-bd4a-927f03fc308d",
          "name": "Importer Landed-Cost & Tariff Audit Workbook Pack",
          "price_usd": 89,
          "billing": "one_time",
          "checkout_url": "https://buy.polar.sh/polar_cl_It9yXOTuZH75ktGUTV35Y6W0sF5ByFhVRkoSU14cH3k"
        }
      ],
      "master_all_portals_pass": {
        "master_all_portals_pro_monthly": {
          "product_id": "18e0b844-b764-41f0-9c3d-186362784997",
          "name": "All-Portals Master Pro API & Batch CSV License Key (Monthly)",
          "price_usd": 79,
          "billing": "monthly",
          "checkout_url": "https://buy.polar.sh/polar_cl_0P1axu2nXEDXECK8Z0k7I3sMndeo3hsdqpepv1LUcJT"
        },
        "enterprise_annual_data_pass": {
          "product_id": "8a5266eb-3aaf-4fb3-9aef-0e5bbfd17dc3",
          "name": "Annual Enterprise FinOps & Compliance Data Pass (All Portals)",
          "price_usd": 499,
          "billing": "yearly",
          "checkout_url": "https://buy.polar.sh/polar_cl_SPWfsAxuQAVHif3soxwqbq5zPAdNZFkN5CtQK3cZRft"
        }
      }
    }
  },
  "externalDocs": {
    "description": "AI-Agent & MCP Tool Discovery Catalog",
    "url": "https://p2-tariff-hscode-calc.pages.dev/agent-catalog.json"
  },
  "servers": [
    {
      "url": "https://p2-tariff-hscode-calc.pages.dev",
      "description": "Public static Pages dataset & discovery server"
    },
    {
      "url": "https://p2-core-api.evsmtoken.workers.dev",
      "description": "Authenticated P2 Core Pro API"
    }
  ],
  "paths": {
    "/data/meta.json": {
      "get": {
        "operationId": "getPortalMeta",
        "summary": "Get live dataset freshness metadata and upstream source list",
        "servers": [
          {
            "url": "https://p2-tariff-hscode-calc.pages.dev"
          }
        ],
        "responses": {
          "200": {
            "description": "Metadata JSON with fetched_at, record_count, and sources",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "operationId": "getLlmsTxt",
        "summary": "Get LLM-readable portal summary and endpoint directory",
        "servers": [
          {
            "url": "https://p2-tariff-hscode-calc.pages.dev"
          }
        ],
        "responses": {
          "200": {
            "description": "Plain text discovery guide",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v1/license/verify": {
      "post": {
        "operationId": "verifyPolarLicense",
        "summary": "Verify a Polar.sh Pro License Key via p2-core-api",
        "servers": [
          {
            "url": "https://p2-core-api.evsmtoken.workers.dev"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "key"
                ],
                "properties": {
                  "key": {
                    "type": "string"
                  },
                  "portal": {
                    "type": "string",
                    "default": "p2-tariff-hscode-calc"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "License verification result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v1/pro/p2-tariff-hscode-calc/dataset": {
      "get": {
        "operationId": "getProDataset",
        "summary": "Fetch authenticated full Pro JSON dataset for p2-tariff-hscode-calc",
        "servers": [
          {
            "url": "https://p2-core-api.evsmtoken.workers.dev"
          }
        ],
        "security": [
          {
            "PolarBearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Full Pro dataset JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid Polar License Key"
          }
        }
      }
    },
    "/data/fx.json": {
      "get": {
        "operationId": "getPublic_fx_json",
        "summary": "Get public live open-data benchmark JSON (fx.json)",
        "servers": [
          {
            "url": "https://p2-tariff-hscode-calc.pages.dev"
          }
        ],
        "responses": {
          "200": {
            "description": "Public benchmark dataset JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/data/tariffs.json": {
      "get": {
        "operationId": "getPublic_tariffs_json",
        "summary": "Get public live open-data benchmark JSON (tariffs.json)",
        "servers": [
          {
            "url": "https://p2-tariff-hscode-calc.pages.dev"
          }
        ],
        "responses": {
          "200": {
            "description": "Public benchmark dataset JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "PolarBearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Polar License Key"
      }
    }
  }
}