{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/storeradar-io/json-schema/storeradar-io-segment-description-schema.json",
  "title": "SegmentDescription",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/storeradar-io-openapi.json#/components/schemas/SegmentDescription",
  "type": "object",
  "properties": {
    "size": {
      "type": "string",
      "description": "Estimated number of stores, as a label, never a number: 'about 48,000'. 'fewer than about 2,500' when the segment is too small to describe (zero included), 'unknown' when the sample could not be read."
    },
    "estimated_size": {
      "type": "integer",
      "minimum": 0,
      "description": "The estimate behind size, two significant figures. Present only when described is true."
    },
    "described": {
      "type": "boolean",
      "description": "True when the breakdown below is present. False for a segment too small to describe, or when the sample is unavailable; message says which."
    },
    "message": {
      "type": "string",
      "description": "Why there is no breakdown. Present only when described is false."
    },
    "industries": {
      "type": "array",
      "description": "Industries. At most `top` items, most common first. An item needs 5 sampled stores, so a rare value is left out rather than shown as 0.",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "share_pct": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "Estimated share of the segment's stores, in whole percent."
          }
        },
        "required": [
          "name",
          "share_pct"
        ],
        "additionalProperties": false
      }
    },
    "niches": {
      "type": "array",
      "description": "Niches inside an industry. At most `top` items, most common first. An item needs 5 sampled stores, so a rare value is left out rather than shown as 0.",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "share_pct": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "Estimated share of the segment's stores, in whole percent."
          }
        },
        "required": [
          "name",
          "share_pct"
        ],
        "additionalProperties": false
      }
    },
    "countries": {
      "type": "array",
      "description": "Countries. A store can have more than one, so shares can add up past 100. At most `top` items, most common first. An item needs 5 sampled stores, so a rare value is left out rather than shown as 0.",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "ISO-3166 alpha-2."
          },
          "share_pct": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "Estimated share of the segment's stores, in whole percent."
          }
        },
        "required": [
          "code",
          "share_pct"
        ],
        "additionalProperties": false
      }
    },
    "languages": {
      "type": "array",
      "description": "Storefront languages. Shares can add up past 100. At most `top` items, most common first. An item needs 5 sampled stores, so a rare value is left out rather than shown as 0.",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "share_pct": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "Estimated share of the segment's stores, in whole percent."
          }
        },
        "required": [
          "code",
          "share_pct"
        ],
        "additionalProperties": false
      }
    },
    "themes": {
      "type": "array",
      "description": "Shopify themes. At most `top` items, most common first. An item needs 5 sampled stores, so a rare value is left out rather than shown as 0.",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "share_pct": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "Estimated share of the segment's stores, in whole percent."
          }
        },
        "required": [
          "name",
          "share_pct"
        ],
        "additionalProperties": false
      }
    },
    "shopify_apps": {
      "type": "array",
      "description": "Shopify apps. The share is the app's adoption rate in the segment. At most `top` items, most common first. An item needs 5 sampled stores, so a rare value is left out rather than shown as 0.",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "id": {
            "type": "integer",
            "description": "Pass it into the shopify_apps filter."
          },
          "share_pct": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "Estimated share of the segment's stores, in whole percent."
          }
        },
        "required": [
          "name",
          "id",
          "share_pct"
        ],
        "additionalProperties": false
      }
    },
    "technologies": {
      "type": "array",
      "description": "Technologies. The share is the adoption rate in the segment. At most `top` items, most common first. An item needs 5 sampled stores, so a rare value is left out rather than shown as 0.",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "id": {
            "type": "integer",
            "description": "Pass it into the technologies filter."
          },
          "share_pct": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "description": "Estimated share of the segment's stores, in whole percent."
          }
        },
        "required": [
          "name",
          "id",
          "share_pct"
        ],
        "additionalProperties": false
      }
    },
    "with_email_pct": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100,
      "description": "Share of the segment with at least one email address. Whole percent."
    },
    "with_phone_pct": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100,
      "description": "Share of the segment with at least one phone number. Whole percent."
    },
    "with_blog_pct": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100,
      "description": "Share of the segment with a blog. Whole percent."
    },
    "product_count": {
      "type": [
        "object",
        "null"
      ],
      "description": "Product catalog size. Null when fewer than 20 sampled stores have a known product count. Two significant figures.",
      "properties": {
        "lower_quartile": {
          "type": "integer"
        },
        "median": {
          "type": "integer"
        },
        "upper_quartile": {
          "type": "integer"
        },
        "known_pct": {
          "type": "integer",
          "minimum": 0,
          "maximum": 100,
          "description": "Share of the segment whose product count is known. Whole percent."
        }
      },
      "required": [
        "lower_quartile",
        "median",
        "upper_quartile",
        "known_pct"
      ],
      "additionalProperties": false
    },
    "new_stores_by_month": {
      "type": "array",
      "description": "The 12 full calendar months before this one, oldest first, by the month StoreRadar first saw each store. A store can be older than its first sighting.",
      "items": {
        "type": "object",
        "properties": {
          "month": {
            "type": "string",
            "description": "YYYY-MM."
          },
          "new_stores": {
            "type": "string",
            "description": "A label: 'about 1,200', or 'fewer than about 250' when fewer than 5 sampled stores fall in the month (zero included)."
          },
          "estimated_new_stores": {
            "type": "integer",
            "minimum": 0,
            "description": "Present only when new_stores is 'about N'."
          }
        },
        "required": [
          "month",
          "new_stores"
        ],
        "additionalProperties": false
      }
    },
    "basis": {
      "type": "object",
      "description": "Where the numbers come from and how precise they are.",
      "properties": {
        "method": {
          "type": "string"
        },
        "sample_percent": {
          "type": "integer"
        },
        "sample_rows": {
          "type": "integer",
          "minimum": 50,
          "description": "Sampled stores in this segment. Present only when described is true."
        },
        "share_margin_pct": {
          "type": "integer",
          "minimum": 0,
          "description": "The widest 95% margin of any share here, in percentage points. Present only when described is true."
        }
      },
      "required": [
        "method",
        "sample_percent"
      ],
      "additionalProperties": false
    },
    "ignored_filters": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "ignored_filters_message": {
      "type": "string"
    },
    "upgrade_url": {
      "type": "string"
    },
    "upgrade_message": {
      "type": "string"
    }
  },
  "required": [
    "size",
    "described",
    "basis"
  ]
}