{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cheapest-domains/json-schema/cheapest-domains-name-comparison-schema.json",
  "title": "NameComparison",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cheapest-domains-openapi.json#/components/schemas/NameComparison",
  "type": "object",
  "required": [
    "apiVersion",
    "service",
    "generatedAt",
    "currency",
    "cachedOnly",
    "priceScope",
    "rows",
    "unconfirmedDomains",
    "partial",
    "limits"
  ],
  "properties": {
    "apiVersion": {
      "type": "string"
    },
    "service": {
      "$ref": "#/$defs/ServiceInformation"
    },
    "generatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "currency": {
      "const": "USD"
    },
    "cachedOnly": {
      "const": true
    },
    "priceScope": {
      "type": "string"
    },
    "partial": {
      "type": "boolean"
    },
    "limits": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "unconfirmedDomains": {
      "type": "array",
      "maxItems": 10,
      "items": {
        "type": "string"
      }
    },
    "rows": {
      "type": "array",
      "minItems": 1,
      "maxItems": 10,
      "items": {
        "type": "object",
        "required": [
          "domain",
          "name",
          "tld",
          "availability",
          "offers",
          "coverage",
          "comparison"
        ],
        "properties": {
          "domain": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "tld": {
            "type": "string"
          },
          "availability": {
            "$ref": "#/$defs/AvailabilityEvidence"
          },
          "offers": {
            "type": "array",
            "maxItems": 200,
            "items": {
              "$ref": "#/$defs/Offer"
            }
          },
          "comparison": {
            "$ref": "#/$defs/Comparison"
          },
          "coverage": {
            "type": [
              "object",
              "null"
            ],
            "required": [
              "scope",
              "totalOffers",
              "freshOffers",
              "sources",
              "notCompared",
              "partial"
            ],
            "properties": {
              "scope": {
                "type": "string"
              },
              "totalOffers": {
                "type": "integer"
              },
              "freshOffers": {
                "type": "integer"
              },
              "partial": {
                "type": "boolean"
              },
              "error": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sources": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Source"
                }
              },
              "notCompared": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "error": {
      "type": "object",
      "required": [
        "code",
        "message"
      ],
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "retryAfterSeconds": {
          "type": "number",
          "minimum": 0
        }
      }
    }
  },
  "$defs": {
    "AvailabilityAttempt": {
      "type": "object",
      "required": [
        "provider",
        "availability",
        "premium",
        "reason",
        "checkedAt",
        "expiresAt"
      ],
      "properties": {
        "provider": {
          "type": "object",
          "required": [
            "id",
            "name",
            "documentation"
          ],
          "properties": {
            "id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "documentation": {
              "type": "string",
              "format": "uri"
            }
          }
        },
        "availability": {
          "enum": [
            "available",
            "unavailable",
            "unknown"
          ]
        },
        "premium": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "reason": {
          "type": "string"
        },
        "checkedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "expiresAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "outcome": {
          "enum": [
            "answered",
            "failed",
            "pending"
          ],
          "description": "Whether this stage returned an answer, failed before confirming evidence, or is still in progress. Optional for older responses."
        },
        "retryAfterSeconds": {
          "type": "number",
          "minimum": 0,
          "description": "Suggested wait after a failed stage; never an evidence lifetime."
        }
      }
    },
    "AvailabilityEvidence": {
      "type": "object",
      "required": [
        "domain",
        "status",
        "reason",
        "message",
        "provider",
        "checkedAt",
        "expiresAt"
      ],
      "properties": {
        "availability": {
          "enum": [
            "available",
            "unavailable",
            "unknown"
          ],
          "description": "Registration status; independent of premium classification."
        },
        "premium": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Null means not confirmed, never standard tier."
        },
        "registrar": {
          "type": "string"
        },
        "attempts": {
          "type": "array",
          "maxItems": 5,
          "items": {
            "$ref": "#/$defs/AvailabilityAttempt"
          }
        },
        "fallback": {
          "type": "object",
          "required": [
            "registrar",
            "state",
            "reason"
          ],
          "properties": {
            "registrar": {
              "type": "string"
            },
            "state": {
              "enum": [
                "used",
                "unavailable"
              ]
            },
            "reason": {
              "type": "string"
            }
          }
        },
        "domain": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "available",
            "unavailable",
            "premium",
            "unsupported",
            "unknown"
          ]
        },
        "reason": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "provider": {
          "type": "object",
          "required": [
            "id",
            "name",
            "documentation"
          ],
          "properties": {
            "id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "documentation": {
              "type": "string",
              "format": "uri"
            }
          }
        },
        "checkedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "Successful provider response time; null when no reliable result was obtained."
        },
        "expiresAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "Recheck after this time; never a reservation or guarantee until expiry."
        },
        "listEnrichmentComplete": {
          "type": "boolean",
          "description": "Batch results: true when availability is known or every configured fallback stage has answered for this name. False means a later explicit request may add facts; it never means taken."
        }
      }
    },
    "Comparison": {
      "type": "object",
      "required": [
        "url",
        "omittedParameters"
      ],
      "description": "Revisit current standard prices with supported website filters. Omits proposed names and API pagination; does not save prices or availability.",
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        },
        "omittedParameters": {
          "type": "array",
          "items": {
            "enum": [
              "years",
              "favorites"
            ]
          },
          "description": "Estimate horizons outside 2, 3, 5 and 10 years use the website default. Favorites are browser-local preferences and are never written by a link. Disclose omitted settings."
        }
      }
    },
    "Destination": {
      "type": "object",
      "required": [
        "href",
        "mode",
        "domain"
      ],
      "properties": {
        "href": {
          "type": "string",
          "format": "uri"
        },
        "mode": {
          "type": "string",
          "enum": [
            "search",
            "copy",
            "pricing"
          ]
        },
        "domain": {
          "type": "string"
        }
      }
    },
    "Offer": {
      "type": "object",
      "required": [
        "tld",
        "registrarId",
        "registrarName",
        "currency",
        "registrationCents",
        "renewalCents",
        "minimumTermYears",
        "stale",
        "estimatedTotalCents",
        "estimateYears",
        "availability",
        "pageUrl",
        "sourceUrl",
        "registrarSearch"
      ],
      "properties": {
        "tld": {
          "type": "string"
        },
        "registrarId": {
          "type": "string"
        },
        "registrarName": {
          "type": "string"
        },
        "currency": {
          "const": "USD"
        },
        "registrationCents": {
          "type": "integer",
          "minimum": 0,
          "description": "Integer USD cents; 1000 = USD 10."
        },
        "renewalCents": {
          "type": "integer",
          "minimum": 0,
          "description": "Integer USD cents; 1000 = USD 10."
        },
        "minimumTermYears": {
          "type": "integer",
          "minimum": 1
        },
        "countryCode": {
          "type": "boolean"
        },
        "sourceUrl": {
          "type": "string",
          "format": "uri"
        },
        "fetchedAt": {
          "type": [
            "string",
            "null"
          ]
        },
        "nextRefreshAt": {
          "type": [
            "string",
            "null"
          ],
          "description": "When the saved catalog is due for its next scheduled refresh; not an expiry of its prices."
        },
        "stale": {
          "type": "boolean",
          "description": "True when the source’s last refresh failed and its saved catalog is at least 24 hours old. Passing nextRefreshAt alone does not make prices stale; a scheduled refresh every 15 minutes replaces due catalogs."
        },
        "estimatedTotalCents": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Null for multi-year minimum terms; not zero."
        },
        "estimateYears": {
          "type": "integer",
          "minimum": 1,
          "maximum": 10,
          "default": 3,
          "description": "Planning horizon in years, including initial registration."
        },
        "availability": {
          "const": "not_checked"
        },
        "pageUrl": {
          "type": "string",
          "format": "uri"
        },
        "registrarSearch": {
          "$ref": "#/$defs/Destination"
        },
        "futureRenewalCents": {
          "type": "integer",
          "minimum": 0,
          "description": "Integer USD cents; 1000 = USD 10."
        },
        "futureRenewalDate": {
          "type": "string"
        },
        "regularRenewalCents": {
          "type": "integer",
          "minimum": 0,
          "description": "Integer USD cents; 1000 = USD 10."
        },
        "regularRegistrationCents": {
          "type": "integer",
          "minimum": 0,
          "description": "Integer USD cents; 1000 = USD 10."
        },
        "transferCents": {
          "type": "integer",
          "minimum": 0,
          "description": "Integer USD cents; 1000 = USD 10."
        },
        "registrationTermCents": {
          "type": "integer",
          "minimum": 0,
          "description": "Integer USD cents; 1000 = USD 10."
        },
        "renewalTermCents": {
          "type": "integer",
          "minimum": 0,
          "description": "Integer USD cents; 1000 = USD 10."
        },
        "pricingBasis": {
          "type": "string",
          "enum": [
            "sampled_standard",
            "sampled_api"
          ],
          "description": "Absent for published price lists. sampled_standard: standard-tier prices sampled from registrar search results (Cloudflare). sampled_api (API 1.9.0): registrar API purchase and auto-renewal rates sampled with a synthetic name (GoDaddy); the registrar website and manual renewals can charge more. Both have limited coverage and are not exact-name quotes. Preserve this distinction when displaying or reusing prices."
        },
        "originalCurrency": {
          "type": "string"
        },
        "originalRegistrationCents": {
          "type": "integer"
        },
        "originalRenewalCents": {
          "type": "integer"
        },
        "exchangeRate": {
          "type": "number"
        },
        "exchangeRateDate": {
          "type": "string"
        },
        "exchangeRateSourceUrl": {
          "type": "string"
        },
        "billingCountry": {
          "type": "string"
        },
        "taxExcluded": {
          "type": "boolean"
        },
        "priceValidUntil": {
          "type": "string",
          "format": "date-time",
          "description": "When a scheduled price change takes effect or the exchange rate behind a converted price expires; recheck after this time."
        },
        "renewalSince": {
          "type": "string",
          "format": "date-time",
          "description": "API 1.12.0: when this renewal price (with its regular price) was first seen; unchanged since. Absent when not yet dated. See renewalSinceFirstRecord and the price history endpoint."
        },
        "renewalSinceFirstRecord": {
          "type": "boolean",
          "description": "True when renewalSince is our earliest record of this price, so the price may be older. Say \"unchanged since at least\" that date."
        }
      }
    },
    "ServiceInformation": {
      "type": "object",
      "required": [
        "name",
        "url",
        "setupUrl",
        "pluginUrl"
      ],
      "description": "Cheapest Domains identity and optional setup links, separate from upstream evidence. Does not establish client installation or provider health.",
      "properties": {
        "name": {
          "const": "Cheapest Domains"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "setupUrl": {
          "type": "string",
          "format": "uri"
        },
        "pluginUrl": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "Source": {
      "type": "object",
      "required": [
        "id",
        "name",
        "url",
        "offerCount",
        "freshOfferCount",
        "stale",
        "refreshing"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "note": {
          "type": "string"
        },
        "offerCount": {
          "type": "integer"
        },
        "freshOfferCount": {
          "type": "integer"
        },
        "fetchedAt": {
          "type": [
            "string",
            "null"
          ]
        },
        "nextRefreshAt": {
          "type": [
            "string",
            "null"
          ],
          "description": "When the saved catalog is due for its next scheduled refresh; not an expiry of its prices."
        },
        "stale": {
          "type": "boolean",
          "description": "True when the source’s last refresh failed and its saved catalog is at least 24 hours old. Passing nextRefreshAt alone does not make prices stale; a scheduled refresh every 15 minutes replaces due catalogs."
        },
        "refreshing": {
          "type": "boolean"
        },
        "error": {
          "type": [
            "string",
            "null"
          ]
        },
        "refresh": {
          "type": "object",
          "required": [
            "phase",
            "completed",
            "total",
            "startedAt",
            "resumeAt"
          ],
          "description": "Progress of a staged catalog refresh, when one exists. Saved prices remain usable meanwhile.",
          "properties": {
            "phase": {
              "enum": [
                "queued",
                "running",
                "waiting",
                "paused",
                "complete"
              ]
            },
            "completed": {
              "type": "integer",
              "minimum": 0
            },
            "total": {
              "type": "integer",
              "minimum": 0
            },
            "startedAt": {
              "type": "integer",
              "description": "Unix time in milliseconds."
            },
            "resumeAt": {
              "type": "integer",
              "description": "Unix time in milliseconds."
            }
          }
        }
      }
    }
  }
}