{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/alphaai/json-schema/alphaai-story-materials-schema.json",
  "title": "StoryMaterials",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/alphaai-stories-api-openapi.yml#/components/schemas/StoryMaterials",
  "type": "object",
  "required": [
    "story_id",
    "results",
    "next_cursor"
  ],
  "properties": {
    "story_id": {
      "type": "string"
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/StoryMaterial"
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ],
      "description": "Opaque cursor for the next (newer) page; `null` at the end."
    }
  },
  "$defs": {
    "StoryMaterial": {
      "type": "object",
      "required": [
        "uid",
        "title",
        "publisher",
        "time_published",
        "url",
        "relevance_score",
        "seo_eligible"
      ],
      "properties": {
        "uid": {
          "type": "string",
          "description": "The article's uid — `/api/news/{uid}/` has the enriched row."
        },
        "title": {
          "type": "string"
        },
        "publisher": {
          "type": "string",
          "description": "Source domain."
        },
        "time_published": {
          "type": "string",
          "format": "date-time"
        },
        "url": {
          "type": "string",
          "description": "The publisher's own URL of the article."
        },
        "relevance_score": {
          "type": "integer",
          "minimum": 1,
          "maximum": 10
        },
        "seo_eligible": {
          "type": "boolean",
          "description": "Whether the article passes AlphAI's quality gate (relevance 7+, tickers, a news category, new information); the story page links such articles to their alphai.io page. Informational — the API serves every row regardless."
        }
      }
    }
  }
}