{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/publicwww-com/json-schema/publicwww-com-signatures-response-schema.json",
  "title": "SignaturesResponse",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/publicwww-com-openapi.json#/components/schemas/SignaturesResponse",
  "allOf": [
    {
      "$ref": "#/$defs/Cluster"
    },
    {
      "type": "object",
      "required": [
        "domains_used",
        "websites_with_code",
        "signatures"
      ],
      "properties": {
        "domains_used": {
          "type": "integer",
          "description": "How many of the cluster's websites were looked at."
        },
        "websites_with_code": {
          "type": "integer",
          "description": "How many of them had code to read."
        },
        "signatures": {
          "type": "array",
          "description": "Best first.",
          "items": {
            "type": "object",
            "required": [
              "query",
              "in_cluster",
              "websites",
              "websites_max"
            ],
            "properties": {
              "query": {
                "type": "string",
                "description": "A ready search: pass it in double quotes to find more such websites."
              },
              "search": {
                "type": "string",
                "description": "The query in double quotes, ready for /v1/search."
              },
              "in_cluster": {
                "type": "integer",
                "description": "How many of the websites looked at have this code."
              },
              "coverage": {
                "type": "string",
                "description": "in_cluster of domains_used, as \"4 of 5\"."
              },
              "in_all": {
                "type": "boolean",
                "description": "true when every website looked at has this code."
              },
              "websites": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Rough count in the whole index; null when rarer than websites_max. The search gives the exact number."
              },
              "websites_max": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "With websites null: the count is below this."
              },
              "technology": {
                "type": "string",
                "description": "Its name, when the code belongs to a technology we know."
              }
            }
          }
        },
        "note": {
          "type": "string",
          "description": "Present when there are no signatures, with the reason."
        }
      }
    }
  ],
  "$defs": {
    "Cluster": {
      "type": "object",
      "required": [
        "id",
        "name",
        "size",
        "created"
      ],
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "size": {
          "type": "integer",
          "description": "Number of domains."
        },
        "created": {
          "type": "string",
          "format": "date-time"
        },
        "submitted": {
          "type": "integer",
          "description": "From a list: how many different names the lines gave."
        },
        "received": {
          "type": "integer",
          "description": "From a list: how many non-empty lines were sent; size plus all of dropped equals it."
        },
        "dropped": {
          "type": "object",
          "description": "From a list: what was left out, by reason.",
          "properties": {
            "not_a_domain": {
              "type": "integer",
              "description": "Lines with no domain in them."
            },
            "duplicate": {
              "type": "integer",
              "description": "Names already in the list, www. name next to the same name without it included."
            },
            "not_in_index": {
              "type": "integer",
              "description": "Names the index does not have."
            },
            "over_limit": {
              "type": "integer",
              "description": "Names after the plan's cluster size was reached, not checked."
            }
          }
        },
        "max_size": {
          "type": "integer",
          "description": "The plan's cap on domains per cluster."
        },
        "query": {
          "type": "string",
          "description": "From a search: the query that was run."
        },
        "original_query": {
          "type": "string",
          "description": "Only when query differs from it: the query as sent."
        },
        "total": {
          "type": "integer",
          "description": "From a search: results the search found, not the size of the cluster; up to 1000000, the most a search counts."
        },
        "total_capped": {
          "type": "boolean",
          "description": "Present and true when total is that ceiling: the search found more."
        },
        "total_exact": {
          "type": "boolean",
          "description": "Present and false when the search reached its time limit: total counts only what was found in time, and there are more. The rows are the most popular of the matches; later pages may run short. A narrower query - a longer phrase or site: - finishes in time."
        },
        "total_estimate": {
          "type": "integer",
          "description": "With total_exact, when it can be estimated: about how many there are in all."
        },
        "index_complete": {
          "type": "boolean"
        },
        "query_note": {
          "type": "string",
          "description": "As in a search: why the query was rewritten, or what is wrong with it."
        },
        "operation": {
          "type": "string",
          "enum": [
            "and",
            "or",
            "diff"
          ]
        },
        "from": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        }
      }
    }
  }
}