{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/oxfordledge-com/json-schema/oxfordledge-com-screener-response-schema.json",
  "title": "ScreenerResponse",
  "description": "`/api/screener` — main stock screener with soft-paywall teaser.\n\nF4 boundary backfill 2026-05-08 (Initiative 6). Public (no auth);\nfree users get a 3-row teaser + `locked: true` so they can see\nthe screener works before upgrading. The FE iterates `data.results`\nwith a `|| []` fallback already, so the boundary test pins the\npresence of the key — not the value.",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/oxfordledge-com-api-openapi.yml#/components/schemas/ScreenerResponse",
  "properties": {
    "results": {
      "items": {},
      "type": "array",
      "title": "Results",
      "description": "Filtered stock rows. Empty list when no rows match or in error path. FE iterates with `data.results || []`."
    },
    "_vendor_prices_withheld": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Vendor Prices Withheld",
      "description": "OWNER R3 (2026-10-12): true on an anonymous teaser whose vendor-price columns were nulled because OL_PUBLIC_VENDOR_PRICES is off. FE (screener-options.ts) then shows `_price_notice` instead of reading the nulls as zero. Absent otherwise."
    },
    "_price_notice": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Price Notice",
      "description": "The plain-language withheld-price notice that travels with `_vendor_prices_withheld` (services/public_price_gate.py NOTICE_KEY)."
    },
    "price_filters_available": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Price Filters Available",
      "description": "QA 2026-10-13 P1: false when this viewer may not see vendor prices, so the price-derived filters (P/E, EV/EBITDA, EBIT/EV, market cap, dividend yield, P/B, near 52-week low) are refused rather than applied. FE disables those inputs."
    },
    "filters_not_applied": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Filters Not Applied",
      "description": "The requested filter/sort params that were REFUSED and not applied (services/public_price_gate.SCREENER_PRICE_FILTER_KEYS). Absent when nothing was refused."
    },
    "filters_not_applied_reason": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Filters Not Applied Reason",
      "description": "Why `filters_not_applied` were refused: they need market prices, which are shown to signed-in users."
    },
    "total": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Total",
      "description": "Rows that matched the applied filters before any teaser cap. The FE count reads it as 'N matches'."
    },
    "universe_size": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Universe Size",
      "description": "Tickers scanned (the snapshot universe plus the viewer's recently viewed tickers)."
    },
    "coverage_note": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Coverage Note",
      "description": "Plain-language description of the scanned universe."
    },
    "coverage": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Coverage",
      "description": "{total_checked, passed, filtered_out, applied_filters, post_filters}: which filters shaped the rows. FE banner reads it."
    },
    "locked": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Locked",
      "description": "True on the free/anonymous teaser: only the first rows are returned and the rest need an upgrade. FE renders the lock row (screener-options.ts _scrLockInfo)."
    },
    "locked_total": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Locked Total",
      "description": "True match count behind a locked teaser, so the lock row and count can say 'N matches (3 shown)'."
    },
    "upgrade": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Upgrade",
      "description": "{message, url} for the lock row's call to action. Present only when `locked` is true."
    },
    "insider_filter": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Insider Filter",
      "description": "P0 2026-10-18: present when the request carried insider_days / insider_min_buys / insider_net_positive. {applied, available, days, min_buys, net_positive, window, counting, tickers_matched | message}. `applied` and `available` are both true only when every row passed the Form 4 insider aggregate (rows then carry insiderBuys / insiderSells / insiderNet / insiderNetShares); false with a 503 and no rows when the aggregate could not be read. The FE shows no row under an insider caption unless both are true."
    }
  },
  "additionalProperties": true,
  "type": "object",
  "required": [
    "results"
  ]
}