{
  "openapi": "3.1.0",
  "info": {
    "title": "DBU Watch API",
    "version": "1.0.0",
    "summary": "Read-only Databricks DBU list prices for AWS, Azure and GCP, with history and bill estimates.",
    "description": "Free, read-only JSON API over DBU Watch: current Databricks list and pay-as-you-go prices for every product, tier and region on AWS, Azure and GCP, refreshed daily from public price sources, plus price history, cross-cloud comparisons and bill estimates. Prices are USD before discounts. Every response carries `as_of`. No authentication. CORS is open for GET. Errors are RFC 9457 problem details (`application/problem+json`, schema `Problem`). Rate limit: 120 requests/minute per client address, enforced per server instance (best effort), advertised with the IETF `RateLimit` and `RateLimit-Policy` headers. Versioning: breaking changes get a new `/api/v2/`; `/api/v1/` stays stable.",
    "contact": {
      "name": "DBU Watch",
      "email": "hello@dbuwatch.com",
      "url": "https://www.dbuwatch.com/contact/"
    },
    "license": {
      "name": "CC BY 4.0 (data)",
      "identifier": "CC-BY-4.0"
    },
    "termsOfService": "https://www.dbuwatch.com/terms/"
  },
  "externalDocs": {
    "description": "API and MCP server docs",
    "url": "https://www.dbuwatch.com/api/"
  },
  "servers": [
    {
      "url": "https://www.dbuwatch.com/api/v1",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Dataset"
    },
    {
      "name": "Prices"
    },
    {
      "name": "Estimates"
    },
    {
      "name": "History"
    }
  ],
  "paths": {
    "/": {
      "get": {
        "operationId": "getIndex",
        "tags": [
          "Dataset"
        ],
        "summary": "API index",
        "description": "Name, version, data date, links to docs, spec and MCP server, and the endpoint list.",
        "responses": {
          "200": {
            "description": "Index",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Index"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/meta": {
      "get": {
        "operationId": "getMeta",
        "tags": [
          "Dataset"
        ],
        "summary": "Dataset metadata",
        "description": "Snapshot date, record counts per cloud, sources, price types, caveats, license and citation.",
        "responses": {
          "200": {
            "description": "Metadata",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Meta"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/prices": {
      "get": {
        "operationId": "listPrices",
        "tags": [
          "Prices"
        ],
        "summary": "List and filter prices",
        "description": "Current Databricks price records for AWS, Azure and GCP. Filter by cloud, product, tier, region, unit, price type, free text or id; sort and paginate with limit and next_offset.",
        "parameters": [
          {
            "$ref": "#/components/parameters/cloud"
          },
          {
            "$ref": "#/components/parameters/product"
          },
          {
            "$ref": "#/components/parameters/tier"
          },
          {
            "$ref": "#/components/parameters/region"
          },
          {
            "$ref": "#/components/parameters/unit"
          },
          {
            "$ref": "#/components/parameters/price_type"
          },
          {
            "$ref": "#/components/parameters/q"
          },
          {
            "$ref": "#/components/parameters/id"
          },
          {
            "$ref": "#/components/parameters/sort"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/offset"
          }
        ],
        "responses": {
          "200": {
            "description": "Price records",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PriceList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/products": {
      "get": {
        "operationId": "listProducts",
        "tags": [
          "Prices"
        ],
        "summary": "List products",
        "description": "Every product per cloud with its tiers, units, price types, region count and price range.",
        "parameters": [
          {
            "$ref": "#/components/parameters/cloud"
          }
        ],
        "responses": {
          "200": {
            "description": "Products",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/families": {
      "get": {
        "operationId": "listFamilies",
        "tags": [
          "Prices"
        ],
        "summary": "List product families",
        "description": "Cross-cloud product families, usable wherever a product is accepted: `jobs` means Jobs Compute on all three clouds.",
        "responses": {
          "200": {
            "description": "Families",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FamilyList"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/regions": {
      "get": {
        "operationId": "listRegions",
        "tags": [
          "Prices"
        ],
        "summary": "List regions",
        "description": "Regions per cloud with record and product counts. AWS and GCP classic compute uses one list price for all regions (`all`).",
        "parameters": [
          {
            "$ref": "#/components/parameters/cloud"
          }
        ],
        "responses": {
          "200": {
            "description": "Regions",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegionList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/compare": {
      "get": {
        "operationId": "comparePrices",
        "tags": [
          "Prices"
        ],
        "summary": "Compare one product across clouds",
        "description": "The $/DBU list price for one product on AWS, Azure and GCP side by side, with each cloud's min and max across regions and the cheapest cloud per DBU.",
        "parameters": [
          {
            "name": "product",
            "in": "query",
            "required": true,
            "description": "Product name or family key.",
            "schema": {
              "type": "string"
            },
            "example": "jobs"
          },
          {
            "name": "tier",
            "in": "query",
            "required": false,
            "description": "Plan tier (default Premium).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "azure_region",
            "in": "query",
            "required": false,
            "description": "Azure ARM region (default eastus).",
            "schema": {
              "type": "string"
            },
            "example": "westeurope"
          },
          {
            "name": "aws_region",
            "in": "query",
            "required": false,
            "description": "AWS region name for regional (serverless) prices.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "gcp_region",
            "in": "query",
            "required": false,
            "description": "GCP region name for regional (serverless) prices.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Comparison",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComparisonResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/estimate": {
      "get": {
        "operationId": "estimateBill",
        "tags": [
          "Estimates"
        ],
        "summary": "Estimate a Databricks bill",
        "description": "DBUs x $/DBU, plus the VM on-demand list price for classic compute when that price is in the data. When it is not, `vm.included` is false and the total covers DBUs only: VM prices are never guessed.",
        "parameters": [
          {
            "name": "cloud",
            "in": "query",
            "required": true,
            "description": "Cloud.",
            "schema": {
              "type": "string",
              "enum": [
                "AWS",
                "Azure",
                "GCP"
              ]
            },
            "example": "AWS"
          },
          {
            "name": "product",
            "in": "query",
            "required": true,
            "description": "Product name or family key (see `product` above).",
            "schema": {
              "type": "string"
            },
            "example": "jobs"
          },
          {
            "name": "tier",
            "in": "query",
            "required": false,
            "description": "Plan tier (default Premium).",
            "schema": {
              "type": "string"
            },
            "example": "Premium"
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "description": "AWS/GCP: databricks.com region name (`US East (N. Virginia)`) or region code (`us-east-1`, `us-central1`); Azure: ARM name (`eastus`). Defaults: us-east-1 / us-central1 / eastus.",
            "schema": {
              "type": "string"
            },
            "example": "us-east-1"
          },
          {
            "name": "instance",
            "in": "query",
            "required": false,
            "description": "Classic compute instance type (`m5d.2xlarge`, `n2-standard-8`, `d8dsv5`). Use this or dbu_per_hour.",
            "schema": {
              "type": "string"
            },
            "example": "m5d.2xlarge"
          },
          {
            "name": "dbu_per_hour",
            "in": "query",
            "required": false,
            "description": "DBUs per hour per node. Use this or instance (required for serverless and SQL).",
            "schema": {
              "type": "number",
              "exclusiveMinimum": 0,
              "maximum": 100000
            }
          },
          {
            "name": "nodes",
            "in": "query",
            "required": false,
            "description": "Nodes (driver + workers).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 1
            },
            "example": 4
          },
          {
            "name": "hours",
            "in": "query",
            "required": false,
            "description": "Hours in the period (730 = a month always on).",
            "schema": {
              "type": "number",
              "exclusiveMinimum": 0,
              "maximum": 8784,
              "default": 730
            },
            "example": 200
          }
        ],
        "responses": {
          "200": {
            "description": "Estimate",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EstimateResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/history": {
      "get": {
        "operationId": "listHistory",
        "tags": [
          "History"
        ],
        "summary": "Price history",
        "description": "Price series with every observation: daily captures since October 2026 plus archived observations back to 2019, each linked to its source.",
        "parameters": [
          {
            "$ref": "#/components/parameters/cloud"
          },
          {
            "$ref": "#/components/parameters/product"
          },
          {
            "$ref": "#/components/parameters/tier"
          },
          {
            "$ref": "#/components/parameters/region"
          },
          {
            "$ref": "#/components/parameters/since"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Max series (1-100).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "History series",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HistoryResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    },
    "/changes": {
      "get": {
        "operationId": "listChanges",
        "tags": [
          "History"
        ],
        "summary": "Daily change log",
        "description": "One entry per daily run with the price changes, new SKUs and removed SKUs found.",
        "parameters": [
          {
            "$ref": "#/components/parameters/since"
          }
        ],
        "responses": {
          "200": {
            "description": "Runs",
            "headers": {
              "ETag": {
                "$ref": "#/components/headers/ETag"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimitPolicy"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChangesResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "cloud": {
        "name": "cloud",
        "in": "query",
        "required": false,
        "description": "Cloud (case-insensitive).",
        "schema": {
          "type": "string",
          "enum": [
            "AWS",
            "Azure",
            "GCP"
          ]
        },
        "example": "AWS"
      },
      "product": {
        "name": "product",
        "in": "query",
        "required": false,
        "description": "Product name as listed (e.g. `Jobs Compute`, `SQL Serverless Compute`; case-insensitive) or a cross-cloud family key: jobs, jobs_photon, all_purpose, all_purpose_photon, jobs_light, dlt_core, dlt_core_photon, dlt_pro, dlt_pro_photon, dlt_advanced, dlt_advanced_photon, sql_classic, sql_pro, sql_serverless, serverless_jobs, serverless_interactive.",
        "schema": {
          "type": "string"
        },
        "example": "Jobs Compute"
      },
      "tier": {
        "name": "tier",
        "in": "query",
        "required": false,
        "description": "Plan tier: Premium, Enterprise (AWS/GCP), Standard (Azure).",
        "schema": {
          "type": "string"
        },
        "example": "Premium"
      },
      "region": {
        "name": "region",
        "in": "query",
        "required": false,
        "description": "Region code or name as listed by /regions (AWS/GCP classic list prices use `all`; Azure uses ARM names such as `eastus`).",
        "schema": {
          "type": "string"
        },
        "example": "eastus"
      },
      "unit": {
        "name": "unit",
        "in": "query",
        "required": false,
        "description": "Unit of measure, e.g. `1 Hour (DBU)`.",
        "schema": {
          "type": "string"
        }
      },
      "price_type": {
        "name": "price_type",
        "in": "query",
        "required": false,
        "description": "List (databricks.com), Consumption (Azure pay-as-you-go) or Reservation (Azure pre-purchase).",
        "schema": {
          "type": "string",
          "enum": [
            "List",
            "Consumption",
            "Reservation"
          ]
        }
      },
      "q": {
        "name": "q",
        "in": "query",
        "required": false,
        "description": "Free-text filter over product, region and meter names (case- and punctuation-insensitive).",
        "schema": {
          "type": "string"
        },
        "example": "serverless"
      },
      "id": {
        "name": "id",
        "in": "query",
        "required": false,
        "description": "Exact record id from a previous response.",
        "schema": {
          "type": "string"
        }
      },
      "sort": {
        "name": "sort",
        "in": "query",
        "required": false,
        "description": "Sort order.",
        "schema": {
          "type": "string",
          "enum": [
            "cloud",
            "price",
            "-price",
            "product",
            "region"
          ],
          "default": "cloud"
        }
      },
      "limit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "description": "Max records (1-500).",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 500,
          "default": 100
        }
      },
      "offset": {
        "name": "offset",
        "in": "query",
        "required": false,
        "description": "Records to skip (pagination; use next_offset).",
        "schema": {
          "type": "integer",
          "minimum": 0,
          "default": 0
        }
      },
      "since": {
        "name": "since",
        "in": "query",
        "required": false,
        "description": "Only entries on or after this date (YYYY-MM-DD).",
        "schema": {
          "type": "string",
          "format": "date"
        },
        "example": "2026-10-15"
      }
    },
    "headers": {
      "ETag": {
        "description": "Weak validator; send If-None-Match for a 304.",
        "schema": {
          "type": "string"
        }
      },
      "RateLimit": {
        "description": "IETF draft RateLimit field: remaining quota (r) and seconds to reset (t).",
        "schema": {
          "type": "string"
        }
      },
      "RateLimitPolicy": {
        "description": "IETF draft RateLimit-Policy field: quota (q) per window (w seconds).",
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "Invalid parameter",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      },
      "NotFound": {
        "description": "Unknown endpoint, product, price or instance",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "Rate limited; see Retry-After",
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      },
      "InternalError": {
        "description": "Unexpected error",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Problem"
            }
          }
        }
      }
    },
    "schemas": {
      "Problem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "format": "uri",
            "description": "URI of the error description on the docs page."
          },
          "title": {
            "type": "string",
            "description": "Short summary."
          },
          "status": {
            "type": "integer",
            "description": "HTTP status."
          },
          "detail": {
            "type": "string",
            "description": "What went wrong."
          },
          "instance": {
            "type": "string",
            "description": "Request path."
          },
          "code": {
            "type": "string",
            "description": "Stable error code.",
            "enum": [
              "not_found",
              "product_not_found",
              "price_not_found",
              "instance_not_found",
              "invalid_parameter",
              "method_not_allowed",
              "payload_too_large",
              "rate_limited",
              "internal_error"
            ]
          },
          "hint": {
            "type": "string",
            "description": "What to do next."
          },
          "suggestions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Close matches for an unknown name."
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "detail",
          "code"
        ],
        "description": "RFC 9457 problem details. Every 4xx/5xx response uses this schema."
      },
      "Price": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable record id."
          },
          "cloud": {
            "type": "string",
            "enum": [
              "AWS",
              "Azure",
              "GCP"
            ]
          },
          "product": {
            "type": "string"
          },
          "tier": {
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "type": "string",
            "description": "Region code (`all` = one price for all regions)."
          },
          "region_name": {
            "type": "string"
          },
          "unit": {
            "type": "string",
            "description": "Unit of measure, e.g. `1 Hour (DBU)` = price per DBU."
          },
          "price_usd": {
            "type": "number",
            "description": "List / pay-as-you-go price in USD per unit."
          },
          "price_type": {
            "type": "string",
            "enum": [
              "List",
              "Consumption",
              "Reservation"
            ]
          },
          "effective": {
            "type": [
              "string",
              "null"
            ],
            "description": "Azure effectiveStartDate, when given."
          },
          "source": {
            "type": "string",
            "description": "Source key (see /meta sources)."
          },
          "source_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "meter": {
            "type": "string",
            "description": "Azure meter name."
          },
          "sku_id": {
            "type": "string",
            "description": "Azure SKU id."
          }
        },
        "required": [
          "id",
          "cloud",
          "product",
          "tier",
          "region",
          "region_name",
          "unit",
          "price_usd",
          "price_type",
          "source"
        ]
      },
      "PriceList": {
        "type": "object",
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date",
            "description": "Date of the price snapshot (UTC)."
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "source": {
            "type": "string",
            "description": "Citation line."
          },
          "count": {
            "type": "integer"
          },
          "total": {
            "type": "integer",
            "description": "Records matching the filters."
          },
          "offset": {
            "type": "integer"
          },
          "next_offset": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Offset of the next page, or null."
          },
          "filters": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Price"
            }
          }
        },
        "required": [
          "as_of",
          "generated_at",
          "source",
          "count",
          "total",
          "offset",
          "next_offset",
          "data"
        ]
      },
      "Product": {
        "type": "object",
        "properties": {
          "cloud": {
            "type": "string",
            "enum": [
              "AWS",
              "Azure",
              "GCP"
            ]
          },
          "product": {
            "type": "string"
          },
          "family": {
            "type": [
              "string",
              "null"
            ],
            "description": "Cross-cloud family key, when the product belongs to one."
          },
          "tiers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "units": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "price_types": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "regions": {
            "type": "integer"
          },
          "records": {
            "type": "integer"
          },
          "min_price_usd": {
            "type": "number"
          },
          "max_price_usd": {
            "type": "number"
          }
        },
        "required": [
          "cloud",
          "product",
          "family",
          "tiers",
          "units",
          "price_types",
          "regions",
          "records",
          "min_price_usd",
          "max_price_usd"
        ]
      },
      "ProductList": {
        "type": "object",
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date",
            "description": "Date of the price snapshot (UTC)."
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "source": {
            "type": "string",
            "description": "Citation line."
          },
          "count": {
            "type": "integer"
          },
          "filters": {
            "type": "object"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Product"
            }
          }
        },
        "required": [
          "as_of",
          "generated_at",
          "source",
          "count",
          "data"
        ]
      },
      "Family": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "enum": [
              "jobs",
              "jobs_photon",
              "all_purpose",
              "all_purpose_photon",
              "jobs_light",
              "dlt_core",
              "dlt_core_photon",
              "dlt_pro",
              "dlt_pro_photon",
              "dlt_advanced",
              "dlt_advanced_photon",
              "sql_classic",
              "sql_pro",
              "sql_serverless",
              "serverless_jobs",
              "serverless_interactive"
            ]
          },
          "label": {
            "type": "string"
          },
          "classic": {
            "type": "boolean",
            "description": "Classic compute (instance-based DBU ratings apply)."
          },
          "photon": {
            "type": "boolean"
          },
          "serverless": {
            "type": "boolean"
          },
          "products": {
            "type": "object",
            "properties": {
              "AWS": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "Azure": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "GCP": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "AWS",
              "Azure",
              "GCP"
            ]
          }
        },
        "required": [
          "key",
          "label",
          "classic",
          "photon",
          "serverless",
          "products"
        ]
      },
      "FamilyList": {
        "type": "object",
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date",
            "description": "Date of the price snapshot (UTC)."
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "source": {
            "type": "string",
            "description": "Citation line."
          },
          "count": {
            "type": "integer"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Family"
            }
          }
        },
        "required": [
          "as_of",
          "generated_at",
          "source",
          "count",
          "data"
        ]
      },
      "Region": {
        "type": "object",
        "properties": {
          "cloud": {
            "type": "string",
            "enum": [
              "AWS",
              "Azure",
              "GCP"
            ]
          },
          "region": {
            "type": "string"
          },
          "region_name": {
            "type": "string"
          },
          "records": {
            "type": "integer"
          },
          "products": {
            "type": "integer"
          }
        },
        "required": [
          "cloud",
          "region",
          "region_name",
          "records",
          "products"
        ]
      },
      "RegionList": {
        "type": "object",
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date",
            "description": "Date of the price snapshot (UTC)."
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "source": {
            "type": "string",
            "description": "Citation line."
          },
          "count": {
            "type": "integer"
          },
          "filters": {
            "type": "object"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Region"
            }
          }
        },
        "required": [
          "as_of",
          "generated_at",
          "source",
          "count",
          "data"
        ]
      },
      "CloudPrice": {
        "type": "object",
        "properties": {
          "cloud": {
            "type": "string",
            "enum": [
              "AWS",
              "Azure",
              "GCP"
            ]
          },
          "product": {
            "type": [
              "string",
              "null"
            ]
          },
          "available": {
            "type": "boolean"
          },
          "tier": {
            "type": "string"
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "region_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "price_usd_per_dbu": {
            "type": [
              "number",
              "null"
            ]
          },
          "unit": {
            "type": "string"
          },
          "price_type": {
            "type": "string"
          },
          "min_price_usd_per_dbu": {
            "type": "number"
          },
          "max_price_usd_per_dbu": {
            "type": "number"
          },
          "regions_priced": {
            "type": "integer"
          },
          "id": {
            "type": [
              "string",
              "null"
            ]
          },
          "source_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "note": {
            "type": "string"
          }
        },
        "required": [
          "cloud",
          "product",
          "available"
        ]
      },
      "Comparison": {
        "type": "object",
        "properties": {
          "as_of": {
            "type": "string"
          },
          "product_query": {
            "type": "string"
          },
          "family": {
            "type": [
              "string",
              "null"
            ]
          },
          "family_label": {
            "type": [
              "string",
              "null"
            ]
          },
          "tier": {
            "type": "string"
          },
          "clouds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CloudPrice"
            }
          },
          "cheapest_clouds": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "AWS",
                "Azure",
                "GCP"
              ]
            }
          },
          "note": {
            "type": "string"
          }
        },
        "required": [
          "as_of",
          "product_query",
          "tier",
          "clouds",
          "cheapest_clouds"
        ]
      },
      "ComparisonResponse": {
        "type": "object",
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date",
            "description": "Date of the price snapshot (UTC)."
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "source": {
            "type": "string",
            "description": "Citation line."
          },
          "data": {
            "$ref": "#/components/schemas/Comparison"
          }
        },
        "required": [
          "as_of",
          "generated_at",
          "source",
          "data"
        ]
      },
      "DbuRate": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "product": {
            "type": "string"
          },
          "tier": {
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "type": "string"
          },
          "region_name": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "price_usd_per_dbu": {
            "type": "number"
          },
          "price_type": {
            "type": "string"
          },
          "effective": {
            "type": [
              "string",
              "null"
            ]
          },
          "source_url": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "product",
          "region",
          "unit",
          "price_usd_per_dbu",
          "price_type"
        ]
      },
      "Estimate": {
        "type": "object",
        "properties": {
          "as_of": {
            "type": "string"
          },
          "cloud": {
            "type": "string",
            "enum": [
              "AWS",
              "Azure",
              "GCP"
            ]
          },
          "product": {
            "type": "string"
          },
          "tier": {
            "type": "string"
          },
          "hours": {
            "type": "number"
          },
          "nodes": {
            "type": "integer"
          },
          "instance": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              },
              "vcpu": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "memory_gb": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "dbu_per_hour": {
                "type": "number"
              },
              "source_url": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "description": "The instance and its DBU/hour rating (null when dbu_per_hour was given)."
          },
          "dbu_per_hour_per_node": {
            "type": "number"
          },
          "dbus": {
            "type": "number",
            "description": "DBU/hour x nodes x hours."
          },
          "dbu_rate": {
            "$ref": "#/components/schemas/DbuRate"
          },
          "dbu_cost_usd": {
            "type": "number"
          },
          "vm": {
            "type": "object",
            "properties": {
              "included": {
                "type": "boolean",
                "description": "False when no VM list price is in the data (never estimated) or the product is serverless."
              },
              "region": {
                "type": "string"
              },
              "price_per_hour_usd": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "cost_usd": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "basis": {
                "type": "string"
              },
              "source_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "fetched_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "reason": {
                "type": "string",
                "description": "Why the VM cost is not included."
              }
            },
            "required": [
              "included",
              "price_per_hour_usd",
              "cost_usd"
            ]
          },
          "total_usd": {
            "type": "number",
            "description": "dbu_cost_usd + vm.cost_usd (when included)."
          },
          "total_includes_vm": {
            "type": "boolean"
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "as_of",
          "cloud",
          "product",
          "tier",
          "hours",
          "nodes",
          "dbu_per_hour_per_node",
          "dbus",
          "dbu_rate",
          "dbu_cost_usd",
          "vm",
          "total_usd",
          "total_includes_vm",
          "notes"
        ]
      },
      "EstimateResponse": {
        "type": "object",
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date",
            "description": "Date of the price snapshot (UTC)."
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "source": {
            "type": "string",
            "description": "Citation line."
          },
          "data": {
            "$ref": "#/components/schemas/Estimate"
          }
        },
        "required": [
          "as_of",
          "generated_at",
          "source",
          "data"
        ]
      },
      "HistoryPoint": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "description": "Date observed (or Azure effective date)."
          },
          "price_usd": {
            "type": "number"
          },
          "kind": {
            "type": "string",
            "enum": [
              "daily_capture",
              "archived_page",
              "azure_effective_date"
            ]
          },
          "last_seen": {
            "type": "string",
            "format": "date"
          },
          "source_url": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "date",
          "price_usd",
          "kind",
          "last_seen",
          "source_url"
        ]
      },
      "HistorySeries": {
        "type": "object",
        "properties": {
          "cloud": {
            "type": "string",
            "enum": [
              "AWS",
              "Azure",
              "GCP"
            ]
          },
          "product": {
            "type": "string"
          },
          "tier": {
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "type": "string"
          },
          "region_name": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "current_price_usd": {
            "type": [
              "number",
              "null"
            ]
          },
          "first_observed": {
            "type": [
              "string",
              "null"
            ]
          },
          "observations": {
            "type": "integer"
          },
          "price_changes": {
            "type": "integer"
          },
          "points": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HistoryPoint"
            }
          }
        },
        "required": [
          "cloud",
          "product",
          "tier",
          "region",
          "unit",
          "current_price_usd",
          "observations",
          "price_changes",
          "points"
        ]
      },
      "HistoryResponse": {
        "type": "object",
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date",
            "description": "Date of the price snapshot (UTC)."
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "source": {
            "type": "string",
            "description": "Citation line."
          },
          "total": {
            "type": "integer"
          },
          "count": {
            "type": "integer"
          },
          "series": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HistorySeries"
            }
          },
          "filters": {
            "type": "object"
          }
        },
        "required": [
          "as_of",
          "generated_at",
          "source",
          "total",
          "count",
          "series"
        ]
      },
      "ChangeRun": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "baseline": {
            "type": "boolean",
            "description": "First run (no previous snapshot to compare)."
          },
          "records": {
            "type": "integer"
          },
          "change_count": {
            "type": "integer"
          },
          "changes": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "One price change, new SKU or removed SKU, as recorded by the daily job."
            }
          }
        },
        "required": [
          "date",
          "at",
          "baseline",
          "records",
          "change_count",
          "changes"
        ]
      },
      "ChangesResponse": {
        "type": "object",
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date",
            "description": "Date of the price snapshot (UTC)."
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "source": {
            "type": "string",
            "description": "Citation line."
          },
          "count": {
            "type": "integer"
          },
          "runs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChangeRun"
            }
          },
          "filters": {
            "type": "object"
          }
        },
        "required": [
          "as_of",
          "generated_at",
          "source",
          "count",
          "runs"
        ]
      },
      "Meta": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "as_of": {
            "type": "string"
          },
          "generated_at": {
            "type": "string"
          },
          "records": {
            "type": "integer"
          },
          "counts": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "products": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "history": {
            "type": "object",
            "properties": {
              "series": {
                "type": "integer"
              },
              "first_date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "daily_since": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "vm_prices": {
            "type": "object"
          },
          "sources": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "source_errors": {
            "type": "object"
          },
          "price_types": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "caveats": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "license": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            }
          },
          "citation": {
            "type": "string"
          },
          "docs": {
            "type": "string"
          },
          "contact": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "version",
          "as_of",
          "generated_at",
          "records",
          "counts",
          "sources",
          "caveats",
          "license",
          "citation"
        ]
      },
      "Index": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "as_of": {
            "type": "string"
          },
          "docs": {
            "type": "string"
          },
          "openapi": {
            "type": "string"
          },
          "mcp": {
            "type": "string"
          },
          "license": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            }
          },
          "endpoints": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                }
              },
              "required": [
                "path",
                "description"
              ]
            }
          }
        },
        "required": [
          "name",
          "version",
          "as_of",
          "endpoints"
        ]
      }
    }
  }
}
