{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/broadcastwell-com/json-schema/broadcastwell-com-index-lookup-schema.json",
  "title": "IndexLookup",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/broadcastwell-com-openapi.json#/components/schemas/IndexLookup",
  "type": "object",
  "required": [
    "found",
    "query",
    "release",
    "framing",
    "offers"
  ],
  "properties": {
    "found": {
      "type": "boolean"
    },
    "query": {
      "type": "object"
    },
    "release": {
      "type": "object",
      "required": [
        "release_id",
        "release_date",
        "doi",
        "doi_url",
        "license"
      ],
      "properties": {
        "release_id": {
          "type": "string"
        },
        "release_date": {
          "type": "string"
        },
        "doi": {
          "type": "string"
        },
        "doi_url": {
          "type": "string"
        },
        "license": {
          "type": "string"
        },
        "method_version": {
          "type": "string"
        },
        "source": {
          "type": "string"
        }
      }
    },
    "framing": {
      "type": "string"
    },
    "records": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/IndexRecord"
      }
    },
    "message": {
      "type": "string"
    },
    "free_check_url": {
      "type": "string"
    },
    "offers": {
      "type": "object"
    }
  },
  "$defs": {
    "IndexCount": {
      "type": "object",
      "required": [
        "count",
        "base"
      ],
      "properties": {
        "count": {
          "type": "integer"
        },
        "base": {
          "type": "integer"
        },
        "rate": {
          "type": "number"
        },
        "lower": {
          "type": "number"
        },
        "upper": {
          "type": "number"
        }
      }
    },
    "IndexRecord": {
      "type": "object",
      "required": [
        "name",
        "slug",
        "canonical_domain",
        "category",
        "named",
        "cited",
        "questions_appeared",
        "engines",
        "named_instead",
        "never_named_in_category",
        "absent_questions",
        "index_url",
        "matched_by"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        },
        "canonical_domain": {
          "type": "string"
        },
        "category": {
          "type": "object",
          "required": [
            "id",
            "name",
            "url"
          ],
          "properties": {
            "id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "captured_on": {
              "type": [
                "string",
                "null"
              ]
            },
            "url": {
              "type": "string"
            }
          }
        },
        "named": {
          "$ref": "#/$defs/IndexCount"
        },
        "cited": {
          "$ref": "#/$defs/IndexCount"
        },
        "questions_appeared": {
          "type": "object",
          "required": [
            "count",
            "of"
          ],
          "properties": {
            "count": {
              "type": "integer"
            },
            "of": {
              "type": "integer"
            }
          }
        },
        "engines": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "engine",
              "count",
              "base"
            ],
            "properties": {
              "engine": {
                "type": "string"
              },
              "count": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "base": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            }
          }
        },
        "named_instead": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "name",
              "named",
              "base"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "named": {
                "type": "integer"
              },
              "base": {
                "type": "integer"
              }
            }
          }
        },
        "never_named_in_category": {
          "type": "integer"
        },
        "absent_questions": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "id",
              "text"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "text": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        },
        "index_url": {
          "type": "string"
        },
        "matched_by": {
          "type": "string",
          "enum": [
            "domain",
            "name"
          ]
        }
      }
    }
  }
}