{
  "openapi": "3.1.0",
  "info": {
    "title": "tldcost API",
    "version": "1",
    "summary": "Domain prices (registration, renewal, transfer) with contract terms, as open data.",
    "description": "Static, read-only JSON files, regenerated with every data change. No authentication, no\ncookies, no query parameters, no rate limit beyond what the CDN applies. CORS allows any\norigin (GET/HEAD). Best effort, no SLA.\n\n`providers`, `offers` and `fx` are the raw records from the repository (schemas under\n/api/v1/schema/). Amounts there are integer cents in the offer currency, and the\nrecurring amounts (`price.year1`, `year1_regular`, `renewal`, `year2`, `year3`) are per\n`price.unit`: per year for \"year\", per MONTH for \"month\". `price.setup` and the transfer\namounts are one-off. `vat_included` says whether VAT is included.\n\n`derived` holds values computed from the raw records with the same code as the website.\n`derived.tco` is always in EUR cents, gross and net, with monthly prices annualised\n(multiplied by 12) and other currencies converted with the ECB rate (`fx`). `setup` is\none-off, `sum_Ny` is the total over N years, `avg_Ny` the average per year. The raw\nrecords are authoritative.\n\nExample: an offer with `price.unit: \"month\"`, `price.year1: 42` and `vat_included: true`\ncosts 0.42 EUR per month incl. VAT, i.e. 5.04 EUR per year; its `derived.tco[...].gross`\nhas `avg_3y: 504` and `sum_3y: 1512` (without setup fee).\n\nVersioning: v1 changes only additively (new fields, new files). A breaking change gets\na new path (/api/v2/). `data_version` changes exactly when the data changes. Each raw\nrecord carries its own `schema_version`; the meta field `schema_version` is the version\nof the schema set.\n\nException (2026-11-15): schema set 2 widens the yes/no feature fields under /api/v1/.\nv1 had been live for one day, before broad adoption; `schema_version` 2 signals the\nchange. From now on, breaking changes only via /api/v2/.\n\nChange 2026-11-15: features.* can now be \"paid\"; schema_version 2.\n\nSchema set 2 (offer records schema_version 2): the yes/no feature fields `ssl_free`,\n`forward_301`, `forward_302`, `dns_editor`, `custom_ns`, `dnssec`, `email_forwarding` and\n`api` may also be \"paid\" (offered only for a fee). The new optional `feature_costs` holds,\nper paid feature, `source` (`url`, the verbatim `quote` and its `lang`, de or en, default\nde) and, only where the provider names them, `price_cents` (offer currency, offer VAT\nmode), `unit` (year, month, once) and a short German `note`. `whois_privacy` keeps its\nenum; its \"paid\" needs a `feature_costs` entry too.\n\nChange 2026-11-19 (additive): an offer may carry `price.setup_source` (`url` and the\nverbatim `quote`): where the setup fee is stated when that is not the price itself on\n`evidence.source_url`, e.g. a table further down the page or another page of the\nprovider.\n\nLicense: the data is licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Attribution,\nfor example: \"Quelle: tldcost.io (CHnet Solutions Plus UG), CC BY 4.0\". The code of tldcost is licensed under the\nApache License 2.0 (https://github.com/chnet/tldcost).",
    "license": {
      "name": "CC BY 4.0",
      "url": "https://creativecommons.org/licenses/by/4.0/"
    }
  },
  "externalDocs": {
    "description": "Human-readable documentation",
    "url": "https://tldcost.io/api/"
  },
  "servers": [
    {
      "url": "https://tldcost.io/api/v1"
    }
  ],
  "paths": {
    "/all.json": {
      "get": {
        "operationId": "getAll",
        "summary": "All providers, offers and FX tables, with derived TCO values",
        "responses": {
          "200": {
            "description": "All data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AllResponse"
                }
              }
            }
          },
          "404": {
            "description": "Unknown path. Served by the CDN as the HTML page /404.html (text/html), not as JSON. Applies to the whole site, so clients should check the status code before parsing.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/tlds.json": {
      "get": {
        "operationId": "getTlds",
        "summary": "TLDs with at least one offer, with links to their files",
        "responses": {
          "200": {
            "description": "TLD index",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TldsResponse"
                }
              }
            }
          },
          "404": {
            "description": "Unknown path. Served by the CDN as the HTML page /404.html (text/html), not as JSON. Applies to the whole site, so clients should check the status code before parsing.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/offers/{tld}.json": {
      "get": {
        "operationId": "getOffersByTld",
        "summary": "Offers for one TLD, the providers behind them and derived TCO values",
        "parameters": [
          {
            "name": "tld",
            "in": "path",
            "required": true,
            "description": "TLD without the dot, e.g. `de`.",
            "schema": {
              "type": "string",
              "enum": [
                "de",
                "com",
                "net",
                "org",
                "eu",
                "io",
                "dev",
                "app",
                "shop",
                "info",
                "at",
                "ch",
                "me",
                "co",
                "online",
                "berlin",
                "xyz",
                "ai",
                "biz",
                "cloud"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Offers for the TLD",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TldResponse"
                }
              }
            }
          },
          "404": {
            "description": "Unknown path. Served by the CDN as the HTML page /404.html (text/html), not as JSON. Applies to the whole site, so clients should check the status code before parsing.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "getOpenApi",
        "summary": "This document",
        "responses": {
          "200": {
            "description": "OpenAPI 3.1 document",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Unknown path. Served by the CDN as the HTML page /404.html (text/html), not as JSON. Applies to the whole site, so clients should check the status code before parsing.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/schema/{name}.schema.json": {
      "get": {
        "operationId": "getSchema",
        "summary": "JSON Schema (2020-12) of the raw records",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "offer",
                "provider",
                "fx"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "JSON Schema",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Unknown path. Served by the CDN as the HTML page /404.html (text/html), not as JSON. Applies to the whole site, so clients should check the status code before parsing.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Meta": {
        "type": "object",
        "properties": {
          "api_version": {
            "const": 1
          },
          "schema_version": {
            "const": 2,
            "description": "Version of the schema set: the newest record schema_version (offers 2, providers and fx 1)."
          },
          "data_version": {
            "type": "string",
            "pattern": "^sha256:[0-9a-f]{64}$",
            "description": "Hash of the loaded data; changes exactly when the data changes."
          },
          "data_updated": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Newest evidence.fetched_at of the offers in this file."
          },
          "data_oldest": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Oldest evidence.fetched_at of the offers in this file."
          },
          "documentation": {
            "type": "string",
            "format": "uri"
          },
          "license": {
            "type": "object",
            "description": "License of the data in this file and the attribution to use. Fixed for v1: a change of the data license would come with a new path (/api/v2/).",
            "properties": {
              "name": {
                "const": "CC BY 4.0"
              },
              "spdx": {
                "const": "CC-BY-4.0"
              },
              "url": {
                "const": "https://creativecommons.org/licenses/by/4.0/"
              },
              "attribution": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "name",
              "spdx",
              "url",
              "attribution"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "api_version",
          "schema_version",
          "data_version",
          "data_updated",
          "data_oldest",
          "documentation",
          "license"
        ]
      },
      "DerivedTcoMode": {
        "type": "object",
        "properties": {
          "setup": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "description": "One-off setup fee. EUR cents; monthly prices are annualised (x 12), other currencies converted with the ECB rate."
          },
          "sum_2y": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "description": "Total over 2 years (setup and every payment due, each in full). EUR cents; monthly prices are annualised (x 12), other currencies converted with the ECB rate."
          },
          "avg_2y": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "description": "Average per year over 2 years. EUR cents; monthly prices are annualised (x 12), other currencies converted with the ECB rate."
          },
          "sum_3y": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "description": "Total over 3 years (setup and every payment due, each in full). EUR cents; monthly prices are annualised (x 12), other currencies converted with the ECB rate."
          },
          "avg_3y": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "description": "Average per year over 3 years. EUR cents; monthly prices are annualised (x 12), other currencies converted with the ECB rate."
          },
          "sum_5y": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "description": "Total over 5 years (setup and every payment due, each in full). EUR cents; monthly prices are annualised (x 12), other currencies converted with the ECB rate."
          },
          "avg_5y": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "description": "Average per year over 5 years. EUR cents; monthly prices are annualised (x 12), other currencies converted with the ECB rate."
          },
          "missing": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Missing inputs (e.g. price.renewal, vat_rate, fx.USD); sums are null."
          }
        },
        "required": [
          "setup",
          "sum_2y",
          "avg_2y",
          "sum_3y",
          "avg_3y",
          "sum_5y",
          "avg_5y",
          "missing"
        ],
        "additionalProperties": false
      },
      "DerivedOffer": {
        "type": "object",
        "properties": {
          "currency": {
            "const": "EUR"
          },
          "fx": {
            "description": "ECB reference rate used for a non-EUR offer.",
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "object",
                "properties": {
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$"
                  },
                  "date": {
                    "type": "string",
                    "format": "date"
                  },
                  "per_eur": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  }
                },
                "required": [
                  "currency",
                  "date",
                  "per_eur"
                ],
                "additionalProperties": false
              }
            ]
          },
          "vat_not_stated": {
            "type": "boolean"
          },
          "foreign_market": {
            "description": "Country of a foreign market display (offer `foreign_market`): the provider showed the fetch another market's prices, converted with `fx` and with the offer's VAT rate added. Not the price for customers in Germany. null: the German display.",
            "oneOf": [
              {
                "type": "null"
              },
              {
                "type": "string",
                "pattern": "^[A-Z]{2}$",
                "not": {
                  "const": "DE"
                }
              }
            ]
          },
          "gross": {
            "$ref": "#/components/schemas/DerivedTcoMode"
          },
          "net": {
            "$ref": "#/components/schemas/DerivedTcoMode"
          }
        },
        "required": [
          "currency",
          "fx",
          "vat_not_stated",
          "foreign_market",
          "gross",
          "net"
        ],
        "additionalProperties": false
      },
      "Derived": {
        "type": "object",
        "description": "Values computed from the raw records; the raw records are authoritative. EUR cents, monthly prices annualised (x 12), other currencies converted with the ECB rate.",
        "properties": {
          "description": {
            "type": "string"
          },
          "tco": {
            "type": "object",
            "description": "Key `<provider>/<tld>`, one entry per offer.",
            "propertyNames": {
              "pattern": "^[a-z0-9-]+/[a-z0-9-]+$"
            },
            "additionalProperties": {
              "$ref": "#/components/schemas/DerivedOffer"
            }
          }
        },
        "required": [
          "description",
          "tco"
        ],
        "additionalProperties": false
      },
      "AllResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Meta"
          }
        ],
        "type": "object",
        "properties": {
          "providers": {
            "type": "array",
            "items": {
              "$ref": "https://tldcost.io/api/v1/schema/provider.schema.json"
            }
          },
          "offers": {
            "type": "array",
            "items": {
              "$ref": "https://tldcost.io/api/v1/schema/offer.schema.json"
            }
          },
          "fx": {
            "type": "array",
            "items": {
              "$ref": "https://tldcost.io/api/v1/schema/fx.schema.json"
            }
          },
          "derived": {
            "$ref": "#/components/schemas/Derived"
          }
        },
        "required": [
          "providers",
          "offers",
          "fx",
          "derived"
        ],
        "unevaluatedProperties": false
      },
      "TldResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Meta"
          }
        ],
        "type": "object",
        "properties": {
          "tld": {
            "type": "string"
          },
          "providers": {
            "type": "array",
            "items": {
              "$ref": "https://tldcost.io/api/v1/schema/provider.schema.json"
            }
          },
          "offers": {
            "type": "array",
            "items": {
              "$ref": "https://tldcost.io/api/v1/schema/offer.schema.json"
            }
          },
          "derived": {
            "$ref": "#/components/schemas/Derived"
          }
        },
        "required": [
          "tld",
          "providers",
          "offers",
          "derived"
        ],
        "unevaluatedProperties": false
      },
      "TldsResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Meta"
          }
        ],
        "type": "object",
        "properties": {
          "tlds": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tld": {
                  "type": "string"
                },
                "offers": {
                  "type": "integer",
                  "minimum": 1
                },
                "href": {
                  "type": "string",
                  "description": "Path of the TLD file under this origin."
                },
                "page": {
                  "type": "string",
                  "description": "Path of the TLD page on the website."
                }
              },
              "required": [
                "tld",
                "offers",
                "href",
                "page"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "tlds"
        ],
        "unevaluatedProperties": false
      }
    }
  }
}
