{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/searlo-tech/json-schema/searlo-tech-extract-response-schema.json",
  "title": "ExtractResponse",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/searlo-tech-openapi.yaml#/components/schemas/ExtractResponse",
  "type": "object",
  "properties": {
    "searchParameters": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "urls": {
          "type": "integer"
        },
        "fields": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "mode": {
      "type": "string",
      "enum": [
        "structured",
        "structured+llm"
      ]
    },
    "llmAvailable": {
      "type": "boolean"
    },
    "totalResults": {
      "type": "integer",
      "description": "Rows in data."
    },
    "partial": {
      "type": "boolean",
      "description": "Present and true when the time budget ran out before every URL was fetched: the rows say which (TIMEOUT, NOT_FETCHED); the rest are served and billed."
    },
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "url",
          "success",
          "data"
        ],
        "properties": {
          "url": {
            "type": "string"
          },
          "success": {
            "type": "boolean",
            "description": "true: the page was fetched (1 credit). false: free."
          },
          "data": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true,
            "description": "The record; null on a failed row."
          },
          "_sources": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "enum": [
                "json-ld",
                "meta",
                "text",
                "llm"
              ]
            }
          },
          "missingFields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "via": {
            "type": [
              "string",
              "null"
            ]
          },
          "llmUsed": {
            "type": "boolean"
          },
          "llmSkipped": {
            "type": "string",
            "enum": [
              "time budget"
            ],
            "description": "The page came in too late to ask the model for its missing fields."
          },
          "errorCode": {
            "type": "string",
            "enum": [
              "TARGET_REFUSED",
              "TARGET_NOT_ALLOWED",
              "TARGET_UNREACHABLE",
              "INVALID_REQUEST",
              "SCRAPE_FAILED",
              "TIMEOUT",
              "NOT_FETCHED"
            ],
            "description": "On a failed row."
          },
          "error": {
            "type": "string",
            "description": "On a failed row: what happened."
          },
          "retryable": {
            "type": "boolean",
            "description": "On a failed row: whether a retry may succeed."
          },
          "targetStatus": {
            "type": "integer",
            "description": "On a TARGET_REFUSED row: the site's own HTTP status."
          }
        }
      }
    },
    "source": {
      "type": "string"
    },
    "credits": {
      "type": "number",
      "description": "Pages fetched."
    }
  }
}