{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bol-com/json-schema/bol-com-search-terms-schema.json",
  "title": "SearchTerms",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bol-com-insights-api-openapi.yml#/components/schemas/SearchTerms",
  "type": "object",
  "properties": {
    "searchTerms": {
      "allOf": [
        {
          "$ref": "#/$defs/SearchTerm"
        }
      ]
    }
  },
  "$defs": {
    "RelatedSearchTerm": {
      "required": [
        "searchTerm",
        "total"
      ],
      "type": "object",
      "properties": {
        "total": {
          "type": "integer",
          "description": "The number of customer visits on the search page.",
          "format": "int32"
        },
        "searchTerm": {
          "type": "string",
          "description": "The search term for which you requested the search volume."
        }
      }
    },
    "SearchTerm": {
      "required": [
        "countries",
        "periods",
        "searchTerm",
        "total",
        "type"
      ],
      "type": "object",
      "properties": {
        "searchTerm": {
          "type": "string",
          "description": "The search term for which you requested the search volume."
        },
        "type": {
          "type": "string",
          "description": "Interpretation of the data that applies to this measurement."
        },
        "total": {
          "type": "integer",
          "description": "The number of customer visits on the search page.",
          "format": "int32"
        },
        "countries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SearchTermsCountry"
          }
        },
        "periods": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TotalPeriod"
          }
        },
        "relatedSearchTerms": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/RelatedSearchTerm"
          }
        }
      }
    },
    "SearchTermsCountry": {
      "required": [
        "countryCode",
        "value"
      ],
      "type": "object",
      "properties": {
        "countryCode": {
          "type": "string",
          "description": "Countries in which this offer is currently on sale in the webshop in ISO-3166-1 format."
        },
        "value": {
          "type": "integer",
          "description": "The number of customer visits on the search page.",
          "format": "int32"
        }
      }
    },
    "SearchTermsPeriod": {
      "type": "object",
      "properties": {
        "day": {
          "type": [
            "string",
            "null"
          ],
          "description": "Day number in the ISO-8601 standard."
        },
        "week": {
          "type": [
            "string",
            "null"
          ],
          "description": "Week number in the ISO-8601 standard."
        },
        "month": {
          "type": [
            "string",
            "null"
          ],
          "description": "Month number in the ISO-8601 standard."
        },
        "year": {
          "type": [
            "string",
            "null"
          ],
          "description": "Year number in the ISO-8601 standard."
        }
      }
    },
    "TotalPeriod": {
      "required": [
        "countries",
        "period",
        "total"
      ],
      "type": "object",
      "properties": {
        "period": {
          "$ref": "#/$defs/SearchTermsPeriod"
        },
        "total": {
          "type": "integer",
          "description": "The number of customer visits on the search page.",
          "format": "int32"
        },
        "countries": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SearchTermsCountry"
          }
        }
      }
    }
  }
}