{
  "openapi": "3.1.0",
  "info": {
    "title": "COLO BIRD Infrastructure Product API",
    "version": "1.0.0",
    "description": "Machine-readable API for searching COLO BIRD dedicated servers, GPU servers, storage servers, bare metal servers, and global server locations.",
    "contact": {
      "name": "COLO BIRD",
      "url": "https://www.colobird.com/",
      "email": "support@colobird.com"
    }
  },
  "servers": [
    {
      "url": "https://www.colobird.com"
    }
  ],
  "paths": {
    "/api/products.php": {
      "get": {
        "operationId": "searchProducts",
        "summary": "Search COLO BIRD dedicated servers",
        "description": "Search and filter available dedicated servers by location, CPU, brand, RAM, storage, bandwidth, CPU cores, and monthly pricing.",
        "parameters": [
          {
            "name": "location",
            "in": "query",
            "description": "Server location. Example:UK, USA, Singapore, Germany",
            "schema": {
              "type": "string",
              "example": "Germany"
            }
          },
          {
            "name": "cpu",
            "in": "query",
            "description": "CPU family or model. Example:EPYC, Xeon, Ryzen",
            "schema": {
              "type": "string",
              "example": "EPYC"
            }
          },
          {
            "name": "brand",
            "in": "query",
            "description": "CPU manufacturer",
            "schema": {
              "type": "string",
              "enum": [
                "amd",
                "intel"
              ],
              "example": "amd"
            }
          },
          {
            "name": "ram",
            "in": "query",
            "description": "RAM capacity. Example:64GB, 128GB",
            "schema": {
              "type": "string",
              "example": "128GB"
            }
          },
          {
            "name": "storage",
            "in": "query",
            "description": "Storage type or capacity. Example:NVMe, SSD, HDD, 10TB",
            "schema": {
              "type": "string",
              "example": "NVMe"
            }
          },
          {
            "name": "bandwidth",
            "in": "query",
            "description": "Network bandwidth. Example:1Gbps, 10Gbps",
            "schema": {
              "type": "string",
              "example": "10Gbps"
            }
          },
          {
            "name": "cores",
            "in": "query",
            "description": "Minimum CPU core count",
            "schema": {
              "type": "integer",
              "example": 16
            }
          },
          {
            "name": "price_min",
            "in": "query",
            "description": "Minimum monthly price in USD",
            "schema": {
              "type": "number",
              "example": 100
            }
          },
          {
            "name": "price_max",
            "in": "query",
            "description": "Maximum monthly price in USD",
            "schema": {
              "type": "number",
              "example": 500
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sort products by price or CPU cores",
            "schema": {
              "type": "string",
              "enum": [
                "price",
                "price_desc",
                "cores"
              ],
              "example": "price"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Pagination page number",
            "schema": {
              "type": "integer",
              "example": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of products returned per page",
            "schema": {
              "type": "integer",
              "maximum": 100,
              "example": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful product search",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ProductResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "meta": {
            "type": "object",
            "properties": {
              "total_products": {
                "type": "integer"
              },
              "page": {
                "type": "integer"
              },
              "limit": {
                "type": "integer"
              },
              "total_pages": {
                "type": "integer"
              }
            }
          },
          "filters": {
            "type": "object"
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Product"
            }
          }
        }
      },
      "Product": {
        "type": "object",
        "properties": {
          "pid": {
            "type": "integer"
          },
          "model": {
            "type": "string"
          },
          "ref": {
            "type": "string"
          },
          "group_id": {
            "type": "integer"
          },
          "group_name": {
            "type": "string"
          },
          "specs": {
            "type": "object",
            "properties": {
              "cpu_text": {
                "type": "string"
              },
              "cores_int": {
                "type": "integer"
              },
              "brand_type": {
                "type": "string"
              },
              "ram": {
                "type": "string"
              },
              "storage": {
                "type": "string"
              },
              "bandwidth": {
                "type": "string"
              },
              "location": {
                "type": "string"
              },
              "flag": {
                "type": "string"
              }
            }
          },
          "pricing": {
            "type": "object",
            "properties": {
              "display": {
                "type": "string"
              },
              "raw": {
                "type": "number"
              },
              "per": {
                "type": "string"
              },
              "cycle": {
                "type": "string"
              }
            }
          },
          "url": {
            "type": "string"
          }
        }
      }
    }
  }
}