{
  "openapi": "3.0.3",
  "info": {
    "title": "tldes.com Domain Pricing API",
    "version": "1.0.0",
    "description": "Domain pricing data from 100+ registrars: registration, renewal and transfer prices, promos and registrar metadata. Updated hourly. Full documentation: https://tldes.com/docs/api-reference.html"
  },
  "servers": [{"url": "https://tldes.com"}],
  "paths": {
    "/v1": {
      "get": {
        "summary": "Domain pricing data",
        "description": "Single endpoint; the `data` parameter selects what to return. Endpoints marked as protected require the `key` parameter.",
        "parameters": [
          {
            "name": "data",
            "in": "query",
            "required": true,
            "description": "What to return. Free (no key): status, registrars, demo. Key required: prices, promos, promospecial, meta, keyinfo.",
            "schema": {"type": "string", "enum": ["status", "registrars", "demo", "prices", "promos", "promospecial", "meta", "keyinfo"]}
          },
          {
            "name": "key",
            "in": "query",
            "required": false,
            "description": "API key. Required for prices, promos, promospecial, meta, keyinfo.",
            "schema": {"type": "string"}
          },
          {
            "name": "registrars",
            "in": "query",
            "required": false,
            "description": "Comma-separated registrar names (e.g. dynadot.com,porkbun.com). Applies to data=prices, data=promos, data=promospecial; ignored elsewhere. Unknown names are silently ignored. Can be combined with tlds.",
            "schema": {"type": "string"}
          },
          {
            "name": "tlds",
            "in": "query",
            "required": false,
            "description": "Comma-separated TLDs without dot (e.g. com,net). Applies to data=prices, data=promos, data=promospecial; ignored elsewhere. Registrars with no matching TLDs are omitted. Can be combined with registrars.",
            "schema": {"type": "string"}
          }
        ],
        "responses": {
          "200": {
            "description": "Requested data. Shape depends on the data parameter. data=prices: {updated, totalRegistrars, registrars: [{name, ts, currency, ICANNfee, prices: [[tld, registration, renewal, transfer], ...]}]} — all four tuple values are strings, prices are in the registrar's currency. data=promos and data=promospecial: {updated, registrars: {name: {currency, ICANNfee, promos: [[type, tld, price, code, limit, newUsersOnly], ...]}}} where type is 0=registration, 1=renewal, 2=transfer; promospecial adds a strings array and a 7th tuple element with an index into it. data=registrars: a plain JSON array of registrar names. data=status: {updated}. data=keyinfo: {keyValidUntil}. data=meta: registrar metadata and currency rates.",
            "content": {"application/json": {"schema": {"description": "See the data parameter description and https://tldes.com/docs/api-reference.html for exact shapes"}}}
          },
          "400": {
            "description": "Unknown data parameter value",
            "content": {"application/json": {"schema": {"type": "object", "properties": {"error": {"type": "string"}}}}}
          },
          "401": {
            "description": "Missing, invalid or expired API key",
            "content": {"application/json": {"schema": {"type": "object", "properties": {"error": {"type": "string"}}}}}
          }
        }
      }
    }
  }
}
