{
  "openapi": "3.1.0",
  "info": {
    "title": "ContextFetch",
    "version": "1.0",
    "description": "Web search and page contents for AI agents, returned as Markdown pruned to the passages relevant to the query. No key is needed for 25 requests per IP per UTC day; `POST /v1/keys/free` gives a free key with 2,500 credits; packs are one-time payments (https://contextfetch.dev/pricing). The Exa SDKs work with base URL `https://api.contextfetch.dev` and the Tavily SDKs with `https://api.contextfetch.dev/tavily`. Full reference with response examples: https://contextfetch.dev/llms-full.txt",
    "termsOfService": "https://contextfetch.dev/terms",
    "contact": {
      "name": "ContextFetch",
      "url": "https://contextfetch.dev",
      "email": "hello@contextfetch.dev"
    },
    "x-logo": {
      "url": "https://contextfetch.dev/apple-touch-icon.png"
    }
  },
  "externalDocs": {
    "description": "Docs",
    "url": "https://contextfetch.dev/docs"
  },
  "servers": [
    {
      "url": "https://api.contextfetch.dev"
    }
  ],
  "security": [
    {},
    {
      "apiKey": []
    }
  ],
  "paths": {
    "/v1/search": {
      "post": {
        "summary": "Search the web",
        "operationId": "post__v1_search",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Search V1 Search Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Unknown API key (`invalid_api_key`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Keyless daily limit reached or out of credits (`keyless_limit`, `insufficient_credits`). The body lists the credit packs with checkout links; the `X-Payment-URL` header has the default one.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "description": "Web search for AI agents. Each result has its title, URL and date and, when asked for in `contents`, the page as Markdown (`text`), `highlights` and `prunedContext`: only the passages relevant to the query, chosen by a cross-encoder. Exa-compatible request and response; `/search` takes the same body."
      }
    },
    "/v1/contents": {
      "post": {
        "summary": "Get page contents",
        "operationId": "post__v1_contents",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContentsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Contents V1 Contents Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Unknown API key (`invalid_api_key`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Keyless daily limit reached or out of credits (`keyless_limit`, `insufficient_credits`). The body lists the credit packs with checkout links; the `X-Payment-URL` header has the default one.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "The URL is not a public http(s) URL (`url_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "description": "Pages as Markdown for a list of URLs (or ids from a search), with optional highlights and pruned context for a query. Exa /contents-compatible."
      }
    },
    "/v1/findSimilar": {
      "post": {
        "summary": "Find similar pages",
        "operationId": "post__v1_findSimilar",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FindSimilarRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Find Similar V1 Findsimilar Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Unknown API key (`invalid_api_key`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Keyless daily limit reached or out of credits (`keyless_limit`, `insufficient_credits`). The body lists the credit packs with checkout links; the `X-Payment-URL` header has the default one.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "The URL is not a public http(s) URL (`url_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "description": "Pages similar to a URL, with the same `contents` options as search. Exa /findSimilar-compatible."
      }
    },
    "/v1/answer": {
      "post": {
        "summary": "Answer with citations",
        "description": "Searches, then quotes the best-scoring passages of the top pages verbatim as the answer, with their citations. No LLM: the response's `type` is `extractive`. Exa /answer-compatible shape.",
        "operationId": "post__v1_answer",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnswerRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Answer V1 Answer Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Unknown API key (`invalid_api_key`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Keyless daily limit reached or out of credits (`keyless_limit`, `insufficient_credits`). The body lists the credit packs with checkout links; the `X-Payment-URL` header has the default one.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v1/research": {
      "post": {
        "summary": "Research in one call",
        "description": "Runs up to 5 sub-queries (yours, or derived from `query`) at once, merges the pages by URL, ranks them against `query` with the cross-encoder and returns one evidence pack with highlights and pruned context. `depth: deep` adds sub-topics, the pages hub results link to, and a cited `report` (1 credit). No LLM.",
        "operationId": "post__v1_research",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Unknown API key (`invalid_api_key`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Keyless daily limit reached or out of credits (`keyless_limit`, `insufficient_credits`). The body lists the credit packs with checkout links; the `X-Payment-URL` header has the default one.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v1/crawl": {
      "post": {
        "summary": "Crawl a site",
        "description": "Bounded crawl from `url`: up to 5 hops and 500 pages, with path and domain filters; best-first when `query` (or `instructions`) says what to look for. Each page as Markdown. Over 50 pages (or `async`) it answers 202 with a job id for `GET /v1/jobs/{job_id}`. Tavily /crawl-compatible at `/tavily/crawl`.",
        "operationId": "post__v1_crawl",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrawlRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Unknown API key (`invalid_api_key`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Keyless daily limit reached or out of credits (`keyless_limit`, `insufficient_credits`). The body lists the credit packs with checkout links; the `X-Payment-URL` header has the default one.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "The URL is not a public http(s) URL (`url_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v1/jobs/{job_id}": {
      "get": {
        "summary": "Background job",
        "description": "A crawl or research job's state: running (with progress), completed (with the result) or failed. Kept 24 hours.",
        "operationId": "get__v1_jobs_{job_id}",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Job Status V1 Jobs  Job Id  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "404": {
            "description": "No such job (`job_not_found`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v1/map": {
      "post": {
        "summary": "Map a site's URLs",
        "description": "A site's URLs from its start page's links and its sitemaps, without fetching the pages. Tavily /map-compatible at `/tavily/map`.",
        "operationId": "post__v1_map",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MapRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Site Map V1 Map Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Unknown API key (`invalid_api_key`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Keyless daily limit reached or out of credits (`keyless_limit`, `insufficient_credits`). The body lists the credit packs with checkout links; the `X-Payment-URL` header has the default one.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "The URL is not a public http(s) URL (`url_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/r/{url}": {
      "get": {
        "summary": "Read a URL as Markdown",
        "operationId": "get__r_{url}",
        "parameters": [
          {
            "name": "url",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Url"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Unknown API key (`invalid_api_key`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "402": {
            "description": "Keyless daily limit reached or out of credits (`keyless_limit`, `insufficient_credits`). The body lists the credit packs with checkout links; the `X-Payment-URL` header has the default one.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "The URL is not a public http(s) URL (`url_not_allowed`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "description": "Any public URL as Markdown (`text/markdown`), e.g. `GET /r/https://example.com`. Add `q` to keep only the passages relevant to that query."
      }
    },
    "/v1/keys/free": {
      "post": {
        "tags": [
          "agent"
        ],
        "summary": "Get a free API key",
        "description": "A free key with 2,500 credits, no signup and no body. One per network.",
        "operationId": "post__v1_keys_free",
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Free Key V1 Keys Free Post"
                }
              }
            }
          }
        }
      }
    },
    "/v1/balance": {
      "get": {
        "tags": [
          "agent"
        ],
        "summary": "Credit balance",
        "operationId": "get__v1_balance",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Balance V1 V1 Balance Get"
                }
              }
            }
          },
          "401": {
            "description": "Unknown API key (`invalid_api_key`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "description": "Credits left and the auto-reload settings of the key in the Authorization header."
      }
    },
    "/v1/usage": {
      "get": {
        "tags": [
          "agent"
        ],
        "summary": "Key usage",
        "description": "Requests and credits per day and per endpoint for the key in the Authorization header (up to 95 days).",
        "operationId": "get__v1_usage",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 95,
              "minimum": 1,
              "default": 30,
              "title": "Days"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Key Usage V1 Usage Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Unknown API key (`invalid_api_key`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v1/logs": {
      "get": {
        "tags": [
          "agent"
        ],
        "summary": "Key request log",
        "description": "The key's request log (time, endpoint, status, credits, ms; never queries) when its owner turned it on.",
        "operationId": "get__v1_logs",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 1000,
              "minimum": 1,
              "default": 100,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Key Logs V1 Logs Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Unknown API key (`invalid_api_key`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v1/billing/auto-reload": {
      "post": {
        "tags": [
          "agent"
        ],
        "summary": "Set auto-reload",
        "operationId": "post__v1_billing_auto-reload",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AutoReloadIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Auto Reload V1 V1 Billing Auto Reload Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "401": {
            "description": "Unknown API key (`invalid_api_key`).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "409": {
            "description": "No saved card (`no_payment_method`); the message has a buy link.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "description": "Turn auto-reload on or off, or change its threshold, pack or monthly cap, for the key in the Authorization header. Needs a card saved at checkout."
      }
    },
    "/status": {
      "get": {
        "summary": "Uptime and latency",
        "description": "Uptime and latency from the API server's minute probe.",
        "operationId": "get__status",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Public Status Status Get"
                }
              }
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "summary": "Health check",
        "description": "Answers `{\"status\": \"ok\", ...}` while the API is up.",
        "operationId": "get__health",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Health Health Get"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AnswerRequest": {
        "properties": {
          "query": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Query"
          },
          "text": {
            "type": "boolean",
            "title": "Text",
            "default": false
          },
          "numResults": {
            "type": "integer",
            "maximum": 10.0,
            "minimum": 1.0,
            "title": "Numresults",
            "default": 5
          },
          "outputSchema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Outputschema"
          }
        },
        "type": "object",
        "required": [
          "query"
        ],
        "title": "AnswerRequest"
      },
      "AutoReloadIn": {
        "properties": {
          "enabled": {
            "type": "boolean",
            "title": "Enabled"
          },
          "threshold": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 100000.0,
                "minimum": 100.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Threshold"
          },
          "pack": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "instant",
                  "builder",
                  "scale"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Pack"
          },
          "monthly_max_usd": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Max Usd"
          },
          "session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Session Id"
          }
        },
        "type": "object",
        "required": [
          "enabled"
        ],
        "title": "AutoReloadIn"
      },
      "ContentsOptions": {
        "properties": {
          "text": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "$ref": "#/components/schemas/TextOptions"
              }
            ],
            "title": "Text",
            "default": false
          },
          "highlights": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "$ref": "#/components/schemas/HighlightOptions"
              }
            ],
            "title": "Highlights",
            "default": false
          },
          "prunedContext": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "additionalProperties": true,
                "type": "object"
              }
            ],
            "title": "Prunedcontext",
            "default": false
          },
          "livecrawl": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "never",
                  "fallback",
                  "always",
                  "preferred",
                  "auto"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Livecrawl"
          },
          "maxAgeHours": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Maxagehours"
          }
        },
        "type": "object",
        "title": "ContentsOptions"
      },
      "ContentsRequest": {
        "properties": {
          "ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ids"
          },
          "urls": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Urls"
          },
          "text": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "$ref": "#/components/schemas/TextOptions"
              }
            ],
            "title": "Text",
            "default": true
          },
          "highlights": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "$ref": "#/components/schemas/HighlightOptions"
              }
            ],
            "title": "Highlights",
            "default": false
          },
          "prunedContext": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "additionalProperties": true,
                "type": "object"
              }
            ],
            "title": "Prunedcontext",
            "default": false
          },
          "outputSchema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Outputschema"
          }
        },
        "type": "object",
        "title": "ContentsRequest"
      },
      "CrawlRequest": {
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 2048,
            "minLength": 1,
            "title": "Url"
          },
          "limit": {
            "type": "integer",
            "maximum": 500.0,
            "minimum": 1.0,
            "title": "Limit",
            "default": 10
          },
          "includePaths": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 20
              },
              {
                "type": "null"
              }
            ],
            "title": "Includepaths"
          },
          "selectPaths": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 20
              },
              {
                "type": "null"
              }
            ],
            "title": "Selectpaths"
          },
          "excludePaths": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 20
              },
              {
                "type": "null"
              }
            ],
            "title": "Excludepaths"
          },
          "apiKey": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Apikey"
          },
          "maxDepth": {
            "type": "integer",
            "maximum": 5.0,
            "minimum": 0.0,
            "title": "Maxdepth",
            "default": 1
          },
          "maxBreadth": {
            "type": "integer",
            "maximum": 500.0,
            "minimum": 1.0,
            "title": "Maxbreadth",
            "default": 20
          },
          "query": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "title": "Query"
          },
          "instructions": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000
              },
              {
                "type": "null"
              }
            ],
            "title": "Instructions"
          },
          "allowExternal": {
            "type": "boolean",
            "title": "Allowexternal",
            "default": false
          },
          "selectDomains": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 20
              },
              {
                "type": "null"
              }
            ],
            "title": "Selectdomains"
          },
          "excludeDomains": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 20
              },
              {
                "type": "null"
              }
            ],
            "title": "Excludedomains"
          },
          "async": {
            "type": "boolean",
            "title": "Async",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "CrawlRequest"
      },
      "FindSimilarRequest": {
        "properties": {
          "url": {
            "type": "string",
            "minLength": 1,
            "title": "Url"
          },
          "numResults": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Numresults",
            "default": 10
          },
          "includeDomains": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Includedomains"
          },
          "excludeDomains": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Excludedomains"
          },
          "startPublishedDate": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Startpublisheddate"
          },
          "endPublishedDate": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Endpublisheddate"
          },
          "includeText": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 5
              },
              {
                "type": "null"
              }
            ],
            "title": "Includetext"
          },
          "excludeText": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 5
              },
              {
                "type": "null"
              }
            ],
            "title": "Excludetext"
          },
          "excludeSourceDomain": {
            "type": "boolean",
            "title": "Excludesourcedomain",
            "default": true
          },
          "contents": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ContentsOptions"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contents"
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "FindSimilarRequest"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "HighlightOptions": {
        "properties": {
          "query": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Query"
          },
          "numSentences": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Numsentences"
          },
          "highlightsPerUrl": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Highlightsperurl"
          }
        },
        "type": "object",
        "title": "HighlightOptions"
      },
      "MapRequest": {
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 2048,
            "minLength": 1,
            "title": "Url"
          },
          "limit": {
            "type": "integer",
            "maximum": 5000.0,
            "minimum": 1.0,
            "title": "Limit",
            "default": 100
          },
          "includePaths": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 20
              },
              {
                "type": "null"
              }
            ],
            "title": "Includepaths"
          },
          "selectPaths": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 20
              },
              {
                "type": "null"
              }
            ],
            "title": "Selectpaths"
          },
          "excludePaths": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 20
              },
              {
                "type": "null"
              }
            ],
            "title": "Excludepaths"
          },
          "apiKey": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Apikey"
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "MapRequest",
        "description": "Also the Tavily /map body (snake_case, `select_paths`, `api_key`)."
      },
      "ResearchRequest": {
        "properties": {
          "query": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Query"
          },
          "subQueries": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 5,
                "minItems": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Subqueries"
          },
          "numResultsPerQuery": {
            "type": "integer",
            "maximum": 10.0,
            "minimum": 1.0,
            "title": "Numresultsperquery",
            "default": 5
          },
          "contents": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ContentsOptions"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contents"
          },
          "outputSchema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Outputschema"
          },
          "depth": {
            "type": "string",
            "enum": [
              "standard",
              "deep"
            ],
            "title": "Depth",
            "default": "standard"
          },
          "citationFormat": {
            "type": "string",
            "enum": [
              "numbered",
              "apa",
              "mla",
              "chicago"
            ],
            "title": "Citationformat",
            "default": "numbered"
          },
          "async": {
            "type": "boolean",
            "title": "Async",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "query"
        ],
        "title": "ResearchRequest"
      },
      "SearchRequest": {
        "properties": {
          "query": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Query"
          },
          "numResults": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Numresults",
            "default": 10
          },
          "includeDomains": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Includedomains"
          },
          "excludeDomains": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Excludedomains"
          },
          "startPublishedDate": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Startpublisheddate"
          },
          "endPublishedDate": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Endpublisheddate"
          },
          "timeRange": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "day",
                  "week",
                  "month",
                  "year",
                  "d",
                  "w",
                  "m",
                  "y"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Timerange"
          },
          "topic": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "general",
                  "news",
                  "finance"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Topic"
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category"
          },
          "includeText": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 5
              },
              {
                "type": "null"
              }
            ],
            "title": "Includetext"
          },
          "excludeText": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 5
              },
              {
                "type": "null"
              }
            ],
            "title": "Excludetext"
          },
          "userLocation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Userlocation"
          },
          "language": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Language"
          },
          "filterByLanguage": {
            "type": "boolean",
            "title": "Filterbylanguage",
            "default": false
          },
          "type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Type"
          },
          "contents": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ContentsOptions"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contents"
          },
          "outputSchema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Outputschema"
          },
          "freshness": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "hybrid",
                  "cache_only",
                  "live"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Freshness"
          },
          "maxTokens": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Maxtokens"
          }
        },
        "type": "object",
        "required": [
          "query"
        ],
        "title": "SearchRequest"
      },
      "TextOptions": {
        "properties": {
          "maxCharacters": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Maxcharacters"
          }
        },
        "type": "object",
        "title": "TextOptions"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Authorization: Bearer <key>"
      }
    }
  }
}
