{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/alpaca/json-schema/alpaca-get-news-response-schema.json",
  "title": "GetNewsResponse",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/alpaca-news-api-openapi.yml#/components/schemas/GetNewsResponse",
  "type": "object",
  "properties": {
    "news": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/News"
      }
    },
    "next_page_token": {
      "type": "string",
      "description": "Pagination token for next page"
    }
  },
  "$defs": {
    "News": {
      "description": "Model representing a news article from the Alpaca Market Data API",
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "format": "int64",
          "description": "News article ID"
        },
        "headline": {
          "type": "string",
          "minLength": 1,
          "description": "Headline or title of the article"
        },
        "author": {
          "type": "string",
          "minLength": 1,
          "description": "Original author of news article"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "description": "Date article was created (RFC 3339)"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time",
          "description": "Date article was updated (RFC 3339)"
        },
        "summary": {
          "type": "string",
          "minLength": 1,
          "description": "Summary text for the article (may be first sentence of content)"
        },
        "content": {
          "type": "string",
          "minLength": 1,
          "description": "Content of the news article (might contain HTML)"
        },
        "url": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri",
          "description": "URL of article (if applicable)"
        },
        "images": {
          "type": "array",
          "uniqueItems": true,
          "description": "List of images (URLs) related to given article (may be empty)",
          "items": {
            "$ref": "#/$defs/NewsImage"
          }
        },
        "symbols": {
          "type": "array",
          "description": "List of related or mentioned symbols",
          "items": {
            "type": "string"
          }
        },
        "source": {
          "type": "string",
          "minLength": 1,
          "description": "Source where the news originated from (e.g. Benzinga)"
        }
      },
      "required": [
        "id",
        "headline",
        "author",
        "created_at",
        "updated_at",
        "summary",
        "content",
        "images",
        "symbols",
        "source"
      ]
    },
    "NewsImage": {
      "description": "A model representing images for news article. simply a url to the image along with a size parameter suggesting the display size of the image",
      "type": "object",
      "title": "NewsImage",
      "properties": {
        "size": {
          "type": "string",
          "minLength": 1,
          "description": "Possible values for size are thumb, small and large.",
          "enum": [
            "thumb",
            "small",
            "large"
          ],
          "readOnly": true
        },
        "url": {
          "type": "string",
          "minLength": 1,
          "description": "url to image from news article",
          "format": "uri",
          "readOnly": true
        }
      },
      "required": [
        "size",
        "url"
      ]
    }
  }
}