{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dns-coffee/json-schema/dns-coffee-word-trends-schema.json",
  "title": "WordTrends",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dns-coffee-trends-api-openapi.yml#/components/schemas/WordTrends",
  "additionalProperties": false,
  "properties": {
    "$schema": {
      "description": "A URL to the JSON Schema for this object.",
      "format": "uri",
      "readOnly": true,
      "type": "string"
    },
    "date": {
      "description": "Date of the newest zone file the list reflects. For a weekly list, the last of its 7 days. Absent when there is no list.",
      "format": "date-time",
      "type": "string"
    },
    "period": {
      "description": "What the list covers: day is one day's new domains against the four weeks before, week is the 7 days ending on date against the 28 days before them.",
      "enum": [
        "day",
        "week"
      ],
      "type": "string"
    },
    "terms": {
      "description": "The trending terms, most unusual first.",
      "items": {
        "$ref": "#/$defs/WordTrend"
      },
      "type": [
        "array",
        "null"
      ]
    }
  },
  "required": [
    "period",
    "terms"
  ],
  "type": "object",
  "$defs": {
    "WordTrend": {
      "additionalProperties": false,
      "properties": {
        "count": {
          "description": "Number of newly registered domains containing the term.",
          "format": "int64",
          "type": "integer"
        },
        "expected": {
          "description": "Number of domains the term's own history predicts for the same number of registrations.",
          "format": "double",
          "type": "number"
        },
        "filtered": {
          "description": "True when the term is hidden unless unfiltered results are requested: it is, or only appears beside, a sexual, profane or slur word.",
          "type": "boolean"
        },
        "history": {
          "description": "The term's count on each earlier day it is compared with, oldest first, ending with this list's own count. Across zones these are the 28 days before the list's date; in a zone's list, the zone's previous zone files, up to 28.",
          "items": {
            "format": "int64",
            "type": "integer"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "providers": {
          "description": "Number of nameserver providers the term's domains used on the day they appeared. Omitted with top_provider.",
          "format": "int64",
          "type": "integer"
        },
        "rank": {
          "description": "Position in the returned list, starting at 1.",
          "format": "int64",
          "type": "integer"
        },
        "score": {
          "description": "Ranking score: how far the count is above the expected count, weighted by the term's length.",
          "format": "double",
          "type": "number"
        },
        "term": {
          "description": "The word or character run found in the domain names. Names in other scripts are decoded from punycode first.",
          "type": "string"
        },
        "top_provider": {
          "description": "The nameserver provider that the most of the term's domains used on the day they appeared, as the registered domain of the nameserver (registrar-servers.com for dns1.registrar-servers.com). One provider for nearly all of the domains usually means one registrant. Omitted in a single zone's list and in an older list that was built without it.",
          "type": "string"
        },
        "top_provider_count": {
          "description": "Number of the term's domains on the top provider. Divide by count for its share. Omitted with top_provider.",
          "format": "int64",
          "type": "integer"
        },
        "top_zone": {
          "description": "The zone with the most domains containing the term. Omitted in a single zone's list.",
          "type": "string"
        },
        "top_zone_count": {
          "description": "Number of domains containing the term in the top zone. Omitted in a single zone's list.",
          "format": "int64",
          "type": "integer"
        },
        "zones": {
          "description": "Number of zones the term appeared in. Omitted in a single zone's list.",
          "format": "int64",
          "type": "integer"
        }
      },
      "required": [
        "rank",
        "term",
        "count",
        "expected",
        "score",
        "examples",
        "history"
      ],
      "type": "object"
    }
  }
}