{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/scrapiq-io/json-schema/scrapiq-io-extract-response-schema.json",
  "title": "ExtractResponse",
  "description": "Response with extracted data.",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scrapiq-io-openapi.json#/components/schemas/ExtractResponse",
  "properties": {
    "url": {
      "type": "string",
      "title": "Url"
    },
    "format": {
      "type": "string",
      "title": "Format"
    },
    "data": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Data",
      "description": "Structured data extracted according to the schema. None if format != 'json'."
    },
    "content": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Content",
      "description": "Cleaned text or markdown content. None if format == 'json'."
    },
    "metadata": {
      "anyOf": [
        {
          "$ref": "#/$defs/PageMetadata"
        },
        {
          "type": "null"
        }
      ]
    },
    "cached": {
      "type": "boolean",
      "title": "Cached",
      "default": false
    },
    "extraction_time_ms": {
      "type": "integer",
      "title": "Extraction Time Ms"
    }
  },
  "type": "object",
  "required": [
    "url",
    "format",
    "extraction_time_ms"
  ],
  "$defs": {
    "PageMetadata": {
      "properties": {
        "title": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Title"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Description"
        },
        "author": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Author"
        },
        "published_date": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Published Date"
        },
        "language": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Language"
        },
        "canonical_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Canonical Url"
        },
        "word_count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Word Count"
        }
      },
      "type": "object",
      "title": "PageMetadata",
      "description": "Metadata about the fetched page."
    }
  }
}