{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/parallel-ai/json-schema/parallel-ai-v1-extract-request-schema.json",
  "title": "V1ExtractRequest",
  "description": "Extract request.",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/parallel-ai-extract-api-openapi.yml#/components/schemas/V1ExtractRequest",
  "properties": {
    "urls": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Urls",
      "description": "URLs to extract content from. Up to 20 URLs."
    },
    "objective": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Objective",
      "description": "As in SearchRequest, a natural-language description of the underlying question or goal driving the request. Used together with search_queries to focus excerpts on the most relevant content."
    },
    "search_queries": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Search Queries",
      "description": "Optional keyword search queries, as in SearchRequest. Used together with objective to focus excerpts on the most relevant content."
    },
    "max_chars_total": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Chars Total",
      "description": "Upper bound on total characters across excerpts from all extracted results."
    },
    "session_id": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 1000
        },
        {
          "type": "null"
        }
      ],
      "title": "Session Id",
      "description": "Session identifier to track calls across separate search and extract calls, to be used as part of a larger task. Specifying it may give better contextual results for subsequent API calls."
    },
    "client_model": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Client Model",
      "description": "The model generating this request and consuming the results. Enables optimizations and tailors default settings for the model's capabilities."
    },
    "advanced_settings": {
      "anyOf": [
        {
          "$ref": "#/$defs/AdvancedExtractSettings"
        },
        {
          "type": "null"
        }
      ],
      "description": "Advanced configuration for fetch policy, excerpt settings, and full content settings. May impact result quality and latency unless used carefully. When omitted, excerpts are enabled and full content is disabled by default."
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "urls"
  ],
  "$defs": {
    "AdvancedExtractSettings": {
      "properties": {
        "fetch_policy": {
          "anyOf": [
            {
              "$ref": "#/$defs/FetchPolicy"
            },
            {
              "type": "null"
            }
          ],
          "description": "Fetch policy: determines when to return cached content from the index (faster) vs fetching live content (fresher). Default is to use a dynamic policy based on the search objective and url. Note: enabling live fetch significantly increases extract latency because it requires fetching content from source websites."
        },
        "excerpt_settings": {
          "anyOf": [
            {
              "$ref": "#/$defs/V1ExcerptSettings"
            },
            {
              "type": "null"
            }
          ],
          "description": "Controls excerpt sizes. Provide excerpt settings for fine-grained control, or omit to use defaults."
        },
        "full_content": {
          "anyOf": [
            {
              "$ref": "#/$defs/FullContentSettings"
            },
            {
              "type": "boolean"
            }
          ],
          "title": "Full Content",
          "description": "Controls full content extraction. Set to true to enable with defaults, false to disable, or provide FullContentSettings for fine-grained control.",
          "default": false
        }
      },
      "additionalProperties": false,
      "type": "object",
      "title": "AdvancedExtractSettings",
      "description": "Advanced extract configuration.\n\nThese settings may impact result quality and latency unless used carefully.\nSee https://docs.parallel.ai/search/advanced-extract-settings for more info."
    },
    "FetchPolicy": {
      "properties": {
        "max_age_seconds": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Max Age Seconds",
          "description": "Maximum age of cached content in seconds to trigger a live fetch. Minimum value 600 seconds (10 minutes)."
        },
        "timeout_seconds": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Timeout Seconds",
          "description": "Timeout in seconds for fetching live content if unavailable in cache."
        },
        "disable_cache_fallback": {
          "type": "boolean",
          "title": "Disable Cache Fallback",
          "description": "If false, fallback to cached content older than max-age if live fetch fails or times out. If true, returns an error instead.",
          "default": false
        }
      },
      "type": "object",
      "title": "FetchPolicy",
      "description": "Policy for live fetching web results."
    },
    "FullContentSettings": {
      "properties": {
        "max_chars_per_result": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Max Chars Per Result",
          "description": "Optional limit on the number of characters to include in the full content for each url. Full content always starts at the beginning of the page and is truncated at the limit if necessary."
        }
      },
      "type": "object",
      "title": "FullContentSettings",
      "description": "Optional settings for returning full content."
    },
    "V1ExcerptSettings": {
      "properties": {
        "max_chars_per_result": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Max Chars Per Result",
          "description": "Optional upper bound on the total number of characters to include per url. Excerpts may contain fewer characters than this limit to maximize relevance and token efficiency."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "title": "V1ExcerptSettings",
      "description": "Optional settings for returning relevant excerpts."
    }
  }
}