{
  "openapi": "3.1.0",
  "info": {
    "title": "TagHost Public Registrar API",
    "description": "Public domain availability, pricing lookup, and supported TLD query endpoints for developers and AI agents.",
    "version": "3.0.0"
  },
  "servers": [
    {
      "url": "https://api.taghost.io",
      "description": "TagHost Production Global Edge API"
    }
  ],
  "paths": {
    "/tlds/supported": {
      "get": {
        "summary": "List supported top-level domains",
        "description": "Returns an array of supported domain extensions available for immediate wholesale registration.",
        "operationId": "getSupportedTlds",
        "responses": {
          "200": {
            "description": "List of supported TLDs",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": { "type": "string" },
                  "example": ["com", "io", "dev", "app", "net", "co"]
                }
              }
            }
          }
        }
      }
    },
    "/domains/check": {
      "post": {
        "summary": "Check domain availability and pricing",
        "description": "Performs bulk availability checks and retrieves real-time wholesale and retail pricing for up to 200 domains.",
        "operationId": "checkDomainAvailability",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domains": {
                    "type": "array",
                    "items": { "type": "string" },
                    "description": "List of domains to check (max 200)"
                  }
                },
                "required": ["domains"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Availability results and pricing",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "domain": { "type": "string" },
                          "available": { "type": "boolean" },
                          "purchasePrice": { "type": "number", "nullable": true },
                          "renewalPrice": { "type": "number", "nullable": true },
                          "transferPrice": { "type": "number", "nullable": true },
                          "years": { "type": "integer", "nullable": true },
                          "premium": { "type": "boolean" }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/domains/search": {
      "get": {
        "summary": "Search domain suggestions by keyword",
        "description": "Generates domain suggestions across supported TLDs and returns real-time availability and pricing.",
        "operationId": "searchDomains",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Keyword to search for",
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching domains across extensions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "query": { "type": "string" },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "domainName": { "type": "string" },
                          "sld": { "type": "string" },
                          "tld": { "type": "string" },
                          "purchasable": { "type": "boolean" },
                          "purchasePrice": { "type": "number" },
                          "renewalPrice": { "type": "number" },
                          "currency": { "type": "string" }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
