{
 "openapi": "3.1.0",
 "info": {
  "title": "Host.al public API",
  "version": "1.0.0",
  "description": "Live .al and international domain availability from the Host.al registrar system, and the Host.al product catalog with prices. No authentication. Fair use: 30 domain checks per minute per IP. Ordering happens in the client area (my.host.al) via the returned order links.",
  "contact": {
   "name": "Host.al",
   "email": "support@host.al",
   "url": "https://host.al/en/developers/"
  }
 },
 "servers": [
  {
   "url": "https://host.al/api/v1"
  }
 ],
 "paths": {
  "/domains/check": {
   "get": {
    "operationId": "checkDomain",
    "summary": "Is a domain available for registration?",
    "description": "Checks one or more domains (comma-separated, max 10) against the registry through the Host.al registrar system. Returns availability, prices for 1-3 years and a cart link.",
    "parameters": [
     {
      "name": "domain",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "example": "example.al,example.com.al"
      },
      "description": "Domain name(s), comma-separated"
     }
    ],
    "responses": {
     "200": {
      "description": "Result per domain",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/CheckResponse"
        }
       }
      }
     },
     "400": {
      "description": "Missing or invalid domain"
     },
     "429": {
      "description": "Too many requests (see Retry-After)"
     },
     "502": {
      "description": "Registrar system unreachable; try again or use the order link"
     }
    }
   }
  },
  "/catalog.json": {
   "get": {
    "operationId": "getCatalog",
    "summary": "All products with prices",
    "description": "Domains (.al and others), web hosting, VPS, dedicated servers, colocation, IP transit and BGP, with price (EUR), billing cycle, specs, location and order link.",
    "responses": {
     "200": {
      "description": "Catalog",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "schemas": {
   "CheckResponse": {
    "type": "object",
    "properties": {
     "results": {
      "type": "array",
      "items": {
       "type": "object",
       "properties": {
        "domain": {
         "type": "string"
        },
        "available": {
         "type": [
          "boolean",
          "null"
         ],
         "description": "null if the check failed"
        },
        "status": {
         "type": "string",
         "example": "available for registration"
        },
        "price": {
         "type": "object",
         "description": "EUR per registration period in years, e.g. {\"1\": 12.99, \"2\": 22.79}",
         "additionalProperties": {
          "type": "number"
         }
        },
        "transfer_price": {
         "type": [
          "number",
          "null"
         ]
        },
        "order_url": {
         "type": "string",
         "format": "uri"
        },
        "error": {
         "type": [
          "string",
          "null"
         ]
        }
       }
      }
     },
     "source": {
      "type": "string"
     },
     "checked_at": {
      "type": "string",
      "format": "date-time"
     }
    }
   }
  }
 }
}