{
  "openapi": "3.1.0",
  "info": {
    "title": "VirginProxy API",
    "version": "1.1.0",
    "summary": "Web scraping API: one request in, one answer out, one price.",
    "description": "Fetch any public web page through our network, optionally rendered in a real browser, as HTML, Markdown, text or extracted JSON. Billing per answer in credits: 1 credit per started MB, +9 with `render`, +5 per new IP; failures where the target never answered are free.\n\nTest keys (`vp_test_…`) get sample answers and are never charged: https://docs.virginproxy.com/test-mode/\n\nGuides: https://docs.virginproxy.com/ · All docs as Markdown for AI: https://docs.virginproxy.com/llms-full.txt · Changes: https://docs.virginproxy.com/changelog/",
    "termsOfService": "https://www.virginproxy.com/en/terms/",
    "contact": {
      "name": "VirginProxy",
      "email": "hello@virginproxy.com",
      "url": "https://docs.virginproxy.com"
    },
    "license": {
      "name": "Proprietary – use under the VirginProxy terms",
      "url": "https://www.virginproxy.com/en/terms/"
    }
  },
  "externalDocs": {
    "description": "Documentation",
    "url": "https://docs.virginproxy.com"
  },
  "servers": [
    {
      "url": "https://api.virginproxy.com"
    }
  ],
  "security": [
    {
      "bearer": []
    },
    {
      "apiKeyHeader": []
    }
  ],
  "tags": [
    {
      "name": "Requests",
      "description": "Run requests."
    },
    {
      "name": "Discovery",
      "description": "Find the addresses of a site."
    },
    {
      "name": "Jobs",
      "description": "Many requests and crawls in the background."
    },
    {
      "name": "Account",
      "description": "Credits, limits and your request log."
    },
    {
      "name": "Keys and webhooks",
      "description": "Manage API keys and webhook settings from your own tools."
    },
    {
      "name": "Presets and schedules",
      "description": "Saved request options, and jobs or crawls that run again every interval with a cost cap."
    },
    {
      "name": "AI agents",
      "description": "Use VirginProxy from AI clients."
    },
    {
      "name": "OAuth",
      "description": "Sign-in for MCP clients that connect with OAuth: register, approve on the dashboard, get tokens for /mcp."
    },
    {
      "name": "Service",
      "description": "Status and machine-readable descriptions."
    }
  ],
  "paths": {
    "/v1/requests": {
      "post": {
        "operationId": "createRequest",
        "tags": [
          "Requests"
        ],
        "summary": "Run one request",
        "description": "Fetches one URL through our network and returns the answer with our figures. Charged only when the target answered: 1 credit per started MB, +9 with `render`, +5 per new IP. Waits for the answer (up to about 90 seconds).",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[\\x21-\\x7e]{1,128}$"
            },
            "description": "Optional. The same key with the same body within 24 hours returns the first (recorded) answer again, marked with `Idempotent-Replayed: true`, instead of running and charging a second time. A failure that was not charged is not kept: sending it again runs it again."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestBody"
              },
              "examples": {
                "markdown": {
                  "value": {
                    "url": "https://example.com/",
                    "format": "markdown",
                    "main_content": true
                  }
                },
                "render": {
                  "value": {
                    "url": "https://example.com/",
                    "render": {
                      "wait_until": "networkidle",
                      "screenshot": true
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestResponse"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          },
          "422": {
            "$ref": "#/components/responses/E422"
          },
          "424": {
            "$ref": "#/components/responses/E424"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          },
          "500": {
            "$ref": "#/components/responses/E500"
          },
          "503": {
            "$ref": "#/components/responses/E503"
          }
        }
      },
      "get": {
        "operationId": "listRequests",
        "tags": [
          "Account"
        ],
        "summary": "Your recent requests",
        "description": "Newest first, 1 to 100 per page; `next` continues the list as `before`.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Records per page."
          },
          {
            "name": "result",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ok",
                "http_error",
                "failed"
              ]
            },
            "description": "Only answers below 400, only answers of 400 and above, or only requests without an answer."
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "24h",
                "7d",
                "30d",
                "90d"
              ]
            },
            "description": "Only this recent."
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 64
            },
            "description": "Only requests with this tag."
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Continue after this request id (`next` of the previous page)."
          },
          {
            "name": "host",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            },
            "description": "Only targets whose host contains this text."
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "page",
                "render",
                "screenshot",
                "pdf",
                "batch",
                "job",
                "crawl",
                "map",
                "mcp",
                "search"
              ]
            },
            "description": "Only requests of this kind (page, render, screenshot, pdf, batch, job, crawl, map, mcp)."
          },
          {
            "name": "key",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "description": "Only requests of this key (its id)."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "From this time on (ISO 8601)."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Before this time (ISO 8601)."
          },
          {
            "name": "status_class",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "2xx",
                "3xx",
                "4xx",
                "5xx"
              ]
            },
            "description": "Only answers of the target with a status in this class."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 100,
              "maximum": 599
            },
            "description": "Only answers with exactly this status."
          },
          {
            "name": "error",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only failed requests with this error code (e.g. timeout)."
          },
          {
            "name": "min_ms",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "Only requests that took at least this long."
          },
          {
            "name": "fresh_ip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Only requests with (true) or without (false) a new IP."
          },
          {
            "name": "charged",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Only charged (true) or free (false) requests."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RequestRecord"
                      }
                    },
                    "next": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          }
        }
      }
    },
    "/v1/requests/{id}": {
      "get": {
        "operationId": "getRequest",
        "tags": [
          "Account"
        ],
        "summary": "One request record",
        "description": "Figures of one of your requests (not its content).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^req_[A-Za-z0-9]{20}$"
            },
            "description": "The request id."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestRecord"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v1/requests/{id}/answer": {
      "get": {
        "operationId": "getRequestAnswer",
        "tags": [
          "Account"
        ],
        "summary": "The kept answer of a request",
        "description": "The answer itself, when it is kept: requests sent with an `Idempotency-Key` (24 hours) and answers in the cache (`cache`, up to their age). Free; nothing runs again. Otherwise 404 `answer_not_kept`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^req_[A-Za-z0-9]{20}$"
            },
            "description": "The request id."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "http_status": {
                      "type": "integer"
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "expires_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "answer": {
                      "$ref": "#/components/schemas/RequestResponse"
                    }
                  }
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v1/limits": {
      "get": {
        "operationId": "getLimits",
        "tags": [
          "Account"
        ],
        "summary": "What you may still do right now",
        "description": "Parallel requests and the rate of your plan with their current use, the daily credit cap and the calling key's limits – for clients that pace themselves instead of running into 429 or 402. Free.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Limits"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          }
        }
      }
    },
    "/v1/account/settings": {
      "patch": {
        "operationId": "updateAccountSettings",
        "tags": [
          "Account"
        ],
        "summary": "Daily cap, credit alerts, alert webhook",
        "description": "Needs a key with the `manage` scope and without its own credit limit. Every change is in the audit log.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountSettings"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountSettings"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/v1/presets": {
      "get": {
        "operationId": "listPresets",
        "tags": [
          "Presets and schedules"
        ],
        "summary": "Your presets",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Preset"
                      }
                    },
                    "max_presets": {
                      "type": "integer"
                    }
                  }
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          }
        }
      },
      "post": {
        "operationId": "createPreset",
        "tags": [
          "Presets and schedules"
        ],
        "summary": "Save request options under a name",
        "description": "Use it with `\"preset\": \"name\"` in a request, a job (or its items), a crawl's `request` or a batch; options sent with the request win. Up to 100 per account. Needs the `manage` scope.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PresetBody"
              },
              "example": {
                "name": "shop-product",
                "description": "Product pages",
                "request": {
                  "render": {
                    "wait_for": ".price"
                  },
                  "extract": {
                    "price": ".price"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Preset"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/v1/presets/{name}": {
      "get": {
        "operationId": "getPreset",
        "tags": [
          "Presets and schedules"
        ],
        "summary": "One preset",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Preset"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "patch": {
        "operationId": "updatePreset",
        "tags": [
          "Presets and schedules"
        ],
        "summary": "Change a preset",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PresetBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Preset"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      },
      "delete": {
        "operationId": "deletePreset",
        "tags": [
          "Presets and schedules"
        ],
        "summary": "Delete a preset",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deleted": {
                      "const": true
                    },
                    "name": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v1/schedules": {
      "get": {
        "operationId": "listSchedules",
        "tags": [
          "Presets and schedules"
        ],
        "summary": "Your schedules",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Schedule"
                      }
                    },
                    "limits": {
                      "type": "object"
                    }
                  }
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          }
        }
      },
      "post": {
        "operationId": "createSchedule",
        "tags": [
          "Presets and schedules"
        ],
        "summary": "Run a job or crawl again and again",
        "description": "Starts the job or crawl every interval (5m, 15m, 30m, 1h, 6h, 12h, 1d, 7d), each run with its own cost cap `max_credits` (required). Runs never overlap. The schedule pauses itself when credits or the daily cap are used up, its key is revoked or the account is suspended. Per plan: free 1, starter 5, growth 20, scale 50 schedules. Needs the `manage` scope.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleBody"
              },
              "example": {
                "name": "Prices",
                "every": "1h",
                "max_credits": 200,
                "job": {
                  "urls": [
                    "https://shop.example/p/1",
                    "https://shop.example/p/2"
                  ],
                  "defaults": {
                    "extract": {
                      "price": ".price"
                    },
                    "track_changes": {
                      "on": "extracted"
                    }
                  },
                  "webhook": {
                    "url": "https://your-server.example/hooks",
                    "events": [
                      "item.changed"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Schedule"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/v1/schedules/{id}": {
      "get": {
        "operationId": "getSchedule",
        "tags": [
          "Presets and schedules"
        ],
        "summary": "One schedule",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^sch_[A-Za-z0-9]{20}$"
            },
            "description": "The schedule id."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Schedule"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "patch": {
        "operationId": "updateSchedule",
        "tags": [
          "Presets and schedules"
        ],
        "summary": "Change, pause or resume a schedule",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^sch_[A-Za-z0-9]{20}$"
            },
            "description": "The schedule id."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Schedule"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "delete": {
        "operationId": "deleteSchedule",
        "tags": [
          "Presets and schedules"
        ],
        "summary": "Delete a schedule",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^sch_[A-Za-z0-9]{20}$"
            },
            "description": "The schedule id."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deleted": {
                      "const": true
                    },
                    "id": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v1/schedules/preview": {
      "post": {
        "operationId": "previewSchedule",
        "tags": [
          "Presets and schedules"
        ],
        "summary": "Check a rhythm and see its next runs",
        "description": "Saves nothing. `every` as for a schedule: a fixed code or a rhythm in words; the answer says it back the way it is stored, whether your plan allows it, and the next three runs in your account's time zone.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "every"
                ],
                "properties": {
                  "every": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "every": "weekdays at 09:30"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "every": {
                      "type": "string"
                    },
                    "allowed": {
                      "type": "boolean"
                    },
                    "shortest_every": {
                      "type": "string"
                    },
                    "time_zone": {
                      "type": "string"
                    },
                    "next_runs": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "date-time"
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          }
        }
      }
    },
    "/v1/schedules/{id}/reports": {
      "get": {
        "operationId": "listScheduleReports",
        "tags": [
          "Presets and schedules"
        ],
        "summary": "What each run found (monitors)",
        "description": "Only for schedules with `track: \"pages\"`: one report per finished run, newest first (the last 100 are kept) – pages new since the run before, removed, changed (each list up to 200 addresses; the counts are complete).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^sch_[A-Za-z0-9]{20}$"
            },
            "description": "The schedule id."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ScheduleReport"
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v1/schedules/{id}/run": {
      "post": {
        "operationId": "runSchedule",
        "tags": [
          "Presets and schedules"
        ],
        "summary": "Start a run now",
        "description": "Also for a paused schedule; the next regular run stays as planned.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^sch_[A-Za-z0-9]{20}$"
            },
            "description": "The schedule id."
          }
        ],
        "responses": {
          "202": {
            "description": "Started.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "schedule": {
                      "$ref": "#/components/schemas/Schedule"
                    },
                    "job": {
                      "$ref": "#/components/schemas/Job"
                    }
                  }
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/v1/raw": {
      "get": {
        "operationId": "rawRequest",
        "tags": [
          "Requests"
        ],
        "summary": "The target's answer as it is",
        "description": "Like POST /v1/requests, but answers with the target's status, content type and body itself; our figures travel in `X-VP-*` headers. Headers for the target are sent as `X-VP-Header-<Name>`.",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Absolute http(s) URL."
          },
          {
            "name": "session",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Session name."
          },
          {
            "name": "fresh_ip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "New IP first (5 credits): true or false (also 1 or 0)."
          },
          {
            "name": "ip_version",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "4",
                "6",
                "auto"
              ]
            },
            "description": "IP version."
          },
          {
            "name": "timeout_ms",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Time limit of one attempt."
          },
          {
            "name": "browser",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "chrome",
                "chrome_mac",
                "chrome_android",
                "edge",
                "firefox",
                "safari",
                "safari_ios",
                "none"
              ]
            },
            "description": "Browser profile."
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Visitor language."
          },
          {
            "name": "follow_redirects",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "true or false (also 1 or 0)"
          },
          {
            "name": "max_redirects",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10
            },
            "description": "Redirects at most."
          },
          {
            "name": "cookie_jar",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "true or false (also 1 or 0)"
          },
          {
            "name": "http_version",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "auto",
                "1.1"
              ]
            },
            "description": "HTTP version."
          },
          {
            "name": "insecure",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "true or false (also 1 or 0)"
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "raw",
                "markdown",
                "text",
                "clean_html"
              ]
            },
            "description": "Convert an HTML answer."
          },
          {
            "name": "main_content",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "true or false (also 1 or 0)"
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tag."
          },
          {
            "name": "max_credits",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            },
            "description": "Cost cap."
          },
          {
            "name": "render",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Render in a browser: true or false (also 1 or 0)."
          },
          {
            "name": "timezone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "With render: IANA time zone."
          },
          {
            "name": "wait_until",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "load",
                "domcontentloaded",
                "networkidle"
              ]
            },
            "description": "With render."
          }
        ],
        "responses": {
          "200": {
            "description": "The target's answer (any status from 200 to 599 is passed on; 1xx and others arrive as 502 with `X-VP-Status`).",
            "headers": {
              "X-VP-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-VP-Status": {
                "schema": {
                  "type": "string"
                }
              },
              "X-VP-Credits": {
                "schema": {
                  "type": "string"
                }
              },
              "X-VP-Bytes-Down": {
                "schema": {
                  "type": "string"
                }
              },
              "X-VP-Final-URL": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "*/*": {
                "schema": {}
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          },
          "424": {
            "$ref": "#/components/responses/E424"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          },
          "500": {
            "$ref": "#/components/responses/E500"
          },
          "503": {
            "$ref": "#/components/responses/E503"
          }
        }
      }
    },
    "/v1/screenshot": {
      "get": {
        "operationId": "screenshot",
        "tags": [
          "Requests"
        ],
        "summary": "Screenshot as an image",
        "description": "Loads the page in a browser and answers with the picture itself (PNG, JPEG or WebP). Costs like a rendered request: 10 credits for up to 1 MB loaded, 1 more per further MB. Images and fonts are loaded (unlike `render` in POST /v1/requests). The target's status is in `X-VP-Status`. Unknown options are refused.",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Absolute http(s) URL."
          },
          {
            "name": "full_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The whole page: true or false (also 1 or 0)."
          },
          {
            "name": "selector",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "CSS selector of one element instead."
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "png",
                "jpeg",
                "webp"
              ],
              "default": "png"
            },
            "description": "Image type."
          },
          {
            "name": "quality",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "JPEG/WebP quality (default 80)."
          },
          {
            "name": "width",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 240,
              "maximum": 3840
            },
            "description": "Viewport width in CSS pixels (default 1366 when height or scale is given, otherwise the browser's own size)."
          },
          {
            "name": "height",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 240,
              "maximum": 4320
            },
            "description": "Viewport height."
          },
          {
            "name": "scale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "minimum": 0.5,
              "maximum": 4
            },
            "description": "Pixel density (default 1 when width or height is given)."
          },
          {
            "name": "wait_until",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "load",
                "domcontentloaded",
                "networkidle"
              ]
            },
            "description": "When the page counts as loaded."
          },
          {
            "name": "wait_for",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "CSS selector to wait for."
          },
          {
            "name": "wait_ms",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 15000
            },
            "description": "Extra wait at the end."
          },
          {
            "name": "scroll",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 20
            },
            "description": "Scroll to the bottom this many times first."
          },
          {
            "name": "browser",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "chrome",
                "chrome_mac",
                "chrome_android",
                "edge",
                "firefox",
                "safari",
                "safari_ios",
                "none"
              ]
            },
            "description": "Browser profile (default chrome, a desktop browser)."
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Visitor language."
          },
          {
            "name": "timezone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "IANA time zone."
          },
          {
            "name": "color_scheme",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "light",
                "dark"
              ]
            },
            "description": "prefers-color-scheme."
          },
          {
            "name": "block",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated resource types not to load: image, media, font, stylesheet (default none)."
          },
          {
            "name": "session",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Session name."
          },
          {
            "name": "fresh_ip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "true or false (also 1 or 0)"
          },
          {
            "name": "max_credits",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 10,
              "maximum": 1000
            },
            "description": "Cost cap."
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tag."
          }
        ],
        "responses": {
          "200": {
            "description": "The image.",
            "headers": {
              "X-VP-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-VP-Credits": {
                "schema": {
                  "type": "string"
                }
              },
              "X-VP-Status": {
                "schema": {
                  "type": "string"
                }
              },
              "X-VP-Final-URL": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "image/png"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          },
          "422": {
            "$ref": "#/components/responses/E422"
          },
          "424": {
            "$ref": "#/components/responses/E424"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          },
          "500": {
            "$ref": "#/components/responses/E500"
          },
          "503": {
            "$ref": "#/components/responses/E503"
          }
        }
      }
    },
    "/v1/map": {
      "post": {
        "operationId": "mapSite",
        "tags": [
          "Discovery"
        ],
        "summary": "The addresses of a website",
        "description": "Reads the page's links and the site's sitemaps (from robots.txt, otherwise /sitemap.xml; sitemap indexes and .gz files included) and returns the addresses of the same site, each once. Every page and file read is an ordinary request in your log: usually 1 credit each; at most the page, robots.txt and 5 sitemap files of up to 10 credits each. `max_credits` bounds the whole call.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MapRequest"
              },
              "example": {
                "url": "https://example.com/",
                "search": "blog",
                "limit": 500
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MapResponse"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          },
          "424": {
            "$ref": "#/components/responses/E424"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          },
          "500": {
            "$ref": "#/components/responses/E500"
          },
          "503": {
            "$ref": "#/components/responses/E503"
          }
        }
      }
    },
    "/v1/search": {
      "post": {
        "operationId": "search",
        "tags": [
          "Discovery"
        ],
        "summary": "Search the web and get the results as JSON",
        "description": "Searches DuckDuckGo and returns the results (position, title, address, snippet), and where the engine shows them ads, related searches and questions. `include_domains` and `exclude_domains` filter the results; `scrape` also fetches every result page with the options you give (for example Markdown of the main content). Each result page of the engine and each fetched result is an ordinary request in your log (usually 1 credit each); up to 5 result pages are read to reach `limit`. `max_credits` bounds the whole call.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              },
              "example": {
                "query": "web scraping api pricing",
                "limit": 5,
                "language": "en",
                "country": "us",
                "scrape": {
                  "format": "markdown",
                  "main_content": true
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponse"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          },
          "424": {
            "$ref": "#/components/responses/E424"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          },
          "500": {
            "$ref": "#/components/responses/E500"
          },
          "503": {
            "$ref": "#/components/responses/E503"
          }
        }
      }
    },
    "/v1/crawl": {
      "post": {
        "operationId": "createCrawl",
        "tags": [
          "Jobs"
        ],
        "summary": "Crawl a website in the background",
        "description": "Starts a job that reads the start page and follows links of the same site, breadth first, up to `max_depth` links away and `max_pages` pages (your plan's crawl limit: 10, 100, 500, 1000). Each page is an ordinary request with the options in `request`. Progress, results (24 hours), cancel and webhooks work as for every job.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[\\x21-\\x7e]{1,128}$"
            },
            "description": "The same key within 24 hours returns the same crawl instead of starting a second one."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CrawlRequest"
              },
              "example": {
                "url": "https://example.com/",
                "max_pages": 50,
                "max_depth": 2,
                "include_paths": [
                  "/blog/**"
                ],
                "request": {
                  "format": "markdown",
                  "main_content": true
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Replayed: the crawl started earlier with the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "202": {
            "description": "The crawl was accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/v1/estimate": {
      "post": {
        "operationId": "estimate",
        "tags": [
          "Requests"
        ],
        "summary": "What a request may cost, without running it",
        "description": "Checks a request body exactly like POST /v1/requests (or a job body with `requests`) and returns the least and the most it can cost with your plan. Runs nothing and charges nothing. Up to 120 per minute.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/RequestBody"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "requests": {
                        "type": "array",
                        "items": {
                          "$ref": "#/components/schemas/RequestBody"
                        }
                      }
                    },
                    "required": [
                      "requests"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Estimate"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/v1/account": {
      "get": {
        "operationId": "getAccount",
        "tags": [
          "Account"
        ],
        "summary": "Plan, credits and limits",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          }
        }
      }
    },
    "/v1/usage": {
      "get": {
        "operationId": "getUsage",
        "tags": [
          "Account"
        ],
        "summary": "Usage per day (UTC)",
        "description": "Days without requests are left out of `data`.",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 90,
              "default": 30
            },
            "description": "Days back, today included."
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 64
            },
            "description": "Only requests with this tag."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Usage"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          }
        }
      }
    },
    "/v1/usage/breakdown": {
      "get": {
        "operationId": "getUsageBreakdown",
        "tags": [
          "Account"
        ],
        "summary": "Usage per target domain, key or tag",
        "description": "With a time series per row. Up to 30 per minute.",
        "parameters": [
          {
            "name": "by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "host",
                "key",
                "tag"
              ],
              "default": "host"
            },
            "description": "Group by."
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "24h",
                "7d",
                "30d",
                "90d"
              ],
              "default": "7d"
            },
            "description": "Period."
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "requests",
                "credits",
                "failed",
                "avg_ms"
              ],
              "default": "requests"
            },
            "description": "Order."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "description": "Rows."
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only this tag."
          },
          {
            "name": "key",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "description": "Only this key (its id)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "by, since, sort, bucket (hour or day), buckets, total and items with their series."
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/v1/jobs": {
      "post": {
        "operationId": "createJob",
        "tags": [
          "Jobs"
        ],
        "summary": "Many requests in the background",
        "description": "1 to your plan's limit (10, 1,000, 10,000, 50,000) requests per job, at most 20 open jobs. Results are kept 24 hours after the job ended. A long list can be sent as NDJSON (`Content-Type: application/x-ndjson`, up to 32 MB): one request per line, and an optional first line `{\"job\": {…}}` with the job's own options (webhook, tag, max_credits, delivery).",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[\\x21-\\x7e]{1,128}$"
            },
            "description": "The same key within 24 hours returns the same job instead of creating a second one."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JobRequest"
              }
            },
            "application/x-ndjson": {
              "schema": {
                "type": "string",
                "description": "One request (JSON object) per line; optional first line {\"job\": {…}}."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Replayed: the job created earlier with the same Idempotency-Key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "202": {
            "description": "The job was accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      },
      "get": {
        "operationId": "listJobs",
        "tags": [
          "Jobs"
        ],
        "summary": "Your jobs, newest first",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            },
            "description": "Jobs per page."
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Continue after this job id."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Job"
                      }
                    },
                    "next": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          }
        }
      }
    },
    "/v1/jobs/{id}": {
      "get": {
        "operationId": "getJob",
        "tags": [
          "Jobs"
        ],
        "summary": "Progress of a job",
        "description": "With `?wait=1…30` the answer waits until the job moves on (an item finishes, the status changes) or the seconds pass – instead of polling every second. Up to 5 waiting calls per account.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^job_[A-Za-z0-9]{20}$"
            },
            "description": "The job id."
          },
          {
            "name": "wait",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 30
            },
            "description": "Wait up to this many seconds for a change."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      },
      "delete": {
        "operationId": "cancelJob",
        "tags": [
          "Jobs"
        ],
        "summary": "Cancel a job",
        "description": "Requests that have not started are canceled (not charged); running ones finish.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^job_[A-Za-z0-9]{20}$"
            },
            "description": "The job id."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v1/jobs/{id}/results": {
      "get": {
        "operationId": "getJobResults",
        "tags": [
          "Jobs"
        ],
        "summary": "Results of a job",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^job_[A-Za-z0-9]{20}$"
            },
            "description": "The job id."
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            },
            "description": "First index."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 100
            },
            "description": "Items per page."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "queued",
                "running",
                "succeeded",
                "failed",
                "canceled"
              ]
            },
            "description": "Only items with this status."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobResults"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v1/pdf": {
      "get": {
        "operationId": "pdf",
        "tags": [
          "Requests"
        ],
        "summary": "The page as a PDF document",
        "description": "Loads the page in a browser and answers with a PDF of it. Costs like a rendered request: 10 credits for up to 1 MB loaded, 1 more per further MB. Images and fonts are loaded. The target's status is in `X-VP-Status`. Unknown options are refused.",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Absolute http(s) URL."
          },
          {
            "name": "wait_until",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "load",
                "domcontentloaded",
                "networkidle"
              ]
            },
            "description": "When the page counts as loaded."
          },
          {
            "name": "wait_for",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "CSS selector to wait for."
          },
          {
            "name": "wait_ms",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 15000
            },
            "description": "Extra wait at the end."
          },
          {
            "name": "scroll",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 20
            },
            "description": "Scroll to the bottom this many times first (loads lazy content)."
          },
          {
            "name": "browser",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "chrome",
                "chrome_mac",
                "chrome_android",
                "edge",
                "firefox",
                "safari",
                "safari_ios",
                "none"
              ]
            },
            "description": "Browser profile (default chrome, a desktop browser)."
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Visitor language."
          },
          {
            "name": "timezone",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "IANA time zone."
          },
          {
            "name": "color_scheme",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "light",
                "dark"
              ]
            },
            "description": "prefers-color-scheme."
          },
          {
            "name": "block",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Comma-separated resource types not to load: image, media, font, stylesheet (default none)."
          },
          {
            "name": "session",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Session name."
          },
          {
            "name": "fresh_ip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "true or false (also 1 or 0)"
          },
          {
            "name": "max_credits",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 10,
              "maximum": 1000
            },
            "description": "Cost cap."
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Tag."
          }
        ],
        "responses": {
          "200": {
            "description": "The PDF.",
            "headers": {
              "X-VP-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "X-VP-Credits": {
                "schema": {
                  "type": "string"
                }
              },
              "X-VP-Status": {
                "schema": {
                  "type": "string"
                }
              },
              "X-VP-Final-URL": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "contentMediaType": "application/pdf"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          },
          "422": {
            "$ref": "#/components/responses/E422"
          },
          "424": {
            "$ref": "#/components/responses/E424"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          },
          "500": {
            "$ref": "#/components/responses/E500"
          },
          "503": {
            "$ref": "#/components/responses/E503"
          }
        }
      }
    },
    "/v1/batch": {
      "post": {
        "operationId": "createBatch",
        "tags": [
          "Requests"
        ],
        "summary": "A few requests in one call, answered together",
        "description": "1 to your plan's batch limit (free 3, starter 10, growth 20, scale 25) requests, run at the same time up to your plan's parallel limit and answered together within about 85 seconds. Each request is an ordinary request (same checks, charges and request log); one that fails does not stop the others. Send `requests` (full request bodies) or `urls` with the options for every URL in `request`. A request that could not start in time, or would exceed the batch's `max_credits`, is skipped and not charged (`batch_item_skipped`). No Idempotency-Key: for more requests, more time or kept results use POST /v1/jobs.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchRequest"
              },
              "examples": {
                "urls": {
                  "value": {
                    "urls": [
                      "https://example.com/",
                      "https://example.org/"
                    ],
                    "request": {
                      "format": "markdown",
                      "main_content": true
                    }
                  }
                },
                "requests": {
                  "value": {
                    "requests": [
                      {
                        "url": "https://example.com/"
                      },
                      {
                        "url": "https://example.org/",
                        "render": true
                      }
                    ],
                    "max_credits": 50
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResponse"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "$ref": "#/components/responses/E402"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "413": {
            "$ref": "#/components/responses/E413"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          },
          "503": {
            "$ref": "#/components/responses/E503"
          }
        }
      }
    },
    "/v1/jobs/{id}/stream": {
      "get": {
        "operationId": "streamJobResults",
        "tags": [
          "Jobs"
        ],
        "summary": "Finished items as they come (NDJSON)",
        "description": "Keeps the connection open and sends one line per finished item while the job runs – `{\"type\": \"item\", \"index\", \"status\", \"response\" | \"error\", …}` – starting with `{\"type\": \"start\", \"job\"}` and ending with `{\"type\": \"end\", \"job\"}`. A `{\"type\": \"ping\"}` line comes every 25 seconds without news. After 15 minutes a `{\"type\": \"reconnect\", \"after\"}` line ends the call: call again with `?after=` that value. Crawls with `only_changed` leave out unchanged pages.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^job_[A-Za-z0-9]{20}$"
            },
            "description": "The job id."
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Only items after this index (from a `reconnect` line or your last item)."
          },
          {
            "name": "include_body",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false",
                "1",
                "0"
              ]
            },
            "description": "Include page bodies, screenshots and PDFs (default true)."
          }
        ],
        "responses": {
          "200": {
            "description": "The stream.",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v1/destinations": {
      "get": {
        "operationId": "listDestinations",
        "tags": [
          "Keys and webhooks"
        ],
        "summary": "Your storage destinations",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Destination"
                      }
                    },
                    "limit": {
                      "type": "integer"
                    }
                  }
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          }
        }
      },
      "post": {
        "operationId": "createDestination",
        "tags": [
          "Keys and webhooks"
        ],
        "summary": "Add your own storage (S3-compatible)",
        "description": "A bucket of AWS S3 or any S3-compatible service (Cloudflare R2, Google Cloud Storage in interoperability mode, MinIO, Wasabi, Backblaze B2 …) that jobs, crawls and schedules can write their results to (`delivery`). The secret key is stored encrypted and never shown again. Give the key write access (PutObject) to the bucket or prefix only. Needs the `manage` scope; at most 10.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DestinationBody"
              },
              "example": {
                "name": "Results",
                "type": "s3",
                "endpoint": "https://<account>.r2.cloudflarestorage.com",
                "region": "auto",
                "bucket": "scrapes",
                "prefix": "virginproxy/",
                "access_key_id": "…",
                "secret_access_key": "…"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Destination"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          }
        }
      }
    },
    "/v1/destinations/{id}": {
      "delete": {
        "operationId": "deleteDestination",
        "tags": [
          "Keys and webhooks"
        ],
        "summary": "Delete a storage destination",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^dst_[A-Za-z0-9]{20}$"
            },
            "description": "The destination id."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deleted": {
                      "const": true
                    },
                    "id": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v1/destinations/{id}/test": {
      "post": {
        "operationId": "testDestination",
        "tags": [
          "Keys and webhooks"
        ],
        "summary": "Write a test file",
        "description": "Writes `virginproxy-test.txt` into the bucket (inside the prefix) and says whether it worked, with the storage service's own error when not. The file stays there.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^dst_[A-Za-z0-9]{20}$"
            },
            "description": "The destination id."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "key": {
                      "type": "string"
                    },
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v1/jobs/{id}/export": {
      "get": {
        "operationId": "exportJobResults",
        "tags": [
          "Jobs"
        ],
        "summary": "All results of a job as one download",
        "description": "The results streamed as NDJSON (one item per line, as in GET /v1/jobs/{id}/results), CSV (one row per item; `extracted` and `parsed` as JSON text) or JSON (`{\"job\": …, \"items\": [ … ]}`). Works while the job runs (what has finished so far) and up to 24 hours after it ended.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^job_[A-Za-z0-9]{20}$"
            },
            "description": "The job id."
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ndjson",
                "csv",
                "json"
              ],
              "default": "ndjson"
            },
            "description": "File format."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "queued",
                "running",
                "succeeded",
                "failed",
                "canceled"
              ]
            },
            "description": "Only items with this status."
          },
          {
            "name": "include_body",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false",
                "1",
                "0"
              ]
            },
            "description": "Include page bodies, screenshots and PDFs (default true for ndjson and json, false for csv)."
          }
        ],
        "responses": {
          "200": {
            "description": "The file (Content-Disposition: attachment).",
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobResults"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/v1/jobs/{id}/retry": {
      "post": {
        "operationId": "retryJob",
        "tags": [
          "Jobs"
        ],
        "summary": "Send the failed requests of a job again",
        "description": "Creates a new job from the failed requests of this one, exactly as they were sent, with the same webhook and tag. Requests that succeeded are not sent again.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^job_[A-Za-z0-9]{20}$"
            },
            "description": "The job id."
          }
        ],
        "responses": {
          "202": {
            "description": "The new job was accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/v1/keys": {
      "get": {
        "operationId": "listKeys",
        "tags": [
          "Keys and webhooks"
        ],
        "summary": "Your API keys",
        "description": "Every key that is not revoked, with its usage. Needs a live key without its own credit limit and with the manage permission. The full keys are never shown again, only their prefix.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Key"
                      }
                    },
                    "max_keys": {
                      "type": "integer"
                    },
                    "period_start": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    }
                  }
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      },
      "post": {
        "operationId": "createKey",
        "tags": [
          "Keys and webhooks"
        ],
        "summary": "Create an API key",
        "description": "Creates a live or test key, optionally with a credit limit and an IP list. The full key is in this answer only. At most 20 keys per account. Needs a live key without its own credit limit and with the manage permission.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KeyCreate"
              },
              "example": {
                "name": "agent-research",
                "credit_limit": 2000
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The key was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyCreated"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/v1/keys/{id}": {
      "patch": {
        "operationId": "updateKey",
        "tags": [
          "Keys and webhooks"
        ],
        "summary": "Change name, credit limit, daily limit or IP list of a key",
        "description": "An IP list that would lock out the key you are calling with is refused (`own_key`).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "description": "The key id (from GET /v1/keys)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KeyUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Key"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      },
      "delete": {
        "operationId": "revokeKey",
        "tags": [
          "Keys and webhooks"
        ],
        "summary": "Revoke a key",
        "description": "The key stops working at once. Revoking the key you are calling with needs `?confirm=revoke_current_key`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "description": "The key id."
          },
          {
            "name": "confirm",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "revoke_current_key"
              ]
            },
            "description": "Only to revoke the key of this call."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "revoked": {
                      "const": true
                    },
                    "current": {
                      "type": "boolean"
                    }
                  }
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/v1/keys/{id}/roll": {
      "post": {
        "operationId": "rollKey",
        "tags": [
          "Keys and webhooks"
        ],
        "summary": "Roll a key: a new secret, the old one keeps working for a grace period",
        "description": "Creates a new key with the same name, mode, limits, IP list and permissions; the old key keeps working for `grace` (1h, 24h, 7d; default 24h) and then gives 401. The full new key is in this answer only. The new key's credit limits count from zero. Never for a key with more permissions than the calling one.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "description": "The key to roll."
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "grace": {
                    "type": "string",
                    "enum": [
                      "1h",
                      "24h",
                      "7d"
                    ],
                    "default": "24h"
                  }
                }
              },
              "example": {
                "grace": "24h"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The new key was created.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/KeyCreated"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "replaces": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            },
                            "prefix": {
                              "type": "string"
                            },
                            "expires_at": {
                              "type": "string",
                              "format": "date-time"
                            }
                          }
                        },
                        "current": {
                          "type": "boolean",
                          "description": "The rolled key is the key of this call."
                        }
                      }
                    }
                  ]
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/v1/webhooks": {
      "get": {
        "operationId": "getWebhooks",
        "tags": [
          "Keys and webhooks"
        ],
        "summary": "Webhook secret and recent deliveries",
        "description": "The secret that signs your webhooks and the latest deliveries with their outcome (kept 7 days; their content 72 hours after the last attempt, for redelivery). Needs a live key without its own credit limit and with the manage permission.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Deliveries."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "secret": {
                      "type": "string",
                      "description": "whsec_…"
                    },
                    "previous_until": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time",
                      "description": "While a rotation's grace period runs: until when deliveries also carry a signature with the previous secret."
                    },
                    "deliveries": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookDelivery"
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/v1/webhooks/secret": {
      "post": {
        "operationId": "rotateWebhookSecret",
        "tags": [
          "Keys and webhooks"
        ],
        "summary": "Make a new webhook secret",
        "description": "Makes a new secret. Without `grace` (or with `now`) the old one stops verifying at once. With a grace period, deliveries carry two signatures until it ends – `X-VP-Signature: t=…,v1=<new>,v1=<previous>` – so receivers can switch to the new secret in their own time: accept a call when any v1 matches.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "grace": {
                    "type": "string",
                    "enum": [
                      "now",
                      "1h",
                      "24h",
                      "7d"
                    ],
                    "default": "now"
                  }
                }
              },
              "example": {
                "grace": "24h"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "secret": {
                      "type": "string"
                    },
                    "previous_until": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "note": {
                      "type": "string"
                    }
                  }
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/v1/webhooks/deliveries": {
      "get": {
        "operationId": "listWebhookDeliveries",
        "tags": [
          "Keys and webhooks"
        ],
        "summary": "Webhook deliveries, filtered and page by page",
        "description": "Newest first, from the last 7 days. Continue with `before` = the `next` of the previous page.",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "delivered",
                "failed"
              ]
            },
            "description": "Only this state."
          },
          {
            "name": "event",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "job.item, job.done, alert (every alert) or one alert.… event."
          },
          {
            "name": "job",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^job_[A-Za-z0-9]{20}$"
            },
            "description": "Only deliveries of this job."
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^evt_[A-Za-z0-9]{20}$"
            },
            "description": "Continue after this delivery."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 50
            },
            "description": "Deliveries per page."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookDelivery"
                      }
                    },
                    "next": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "keep_hours": {
                      "type": "integer"
                    }
                  }
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/v1/webhooks/deliveries/{id}": {
      "get": {
        "operationId": "getWebhookDelivery",
        "tags": [
          "Keys and webhooks"
        ],
        "summary": "One delivery with its attempts",
        "description": "The delivery, its body while it is kept (72 hours after the last attempt; cut at 20 KB here) and every attempt: time, duration, status or error, the headers we sent and the start of your server's answer (at most 2048 bytes).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^evt_[A-Za-z0-9]{20}$"
            },
            "description": "The delivery id."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/WebhookDelivery"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "payload": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "payload_truncated": {
                          "type": "boolean"
                        },
                        "history": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/WebhookAttempt"
                          },
                          "description": "Every attempt, newest first (attempts is their count)."
                        }
                      }
                    }
                  ]
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/v1/webhooks/test": {
      "post": {
        "operationId": "testWebhook",
        "tags": [
          "Keys and webhooks"
        ],
        "summary": "Send a signed test delivery now",
        "description": "Sends one signed sample event (webhook.test, job.done, job.item) to your URL and answers with the outcome. Nothing is stored or retried; the body carries `\"test\": true`. Up to 10 per minute.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "A public https:// address of yours."
                  },
                  "event": {
                    "type": "string",
                    "enum": [
                      "webhook.test",
                      "job.done",
                      "job.item"
                    ],
                    "default": "webhook.test"
                  }
                }
              },
              "example": {
                "url": "https://example.com/hooks/virginproxy",
                "event": "job.done"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "event": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    },
                    "delivered": {
                      "type": "boolean",
                      "description": "Your endpoint answered with 2xx."
                    },
                    "status_code": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "error": {
                      "type": "string"
                    },
                    "duration_ms": {
                      "type": "integer"
                    }
                  }
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/v1/webhooks/deliveries/{id}/redeliver": {
      "post": {
        "operationId": "redeliverWebhook",
        "tags": [
          "Keys and webhooks"
        ],
        "summary": "Send a delivery again",
        "description": "Puts a finished delivery (delivered or given up) back in the queue: the same id and body, signed with the current secret, with a fresh retry schedule. Possible for 72 hours after its last attempt. Another account's delivery is \"not found\". Up to 20 per minute.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^evt_[A-Za-z0-9]{20}$"
            },
            "description": "The delivery id (from GET /v1/webhooks)."
          }
        ],
        "responses": {
          "200": {
            "description": "The delivery is queued again (status pending).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDelivery"
                }
              }
            },
            "headers": {
              "RateLimit-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests your plan may send in a burst (twice the rate per second)."
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests you may send right now."
              },
              "RateLimit-Reset": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds until the bucket is full again."
              },
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Our id of this call (also \"request_id\" in errors)."
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "409": {
            "$ref": "#/components/responses/E409"
          },
          "410": {
            "$ref": "#/components/responses/E410"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/.well-known/api-catalog": {
      "get": {
        "operationId": "apiCatalog",
        "tags": [
          "Service"
        ],
        "summary": "API catalog (RFC 9727)",
        "description": "No key needed. Where this API's description, documentation and status are, as a linkset.",
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/linkset+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "linkset": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/ai-catalog.json": {
      "get": {
        "operationId": "aiCatalog",
        "tags": [
          "AI agents"
        ],
        "summary": "AI catalog",
        "description": "No key needed. Points to the MCP server card.",
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/ai-catalog+json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/mcp/server-card": {
      "get": {
        "operationId": "mcpServerCard",
        "tags": [
          "AI agents"
        ],
        "summary": "MCP server card",
        "description": "No key needed. How to connect to the MCP server: address, transport, authentication, protocol versions.",
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/mcp-server-card+json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/security.txt": {
      "get": {
        "operationId": "securityTxt",
        "tags": [
          "Service"
        ],
        "summary": "Security contact (RFC 9116)",
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v1/status": {
      "get": {
        "operationId": "getStatus",
        "tags": [
          "Service"
        ],
        "summary": "Service status",
        "description": "No key needed. `ok`, `maintenance` (paused, nothing is charged) or `disturbed`.",
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok",
                        "maintenance",
                        "disturbed"
                      ]
                    },
                    "api_version": {
                      "type": "string"
                    },
                    "time": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "docs": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/errors": {
      "get": {
        "operationId": "listErrors",
        "tags": [
          "Service"
        ],
        "summary": "Every error code",
        "description": "No key needed. The same list as on the errors page, as JSON.",
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorList"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/healthz": {
      "get": {
        "operationId": "health",
        "tags": [
          "Service"
        ],
        "summary": "Up or down",
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Down.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": false
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "openapiJson",
        "tags": [
          "Service"
        ],
        "summary": "This description (JSON)",
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/openapi.yaml": {
      "get": {
        "operationId": "openapiYaml",
        "tags": [
          "Service"
        ],
        "summary": "This description (YAML)",
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/yaml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/E404"
          }
        }
      }
    },
    "/": {
      "get": {
        "operationId": "root",
        "tags": [
          "Service"
        ],
        "summary": "Service name and docs link",
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "service": {
                      "type": "string"
                    },
                    "version": {
                      "type": "string"
                    },
                    "docs": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/docs": {
      "get": {
        "operationId": "listMemberDocs",
        "tags": [
          "AI agents"
        ],
        "summary": "The complete documentation for your AI",
        "description": "Lists the files of the complete documentation (member guides included) for your AI assistant or agent: Markdown, OpenAPI, error list, tool definitions. Any key of the account works, test keys too; free and not in the request log; up to 60 files per minute. The key goes in the header only, never in the address.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "description": {
                      "type": "string"
                    },
                    "files": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "type": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "available": {
                            "type": "boolean"
                          }
                        }
                      }
                    },
                    "mcp": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          }
        }
      }
    },
    "/v1/docs/{name}": {
      "get": {
        "operationId": "getMemberDoc",
        "tags": [
          "AI agents"
        ],
        "summary": "One file of the complete documentation",
        "description": "One file of the complete documentation (see GET /v1/docs). `llms-full.txt` is the whole documentation as one Markdown text, member guides included.",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z-]+\\.(?:txt|md|json|yaml)$",
              "example": "llms-full.txt"
            },
            "description": "A file name from GET /v1/docs (10 files)."
          }
        ],
        "responses": {
          "200": {
            "description": "The file.",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "object"
                }
              },
              "application/yaml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "$ref": "#/components/responses/E404"
          },
          "429": {
            "$ref": "#/components/responses/E429"
          },
          "503": {
            "$ref": "#/components/responses/E503"
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "operationId": "mcp",
        "tags": [
          "AI agents"
        ],
        "summary": "Model Context Protocol endpoint",
        "description": "For AI clients (MCP, Streamable HTTP transport, no sessions, JSON answers). Send JSON-RPC 2.0 messages with your API key as Bearer token. Protocol versions: 2026-07-28, 2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05 (2026-07-28 without handshake: version in `params._meta` and the MCP-Protocol-Version, Mcp-Method and Mcp-Name headers; earlier ones with initialize). Methods: server/discover, initialize, ping, tools/list, tools/call, resources/list, resources/templates/list, resources/read, prompts/list, prompts/get. Tools: scrape, batch_scrape, screenshot, pdf, search, map, crawl, export_job, retry_job, get_job, list_jobs, cancel_job, estimate, account, usage, list_requests, limits, get_answer, list_presets, get_request. Each tool call is an ordinary API call (same limits, same charges, same request log). GET and DELETE answer 405.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "jsonrpc": {
                        "const": "2.0"
                      },
                      "id": {
                        "oneOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "integer"
                          }
                        ]
                      },
                      "method": {
                        "type": "string"
                      },
                      "params": {
                        "type": "object"
                      }
                    },
                    "required": [
                      "jsonrpc",
                      "method"
                    ]
                  },
                  {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  }
                ]
              },
              "example": {
                "jsonrpc": "2.0",
                "id": 1,
                "method": "tools/call",
                "params": {
                  "name": "scrape",
                  "arguments": {
                    "url": "https://example.com/"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          },
          {
            "apiKeyHeader": []
          },
          {
            "oauth": [
              "mcp"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "JSON-RPC response (or a list of them for a batch)."
                }
              }
            }
          },
          "202": {
            "description": "Only notifications were sent: nothing to answer."
          },
          "400": {
            "$ref": "#/components/responses/E400"
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "403": {
            "$ref": "#/components/responses/E403"
          },
          "404": {
            "description": "Protocol 2026-07-28: the method is not supported (JSON-RPC error -32601).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/E503"
          }
        }
      }
    },
    "/.well-known/oauth-authorization-server": {
      "get": {
        "operationId": "oauthServerMetadata",
        "tags": [
          "OAuth"
        ],
        "summary": "Authorization server metadata (RFC 8414)",
        "description": "No key needed. Endpoints and capabilities of the OAuth sign-in for MCP clients.",
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "issuer": "https://api.virginproxy.com",
                    "authorization_endpoint": "https://dash.virginproxy.com/oauth/authorize",
                    "token_endpoint": "https://api.virginproxy.com/oauth/token",
                    "registration_endpoint": "https://api.virginproxy.com/oauth/register",
                    "revocation_endpoint": "https://api.virginproxy.com/oauth/revoke",
                    "response_types_supported": [
                      "code"
                    ],
                    "response_modes_supported": [
                      "query"
                    ],
                    "grant_types_supported": [
                      "authorization_code",
                      "refresh_token"
                    ],
                    "code_challenge_methods_supported": [
                      "S256"
                    ],
                    "token_endpoint_auth_methods_supported": [
                      "none",
                      "client_secret_post",
                      "client_secret_basic"
                    ],
                    "revocation_endpoint_auth_methods_supported": [
                      "none",
                      "client_secret_post",
                      "client_secret_basic"
                    ],
                    "scopes_supported": [
                      "mcp"
                    ],
                    "authorization_response_iss_parameter_supported": true,
                    "service_documentation": "https://docs.virginproxy.com/ai-agents/#oauth"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/oauth-protected-resource/mcp": {
      "get": {
        "operationId": "oauthResourceMetadata",
        "tags": [
          "OAuth"
        ],
        "summary": "Protected resource metadata of /mcp (RFC 9728)",
        "description": "No key needed. Which authorization server issues tokens for the MCP endpoint. A 401 from /mcp points here in its WWW-Authenticate header.",
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "example": {
                    "resource": "https://api.virginproxy.com/mcp",
                    "authorization_servers": [
                      "https://api.virginproxy.com"
                    ],
                    "scopes_supported": [
                      "mcp"
                    ],
                    "bearer_methods_supported": [
                      "header"
                    ],
                    "resource_name": "VirginProxy MCP server",
                    "resource_documentation": "https://docs.virginproxy.com/ai-agents/#mcp"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/oauth/register": {
      "post": {
        "operationId": "oauthRegister",
        "tags": [
          "OAuth"
        ],
        "summary": "Register an MCP client (RFC 7591)",
        "description": "No key needed; up to 20 registrations per hour from one address. Redirect URIs: https, http on localhost / 127.0.0.1 / [::1] (any port), or an app's own scheme; no fragments, at most 2000 characters. Clients that are never authorised are deleted after 24 hours.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "redirect_uris"
                ],
                "properties": {
                  "redirect_uris": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 10,
                    "items": {
                      "type": "string",
                      "maxLength": 2000
                    }
                  },
                  "client_name": {
                    "type": "string",
                    "maxLength": 100,
                    "description": "Shown on the consent screen."
                  },
                  "client_uri": {
                    "type": "string",
                    "format": "uri"
                  },
                  "logo_uri": {
                    "type": "string",
                    "format": "uri",
                    "description": "Stored, not shown."
                  },
                  "token_endpoint_auth_method": {
                    "type": "string",
                    "enum": [
                      "none",
                      "client_secret_post",
                      "client_secret_basic"
                    ],
                    "default": "none"
                  },
                  "grant_types": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "authorization_code",
                        "refresh_token"
                      ]
                    }
                  },
                  "response_types": {
                    "type": "array",
                    "items": {
                      "const": "code"
                    }
                  },
                  "scope": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "client_name": "My agent",
                "redirect_uris": [
                  "http://127.0.0.1:33418/callback"
                ],
                "token_endpoint_auth_method": "none"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Registered.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "client_id",
                    "client_id_issued_at",
                    "redirect_uris"
                  ],
                  "properties": {
                    "client_id": {
                      "type": "string",
                      "pattern": "^vpc_[0-9A-Za-z]{24}$"
                    },
                    "client_id_issued_at": {
                      "type": "integer"
                    },
                    "client_secret": {
                      "type": "string",
                      "description": "Only with client_secret_post / client_secret_basic. Shown once."
                    },
                    "client_secret_expires_at": {
                      "const": 0
                    },
                    "redirect_uris": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "client_name": {
                      "type": "string"
                    },
                    "token_endpoint_auth_method": {
                      "type": "string"
                    },
                    "grant_types": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "response_types": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "scope": {
                      "const": "mcp"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "invalid_redirect_uri or invalid_client_metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "RFC 6749 / RFC 7591 error code, e.g. invalid_request, invalid_client, invalid_grant, unsupported_grant_type, invalid_scope, invalid_target, invalid_redirect_uri, invalid_client_metadata, rate_limited."
                    },
                    "error_description": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "rate_limited.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "RFC 6749 / RFC 7591 error code, e.g. invalid_request, invalid_client, invalid_grant, unsupported_grant_type, invalid_scope, invalid_target, invalid_redirect_uri, invalid_client_metadata, rate_limited."
                    },
                    "error_description": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/oauth/token": {
      "post": {
        "operationId": "oauthToken",
        "tags": [
          "OAuth"
        ],
        "summary": "Exchange a code or refresh token for tokens",
        "description": "grant_type=authorization_code (with PKCE S256: code, redirect_uri, code_verifier, client_id) or grant_type=refresh_token (rotating). Access tokens are valid 60 minutes and work only on https://api.virginproxy.com/mcp. A code works once; using it again revokes the tokens issued from it. The answer has Cache-Control: no-store.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "grant_type": {
                    "type": "string",
                    "enum": [
                      "authorization_code",
                      "refresh_token"
                    ]
                  },
                  "code": {
                    "type": "string"
                  },
                  "redirect_uri": {
                    "type": "string"
                  },
                  "code_verifier": {
                    "type": "string",
                    "minLength": 43,
                    "maxLength": 128
                  },
                  "refresh_token": {
                    "type": "string"
                  },
                  "resource": {
                    "const": "https://api.virginproxy.com/mcp"
                  },
                  "scope": {
                    "const": "mcp"
                  },
                  "client_id": {
                    "type": "string",
                    "description": "Your client_id (or send it with the secret as HTTP Basic)."
                  },
                  "client_secret": {
                    "type": "string",
                    "description": "Only for clients registered with client_secret_post."
                  }
                },
                "required": [
                  "grant_type"
                ]
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "grant_type": {
                    "type": "string",
                    "enum": [
                      "authorization_code",
                      "refresh_token"
                    ]
                  },
                  "code": {
                    "type": "string"
                  },
                  "redirect_uri": {
                    "type": "string"
                  },
                  "code_verifier": {
                    "type": "string",
                    "minLength": 43,
                    "maxLength": 128
                  },
                  "refresh_token": {
                    "type": "string"
                  },
                  "resource": {
                    "const": "https://api.virginproxy.com/mcp"
                  },
                  "scope": {
                    "const": "mcp"
                  },
                  "client_id": {
                    "type": "string",
                    "description": "Your client_id (or send it with the secret as HTTP Basic)."
                  },
                  "client_secret": {
                    "type": "string",
                    "description": "Only for clients registered with client_secret_post."
                  }
                },
                "required": [
                  "grant_type"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tokens.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "access_token",
                    "token_type",
                    "expires_in",
                    "refresh_token",
                    "scope"
                  ],
                  "properties": {
                    "access_token": {
                      "type": "string",
                      "pattern": "^vp_oat_[0-9A-Za-z]{40}$",
                      "description": "Send as \"Authorization: Bearer …\" to https://api.virginproxy.com/mcp – the only endpoint that accepts it."
                    },
                    "token_type": {
                      "const": "Bearer"
                    },
                    "expires_in": {
                      "const": 3600,
                      "description": "Seconds."
                    },
                    "refresh_token": {
                      "type": "string",
                      "pattern": "^vp_ort_[0-9A-Za-z]{40}$",
                      "description": "Valid 30 days from its issue; replaced by a new one on every use. Using a replaced one again ends the connection's sign-in."
                    },
                    "scope": {
                      "const": "mcp"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "invalid_request, invalid_grant, unsupported_grant_type, invalid_scope or invalid_target.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "RFC 6749 / RFC 7591 error code, e.g. invalid_request, invalid_client, invalid_grant, unsupported_grant_type, invalid_scope, invalid_target, invalid_redirect_uri, invalid_client_metadata, rate_limited."
                    },
                    "error_description": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "invalid_client.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "RFC 6749 / RFC 7591 error code, e.g. invalid_request, invalid_client, invalid_grant, unsupported_grant_type, invalid_scope, invalid_target, invalid_redirect_uri, invalid_client_metadata, rate_limited."
                    },
                    "error_description": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "rate_limited.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "RFC 6749 / RFC 7591 error code, e.g. invalid_request, invalid_client, invalid_grant, unsupported_grant_type, invalid_scope, invalid_target, invalid_redirect_uri, invalid_client_metadata, rate_limited."
                    },
                    "error_description": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/oauth/revoke": {
      "post": {
        "operationId": "oauthRevoke",
        "tags": [
          "OAuth"
        ],
        "summary": "Revoke a token (RFC 7009)",
        "description": "Always 200, whether or not the token existed. Revoking a refresh token ends the whole sign-in it belongs to; the connection itself stays on the Keys page until you revoke it there.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string"
                  },
                  "token_type_hint": {
                    "type": "string",
                    "enum": [
                      "access_token",
                      "refresh_token"
                    ]
                  },
                  "client_id": {
                    "type": "string",
                    "description": "Your client_id (or send it with the secret as HTTP Basic)."
                  },
                  "client_secret": {
                    "type": "string",
                    "description": "Only for clients registered with client_secret_post."
                  }
                },
                "required": [
                  "token"
                ]
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string"
                  },
                  "token_type_hint": {
                    "type": "string",
                    "enum": [
                      "access_token",
                      "refresh_token"
                    ]
                  },
                  "client_id": {
                    "type": "string",
                    "description": "Your client_id (or send it with the secret as HTTP Basic)."
                  },
                  "client_secret": {
                    "type": "string",
                    "description": "Only for clients registered with client_secret_post."
                  }
                },
                "required": [
                  "token"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Done (also for an unknown token).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "invalid_client: a registered secret was missing or wrong.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "error"
                  ],
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "RFC 6749 / RFC 7591 error code, e.g. invalid_request, invalid_client, invalid_grant, unsupported_grant_type, invalid_scope, invalid_target, invalid_redirect_uri, invalid_client_metadata, rate_limited."
                    },
                    "error_description": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {
    "job.item": {
      "post": {
        "operationId": "webhookJobItem",
        "summary": "One request of a job has finished",
        "description": "Retried after 10, 60, 300, 1800, 7200 seconds when your endpoint does not answer with 2xx.",
        "parameters": [
          {
            "name": "X-VP-Signature",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "`t=<unix seconds>,v1=<hex>`: HMAC-SHA256 with your webhook secret over `<t>.<raw body>`. Compare in constant time and reject old timestamps."
          },
          {
            "name": "X-VP-Event",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-VP-Delivery",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Delivery id: the same on every retry (deduplicate by it)."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "type": {
                    "const": "job.item"
                  },
                  "job_id": {
                    "type": "string"
                  },
                  "index": {
                    "type": "integer"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "succeeded",
                      "failed"
                    ]
                  },
                  "response": {
                    "$ref": "#/components/schemas/RequestResponse"
                  },
                  "error": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx confirms the delivery."
          }
        }
      }
    },
    "job.done": {
      "post": {
        "operationId": "webhookJobDone",
        "summary": "A job has finished",
        "description": "Retried after 10, 60, 300, 1800, 7200 seconds when your endpoint does not answer with 2xx.",
        "parameters": [
          {
            "name": "X-VP-Signature",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "`t=<unix seconds>,v1=<hex>`: HMAC-SHA256 with your webhook secret over `<t>.<raw body>`. Compare in constant time and reject old timestamps."
          },
          {
            "name": "X-VP-Event",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-VP-Delivery",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Delivery id: the same on every retry (deduplicate by it)."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "type": {
                    "const": "job.done"
                  },
                  "job": {
                    "$ref": "#/components/schemas/Job"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx confirms the delivery."
          }
        }
      }
    },
    "alert": {
      "post": {
        "operationId": "webhookAlert",
        "summary": "An alert of your account (account webhook for alerts, set in the dashboard)",
        "description": "Retried after 10, 60, 300, 1800, 7200 seconds when your endpoint does not answer with 2xx.",
        "parameters": [
          {
            "name": "X-VP-Signature",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "`t=<unix seconds>,v1=<hex>`: HMAC-SHA256 with your webhook secret over `<t>.<raw body>`. Compare in constant time and reject old timestamps."
          },
          {
            "name": "X-VP-Event",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-VP-Delivery",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Delivery id: the same on every retry (deduplicate by it)."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Sent to the address set under Settings › Alerts in the dashboard. With \"Slack format\" the body is only { \"text\": \"…\" } instead.",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "alert.credits_threshold",
                      "alert.credits_runway",
                      "alert.daily_cap",
                      "alert.error_rate",
                      "alert.error_rate_recovered",
                      "alert.security",
                      "alert.monitor_changed",
                      "alert.test"
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "test": {
                    "const": true,
                    "description": "Only on a test send."
                  },
                  "data": {
                    "type": "object",
                    "description": "The figures of the alert, e.g. { \"share\": 35, \"rate\": 30, \"failed\": 14, \"total\": 40, \"window_minutes\": 10 } for alert.error_rate."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx confirms the delivery."
          }
        }
      }
    },
    "webhook.test": {
      "post": {
        "operationId": "webhookTest",
        "summary": "A test delivery (POST /v1/webhooks/test)",
        "description": "Retried after 10, 60, 300, 1800, 7200 seconds when your endpoint does not answer with 2xx.",
        "parameters": [
          {
            "name": "X-VP-Signature",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "`t=<unix seconds>,v1=<hex>`: HMAC-SHA256 with your webhook secret over `<t>.<raw body>`. Compare in constant time and reject old timestamps."
          },
          {
            "name": "X-VP-Event",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-VP-Delivery",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Delivery id: the same on every retry (deduplicate by it)."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "type": {
                    "const": "webhook.test"
                  },
                  "test": {
                    "const": true
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "message": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx confirms the delivery."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Your API key: `Authorization: Bearer vp_live_…`. Create keys in the dashboard."
      },
      "apiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "The same key in the X-API-Key header."
      },
      "oauth": {
        "type": "oauth2",
        "description": "OAuth 2.1 sign-in for MCP clients (authorization code with PKCE S256). The access token works only on https://api.virginproxy.com/mcp.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://dash.virginproxy.com/oauth/authorize",
            "tokenUrl": "https://api.virginproxy.com/oauth/token",
            "refreshUrl": "https://api.virginproxy.com/oauth/token",
            "scopes": {
              "mcp": "Use the MCP tools with your account's credits and read your account, usage and request log."
            }
          }
        }
      }
    },
    "responses": {
      "E400": {
        "description": "Error (400): invalid_body, invalid_url, invalid_method, invalid_headers, invalid_params, invalid_browser, invalid_locale, invalid_cookies, body_too_large, invalid_session, invalid_retry, invalid_render, invalid_format, invalid_parse, invalid_format_options, invalid_redact, invalid_auto_extract, invalid_render_auto, invalid_query, invalid_extract, invalid_tag, invalid_options, invalid_timeout, invalid_idempotency_key, invalid_map, invalid_crawl, invalid_job, invalid_delivery, invalid_webhook, invalid_batch, job_budget_reached, invalid_schedule, invalid_destination, invalid_scopes, invalid_expiry, invalid_grace, invalid_value, invalid_preset, invalid_name, invalid_ip_list, invalid_limit, nothing_to_change.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E401": {
        "description": "Error (401): invalid_api_key.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E402": {
        "description": "Error (402): credits_exhausted, key_limit_reached, daily_limit_reached.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E403": {
        "description": "Error (403): account_suspended, email_not_verified, ip_not_allowed, target_not_allowed, key_management_not_allowed, insufficient_scope.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E404": {
        "description": "Error (404): not_found, job_expired, answer_not_kept, preset_not_found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E409": {
        "description": "Error (409): idempotency_in_progress, nothing_to_retry, too_many_schedules, too_many_destinations, own_key, cannot_roll, too_many_keys, preset_exists, too_many_presets, delivery_pending.",
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "integer"
            },
            "description": "Seconds to wait, when the error says so."
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E410": {
        "description": "Error (410): delivery_expired.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E413": {
        "description": "Error (413): body_too_large.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E422": {
        "description": "Error (422): idempotency_key_reused, pdf_failed, screenshot_failed.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E424": {
        "description": "Error (424): search_failed, timeout, target_unreachable, connection_failed, tls_error, too_many_redirects, request_failed.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E429": {
        "description": "Error (429): rate_limited, concurrency_limited, too_many_jobs.",
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "integer"
            },
            "description": "Seconds to wait, when the error says so."
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E500": {
        "description": "Error (500): internal_error.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "E503": {
        "description": "Error (503): busy, render_unavailable, rotation_failed, executor_unavailable, maintenance.",
        "headers": {
          "Retry-After": {
            "schema": {
              "type": "integer"
            },
            "description": "Seconds to wait, when the error says so."
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "RequestBody": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "Absolute `http` or `https` URL, up to 8,000 characters. Credentials inside the URL are rejected.",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/requests/#target"
            }
          },
          "method": {
            "type": "string",
            "enum": [
              "GET",
              "POST",
              "PUT",
              "PATCH",
              "DELETE",
              "HEAD",
              "OPTIONS"
            ],
            "description": "`GET`, `POST`, `PUT`, `PATCH`, `DELETE`, `HEAD` or `OPTIONS`. With `render` only `GET`.",
            "default": "GET",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/requests/#target"
            }
          },
          "params": {
            "type": "object",
            "description": "Query parameters added to the URL. Values are strings, numbers, booleans or lists of them. At most 500 values.",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/headers/#params"
            }
          },
          "browser": {
            "type": "string",
            "enum": [
              "chrome",
              "chrome_mac",
              "chrome_android",
              "edge",
              "firefox",
              "safari",
              "safari_ios",
              "none"
            ],
            "description": "Which browser the request looks like: `chrome`, `chrome_mac`, `chrome_android`, `edge`, `firefox`, `safari`, `safari_ios` or `none`. With `render` the default is `chrome_android`.",
            "default": "chrome",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/browsers/"
            }
          },
          "locale": {
            "type": "string",
            "description": "Language of the visitor. Sets `Accept-Language`, and the browser language when rendering.",
            "default": "de-DE",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/requests/#identity"
            }
          },
          "headers": {
            "type": "object",
            "description": "Headers for the target, at most 100. They replace the browser's headers of the same name; an empty value leaves that header out.",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/headers/"
            }
          },
          "cookies": {
            "oneOf": [
              {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              },
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    },
                    "domain": {
                      "type": "string"
                    },
                    "path": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "name",
                    "value"
                  ]
                }
              }
            ],
            "description": "`{\"name\": \"value\"}` or a list of `{\"name\", \"value\", \"domain\"?, \"path\"?}`. At most 200.",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/cookies/"
            }
          },
          "cookie_jar": {
            "type": "boolean",
            "description": "Only with `session`: remember cookies the site sets for the next requests of the session.",
            "default": true,
            "externalDocs": {
              "url": "https://docs.virginproxy.com/cookies/"
            }
          },
          "json": {
            "description": "Body sent as JSON. Sets `Content-Type: application/json` unless you send your own.",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/headers/"
            }
          },
          "form": {
            "type": "object",
            "description": "Body sent as an HTML form (`application/x-www-form-urlencoded`).",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/headers/"
            }
          },
          "body": {
            "type": "string",
            "description": "Body sent exactly as given, up to 5 MB. Set your own `Content-Type`.",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/headers/"
            }
          },
          "body_encoding": {
            "type": "string",
            "enum": [
              "utf8",
              "base64"
            ],
            "description": "`\"base64\"` when `body` is base64-encoded binary data.",
            "default": "utf8",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/headers/"
            }
          },
          "session": {
            "type": "string",
            "description": "A name of your choice. Requests with the same name leave through the same IP for up to 10 minutes and share their cookies.",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/sessions/"
            }
          },
          "fresh_ip": {
            "type": "boolean",
            "description": "Get a new IP address before the request. 5 extra credits. Not with `session`.",
            "default": false,
            "externalDocs": {
              "url": "https://docs.virginproxy.com/sessions/"
            }
          },
          "ip_version": {
            "type": "string",
            "enum": [
              "4",
              "6",
              "auto"
            ],
            "description": "`\"4\"`, `\"6\"` or `\"auto\"`.",
            "default": "4",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/requests/#ip-options"
            }
          },
          "follow_redirects": {
            "type": "boolean",
            "description": "Follow redirects. `false` returns the redirect response itself.",
            "default": true,
            "externalDocs": {
              "url": "https://docs.virginproxy.com/requests/#flow"
            }
          },
          "max_redirects": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10,
            "description": "0 to 10. More redirects end with `too_many_redirects`.",
            "default": 5,
            "externalDocs": {
              "url": "https://docs.virginproxy.com/requests/#flow"
            }
          },
          "timeout_ms": {
            "type": "integer",
            "minimum": 1000,
            "maximum": 120000,
            "description": "How long one attempt may take, at least 1000, at most your plan's timeout (30 to 120 seconds).",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/limits/#timeouts"
            }
          },
          "retry": {
            "type": "object",
            "properties": {
              "times": {
                "type": "integer",
                "minimum": 0,
                "maximum": 3,
                "description": "How many more attempts at most: 0 to 3.",
                "default": 1,
                "externalDocs": {
                  "url": "https://docs.virginproxy.com/retries/#fields"
                }
              },
              "on": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "integer",
                      "minimum": 300,
                      "maximum": 599
                    },
                    {
                      "type": "string"
                    }
                  ]
                },
                "description": "Statuses 300–599 and the errors `timeout`, `connection_failed`, `target_unreachable`, `tls_error`, `text_match`, `selector_missing`. At most 20.",
                "default": [
                  403,
                  429,
                  503,
                  "timeout",
                  "connection_failed"
                ],
                "externalDocs": {
                  "url": "https://docs.virginproxy.com/retries/#fields"
                }
              },
              "fresh_ip": {
                "type": "boolean",
                "description": "A new IP before each further attempt (5 credits each).",
                "default": false,
                "externalDocs": {
                  "url": "https://docs.virginproxy.com/retries/#fields"
                }
              },
              "if_text": {
                "type": "array",
                "items": {},
                "description": "Up to 10 texts (each up to 200 characters, case ignored). An answer whose body contains one of them is tried again.",
                "externalDocs": {
                  "url": "https://docs.virginproxy.com/retries/#content"
                }
              },
              "if_missing": {
                "type": "string",
                "description": "A CSS selector. An HTML answer in which it finds nothing is tried again.",
                "externalDocs": {
                  "url": "https://docs.virginproxy.com/retries/#content"
                }
              }
            },
            "additionalProperties": false,
            "description": "Try again before answering when the target refuses or fails. `{}` uses all defaults.",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/retries/"
            }
          },
          "render": {
            "oneOf": [
              {
                "type": "boolean"
              },
              {
                "type": "object",
                "properties": {
                  "wait_until": {
                    "type": "string",
                    "enum": [
                      "load",
                      "domcontentloaded",
                      "networkidle"
                    ],
                    "description": "`load`, `domcontentloaded` or `networkidle`.",
                    "default": "load",
                    "externalDocs": {
                      "url": "https://docs.virginproxy.com/render/#options"
                    }
                  },
                  "wait_for": {
                    "type": "string",
                    "description": "CSS selector to wait for until it is visible.",
                    "externalDocs": {
                      "url": "https://docs.virginproxy.com/render/#options"
                    }
                  },
                  "wait_ms": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 15000,
                    "description": "0 to 15,000 milliseconds to wait at the end.",
                    "default": 0,
                    "externalDocs": {
                      "url": "https://docs.virginproxy.com/render/#options"
                    }
                  },
                  "scroll": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 20,
                    "description": "Scroll to the bottom 0 to 20 times.",
                    "default": 0,
                    "externalDocs": {
                      "url": "https://docs.virginproxy.com/render/#options"
                    }
                  },
                  "screenshot": {
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "object"
                      }
                    ],
                    "description": "Screenshot of the visible area, the full page or one element; PNG, JPEG or WebP.",
                    "default": false,
                    "externalDocs": {
                      "url": "https://docs.virginproxy.com/render/#options"
                    }
                  },
                  "pdf": {
                    "type": "boolean",
                    "description": "Also return the page as a PDF.",
                    "default": false,
                    "externalDocs": {
                      "url": "https://docs.virginproxy.com/render/#options"
                    }
                  },
                  "block": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "image",
                        "media",
                        "font",
                        "stylesheet"
                      ]
                    },
                    "description": "Resource types the browser does not load: `image`, `media`, `font`, `stylesheet`.",
                    "default": [
                      "image",
                      "media",
                      "font"
                    ],
                    "externalDocs": {
                      "url": "https://docs.virginproxy.com/render/#options"
                    }
                  },
                  "block_urls": {
                    "type": "array",
                    "items": {},
                    "description": "Up to 50 address patterns the browser does not load.",
                    "default": [],
                    "externalDocs": {
                      "url": "https://docs.virginproxy.com/render/#options"
                    }
                  },
                  "capture": {
                    "type": "array",
                    "items": {},
                    "description": "Up to 10 address patterns; matching background requests come back in `captured`.",
                    "default": [],
                    "externalDocs": {
                      "url": "https://docs.virginproxy.com/render/#capture"
                    }
                  },
                  "actions": {
                    "type": "array",
                    "items": {},
                    "description": "Up to 30 steps: click, type, press, hover, select, scroll, wait, evaluate, goto.",
                    "default": [],
                    "externalDocs": {
                      "url": "https://docs.virginproxy.com/render/#actions"
                    }
                  },
                  "timezone": {
                    "type": "string",
                    "description": "IANA time zone the page sees.",
                    "default": "Europe/Berlin",
                    "externalDocs": {
                      "url": "https://docs.virginproxy.com/device/#options"
                    }
                  },
                  "geolocation": {
                    "type": "object",
                    "description": "`{\"latitude\", \"longitude\", \"accuracy\"}` reported by `navigator.geolocation`.",
                    "externalDocs": {
                      "url": "https://docs.virginproxy.com/device/#options"
                    }
                  },
                  "viewport": {
                    "type": "object",
                    "description": "`{\"width\", \"height\", \"scale\"}`: screen size and pixel density.",
                    "externalDocs": {
                      "url": "https://docs.virginproxy.com/device/#options"
                    }
                  },
                  "color_scheme": {
                    "type": "string",
                    "enum": [
                      "light",
                      "dark"
                    ],
                    "description": "`\"light\"` or `\"dark\"` for `prefers-color-scheme`.",
                    "default": "light",
                    "externalDocs": {
                      "url": "https://docs.virginproxy.com/device/#options"
                    }
                  },
                  "reduced_motion": {
                    "type": "boolean",
                    "description": "Report `prefers-reduced-motion: reduce`.",
                    "default": false,
                    "externalDocs": {
                      "url": "https://docs.virginproxy.com/device/#options"
                    }
                  },
                  "cpu_cores": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 64,
                    "description": "1 to 64: `navigator.hardwareConcurrency`.",
                    "externalDocs": {
                      "url": "https://docs.virginproxy.com/device/#options"
                    }
                  },
                  "memory_gb": {
                    "type": "number",
                    "enum": [
                      0.25,
                      0.5,
                      1,
                      2,
                      4,
                      8
                    ],
                    "description": "0.25 to 8: `navigator.deviceMemory`.",
                    "externalDocs": {
                      "url": "https://docs.virginproxy.com/device/#options"
                    }
                  },
                  "javascript": {
                    "type": "boolean",
                    "description": "`false` loads the page without running its scripts.",
                    "default": true,
                    "externalDocs": {
                      "url": "https://docs.virginproxy.com/device/#options"
                    }
                  },
                  "local_storage": {
                    "type": "object",
                    "description": "Up to 100 entries put into `localStorage` before the page's scripts run.",
                    "externalDocs": {
                      "url": "https://docs.virginproxy.com/device/#options"
                    }
                  },
                  "session_storage": {
                    "type": "object",
                    "description": "The same for `sessionStorage`.",
                    "externalDocs": {
                      "url": "https://docs.virginproxy.com/device/#options"
                    }
                  },
                  "trace": {
                    "type": "boolean",
                    "description": "A small picture after every step and at the end, with the page's console messages, in `trace`: to see where a sequence of steps went wrong.",
                    "default": false,
                    "externalDocs": {
                      "url": "https://docs.virginproxy.com/render/#trace"
                    }
                  }
                },
                "additionalProperties": false
              },
              {
                "const": "auto"
              }
            ],
            "description": "Load the page in a real browser and return it after its scripts ran. 9 extra credits. `\"auto\"`: first without a browser, with it only when the page needs it – the browser part is charged only then.",
            "default": false,
            "externalDocs": {
              "url": "https://docs.virginproxy.com/render/"
            }
          },
          "render_options": {
            "type": "object",
            "description": "Only with `\"render\": \"auto\"`: the browser settings for the second try (the options of `render`, without screenshot, PDF, steps, capture).",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/render/#auto"
            }
          },
          "format": {
            "type": "string",
            "enum": [
              "raw",
              "markdown",
              "text",
              "clean_html"
            ],
            "description": "`raw`, `markdown`, `text` or `clean_html`. Converts an HTML answer before it is returned.",
            "default": "raw",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/formats/#format"
            }
          },
          "main_content": {
            "type": "boolean",
            "description": "Keep only the main content of the page (without navigation, header, footer, sidebars and forms) before converting.",
            "default": false,
            "externalDocs": {
              "url": "https://docs.virginproxy.com/formats/#main-content"
            }
          },
          "format_options": {
            "type": "object",
            "description": "With `format`: `include_selector` (keep only this part), `exclude_selector` (leave this out), `images` and `links` (`false` drops them), `max_pages` (documents, 1–500, default 100).",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/formats/#options"
            }
          },
          "redact": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "email",
                    "phone",
                    "iban",
                    "card",
                    "ip"
                  ]
                }
              },
              {
                "const": true
              }
            ],
            "description": "Black out personal data in the text you get: `email`, `phone`, `iban`, `card`, `ip`; `true` for all. Counted in `redacted`.",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/formats/#redact"
            }
          },
          "auto_extract": {
            "type": "string",
            "enum": [
              "product",
              "article",
              "job",
              "review_list",
              "recipe",
              "event",
              "organization"
            ],
            "description": "Read a standard record without selectors: `product`, `article`, `job`, `review_list`, `recipe`, `event`, `organization`. Result in `auto_extracted`.",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/auto-extract/"
            }
          },
          "parse": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "metadata",
                    "links",
                    "images",
                    "headings",
                    "emails",
                    "phones",
                    "tables",
                    "json_ld",
                    "product",
                    "article",
                    "organization",
                    "breadcrumbs",
                    "serp"
                  ]
                }
              },
              {
                "const": true
              }
            ],
            "description": "Standard records `product`, `article`, `organization`, `breadcrumbs` come from the page's structured data. Read out `metadata`, `links`, `images`, `headings`, `emails`, `phones`, `tables`, `json_ld`; `true` for all. Result in `parsed`.",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/parse/"
            }
          },
          "extract": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ExtractRule"
            },
            "description": "Up to 50 named fields read from the answer with CSS, XPath or JSON paths. Result in `extracted`.",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/extract/"
            }
          },
          "http_version": {
            "type": "string",
            "enum": [
              "auto",
              "1.1"
            ],
            "description": "`\"auto\"` or `\"1.1\"`. Only without `render`.",
            "default": "auto",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/requests/#extract-options"
            }
          },
          "insecure": {
            "type": "boolean",
            "description": "Accept invalid TLS certificates of the target.",
            "default": false,
            "externalDocs": {
              "url": "https://docs.virginproxy.com/requests/#extract-options"
            }
          },
          "max_credits": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000,
            "description": "1 to 1,000. The request never costs more; the answer is cut to fit.",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/billing/#max-credits"
            }
          },
          "tag": {
            "type": "string",
            "description": "1 to 64 characters `A–Z a–z 0–9 _ . : / -`. Stored with the request, returned in the answer, filterable.",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/account/#tags"
            }
          },
          "echo": {
            "description": "Up to 2 KB of your own data, returned unchanged as `echo`. Useful to match results to your records.",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/account/#echo"
            }
          },
          "cache": {
            "oneOf": [
              {
                "const": true
              },
              {
                "type": "object"
              }
            ],
            "description": "Keep the answer and give it again to the same request within `max_age_s` (60 to 604,800 seconds; `true` = one hour): free, at once, marked `\"cached\": true`. Off unless you send it.",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/automation/#cache"
            }
          },
          "track_changes": {
            "oneOf": [
              {
                "const": true
              },
              {
                "type": "object"
              }
            ],
            "description": "Compare with your last request of the same page: `change.status` is `new`, `same` or `changed`. `{\"on\": \"extracted\"}` compares what was read, `{\"diff\": true}` names the changed lines.",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/automation/#changes"
            }
          },
          "preset": {
            "type": "string",
            "description": "Use the options saved under this name (`POST /v1/presets`); options you send win.",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/automation/#presets"
            }
          }
        },
        "required": [
          "url"
        ],
        "additionalProperties": false,
        "description": "A request. Unknown option names are refused (400 invalid_options), not ignored."
      },
      "ExtractRule": {
        "type": "object",
        "properties": {
          "selector": {
            "type": "string",
            "description": "CSS selector, up to 500 characters. Exactly one of `selector`, `xpath`, `json`.",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/extract/#fields"
            }
          },
          "xpath": {
            "type": "string",
            "description": "XPath expression, up to 500 characters.",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/extract/#xpath"
            }
          },
          "json": {
            "type": "string",
            "description": "Path into a JSON answer such as `data.items[*].name`.",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/extract/#json"
            }
          },
          "attr": {
            "type": "string",
            "description": "`text`, `html`, `outer_html` or an attribute name such as `href`.",
            "default": "text",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/extract/#fields"
            }
          },
          "all": {
            "type": "boolean",
            "description": "A list of all matches (up to 1,000) instead of the first.",
            "default": false,
            "externalDocs": {
              "url": "https://docs.virginproxy.com/extract/#fields"
            }
          },
          "type": {
            "type": "string",
            "description": "`string`, `number`, `integer` or `boolean`.",
            "default": "string",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/extract/#types"
            }
          },
          "regex": {
            "type": "string",
            "description": "Regular expression applied to the value; the first group, otherwise the whole match.",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/extract/#regex"
            }
          },
          "default": {
            "description": "Returned when nothing matched.",
            "default": null,
            "externalDocs": {
              "url": "https://docs.virginproxy.com/extract/#regex"
            }
          },
          "fields": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ExtractRule"
            },
            "description": "Sub-fields read relative to each match: objects, or a list of objects with `all`. Up to 3 levels."
          }
        },
        "additionalProperties": false
      },
      "RequestResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "examples": [
              "req_s0F0gEspheQI7zpoNzwU"
            ],
            "description": "Our id for this request, e.g. `req_s0F0gEspheQI7zpoNzwU`. Quote it when you contact support."
          },
          "status": {
            "type": "integer",
            "description": "The target's HTTP status."
          },
          "final_url": {
            "type": "string",
            "description": "The URL that produced the answer, after redirects."
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              ]
            },
            "description": "The target's response headers, names in lower case, each as one string. `set-cookie` is a list with one entry per cookie."
          },
          "cookies": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Every cookie the target set, also on the way through redirects, already parsed: `name`, `value`, `domain`, `path`, `secure`, `http_only`, and when present `expires`, `max_age` and `same_site`."
          },
          "redirects": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string"
                },
                "status": {
                  "type": "integer"
                }
              }
            },
            "description": "The redirects that were followed, in order, each as `{\"url\", \"status\"}`. Empty when there were none."
          },
          "body": {
            "type": "string",
            "description": "The response body. Text for textual content types, otherwise base64. With `render`, the page as HTML after its scripts ran."
          },
          "body_encoding": {
            "type": "string",
            "enum": [
              "utf8",
              "base64"
            ],
            "description": "`\"utf8\"` or `\"base64\"`. Always check it before using `body`."
          },
          "truncated": {
            "type": "boolean",
            "description": "`true` when the body was cut at your plan's size limit (2 to 25 MB) or by `max_credits`."
          },
          "browser": {
            "type": [
              "string",
              "null"
            ],
            "description": "The browser the request was sent as."
          },
          "http_version": {
            "type": [
              "string",
              "null"
            ],
            "description": "The HTTP version the target answered with, for example `HTTP/2.0`."
          },
          "attempts": {
            "type": "integer",
            "description": "How many attempts it took: 1 without `retry`."
          },
          "rendered": {
            "type": "boolean",
            "description": "Only with `render`: `true`."
          },
          "format": {
            "type": "string",
            "enum": [
              "raw",
              "markdown",
              "text",
              "clean_html"
            ],
            "description": "The format that was applied: `raw` unless you asked for another one and the answer was HTML or a document."
          },
          "tokens": {
            "type": "integer",
            "description": "Only with `format` `markdown`, `text` or `clean_html`: about how many tokens the body is (estimated, about 4 characters per token in Latin script) – to plan what fits into an AI prompt."
          },
          "document": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "pdf",
                  "docx",
                  "xlsx",
                  "csv",
                  "pptx",
                  "odt"
                ]
              },
              "pages": {
                "type": "integer"
              },
              "truncated": {
                "type": "boolean"
              },
              "text": {
                "type": "boolean"
              }
            },
            "description": "Only when the answer was a document (PDF, Word, Excel, PowerPoint, OpenDocument, CSV) and `format` converted it: `{\"type\", \"pages\", \"truncated\", \"text\"}`. `text` is `false` for a scanned PDF without a text layer."
          },
          "strategy": {
            "type": "string",
            "enum": [
              "http",
              "browser"
            ],
            "description": "Only with `\"render\": \"auto\"`: `\"http\"` or `\"browser\"`, and every try with its status, the reason for the second one and its credits."
          },
          "strategy_attempts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "strategy": {
                  "type": "string",
                  "enum": [
                    "http",
                    "browser"
                  ]
                },
                "status": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "error": {
                  "type": "string"
                },
                "reason": {
                  "type": "string",
                  "enum": [
                    "no_answer",
                    "blocked_status",
                    "challenge_page",
                    "javascript_shell",
                    "wait_for_missing",
                    "nothing_extracted"
                  ]
                },
                "credits": {
                  "type": "integer"
                }
              }
            },
            "description": "Only with `\"render\": \"auto\"`: `\"http\"` or `\"browser\"`, and every try with its status, the reason for the second one and its credits."
          },
          "redacted": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            },
            "description": "Only with `redact`: how many of each kind were blacked out, e.g. `{\"email\": 2}`."
          },
          "auto_extracted": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "type": {
                "type": "string"
              },
              "data": {
                "type": "object"
              },
              "sources": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "confidence": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "description": "Only with `auto_extract`: `{\"type\", \"data\", \"sources\", \"confidence\"}`, or `null` when the page has no such record."
          },
          "trace": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "step": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "action": {
                  "type": "string"
                },
                "at_ms": {
                  "type": "integer"
                },
                "url": {
                  "type": "string"
                },
                "screenshot": {
                  "type": "string",
                  "description": "JPEG as base64."
                },
                "console": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "level": {
                        "type": "string"
                      },
                      "text": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "description": "Only with `render.trace`: one entry per step and the end, each `{\"step\", \"action\", \"at_ms\", \"url\", \"screenshot\", \"console\"}` (JPEG as base64)."
          },
          "parsed": {
            "type": "object",
            "description": "Only with `parse`: the keys you asked for."
          },
          "extracted": {
            "type": "object",
            "description": "Only with `extract`: your fields."
          },
          "tag": {
            "type": "string",
            "description": "Only when you sent them: returned unchanged."
          },
          "echo": {
            "description": "Only when you sent them: returned unchanged."
          },
          "preset": {
            "type": "string",
            "description": "Only with `preset`: the preset that was applied."
          },
          "cached": {
            "const": true,
            "description": "Only for an answer from the cache: `true`, when it was fetched and until when it is kept. `id` is the request that fetched it; `cost.credits` is 0."
          },
          "cached_at": {
            "type": "string",
            "format": "date-time",
            "description": "Only for an answer from the cache: `true`, when it was fetched and until when it is kept. `id` is the request that fetched it; `cost.credits` is 0."
          },
          "cache_expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "Only for an answer from the cache: `true`, when it was fetched and until when it is kept. `id` is the request that fetched it; `cost.credits` is 0."
          },
          "change": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "new",
                  "same",
                  "changed",
                  "unknown"
                ]
              },
              "previous_request": {
                "type": "string"
              },
              "previous_at": {
                "type": "string",
                "format": "date-time"
              },
              "diff": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "added": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "removed": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "added_count": {
                    "type": "integer"
                  },
                  "removed_count": {
                    "type": "integer"
                  },
                  "truncated": {
                    "type": "boolean"
                  }
                }
              }
            },
            "description": "Only with `track_changes`: `{\"status\": \"new\"|\"same\"|\"changed\", \"previous_request\", \"previous_at\"}`, with `diff` also `{\"added\", \"removed\", \"added_count\", \"removed_count\", \"truncated\"}`."
          },
          "screenshot": {
            "type": [
              "string",
              "null"
            ],
            "description": "Only with `render`: the visible part of the page as a base64 PNG when you asked for `screenshot`, otherwise `null`."
          },
          "duration_ms": {
            "type": "integer",
            "description": "Time from our network starting the request to the last byte, all attempts included."
          },
          "exit": {
            "type": "object",
            "properties": {
              "ip": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The public IP the target saw."
              },
              "country": {
                "type": "string",
                "description": "ISO country code of the exit IP."
              }
            }
          },
          "bytes": {
            "type": "object",
            "properties": {
              "up": {
                "type": "integer",
                "description": "Bytes sent and received for the answer you got, including TLS and headers. That is why a 33-byte body shows about 4 kB. With `render`, everything the browser loaded for the page."
              },
              "down": {
                "type": "integer",
                "description": "Bytes sent and received for the answer you got, including TLS and headers. That is why a 33-byte body shows about 4 kB. With `render`, everything the browser loaded for the page."
              }
            }
          },
          "cost": {
            "type": "object",
            "properties": {
              "credits": {
                "type": "integer",
                "description": "Credits charged for this request."
              },
              "credits_used": {
                "type": "integer",
                "description": "Your total for the period after this request, and what your plan includes."
              },
              "credits_included": {
                "type": "integer",
                "description": "Your total for the period after this request, and what your plan includes."
              }
            }
          },
          "screenshot_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Only with `render`: the image type of `screenshot` (image/png, image/jpeg or image/webp)."
          },
          "pdf": {
            "type": "string",
            "description": "Only with `render.pdf`: the page as a base64 PDF."
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Only with `render.actions`: one entry per step, with its outcome (and `value` for `evaluate`)."
          },
          "captured": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Only with `render.capture`: matching background requests of the page with their bodies."
          },
          "test": {
            "const": true,
            "description": "Only with a test key (`vp_test_…`): a sample answer; nothing was fetched or charged. See [Test mode](https://docs.virginproxy.com/test-mode/)."
          }
        },
        "required": [
          "id",
          "status",
          "final_url",
          "headers",
          "body",
          "body_encoding",
          "exit",
          "bytes",
          "duration_ms",
          "cost"
        ]
      },
      "RequestRecord": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "method": {
            "type": "string"
          },
          "target_host": {
            "type": "string"
          },
          "ok": {
            "type": "boolean",
            "description": "false when the target never answered."
          },
          "status": {
            "type": [
              "integer",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "exit": {
            "type": "object",
            "properties": {
              "ip": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "country": {
                "type": "string"
              }
            }
          },
          "bytes": {
            "type": "object",
            "properties": {
              "up": {
                "type": "integer"
              },
              "down": {
                "type": "integer"
              }
            }
          },
          "duration_ms": {
            "type": [
              "integer",
              "null"
            ]
          },
          "cost": {
            "type": "object",
            "properties": {
              "credits": {
                "type": "integer"
              },
              "parts": {
                "type": "object",
                "description": "Of the credits: the browser part, the new-IP part and the AI part.",
                "properties": {
                  "render": {
                    "type": "integer"
                  },
                  "fresh_ip": {
                    "type": "integer"
                  },
                  "ai": {
                    "type": "integer"
                  }
                }
              }
            }
          },
          "fresh_ip": {
            "type": "boolean"
          },
          "tag": {
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "page",
              "render",
              "screenshot",
              "pdf",
              "batch",
              "job",
              "crawl",
              "map",
              "mcp",
              "search",
              null
            ]
          },
          "key_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The key that sent it."
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "invalid_body",
                  "invalid_url",
                  "invalid_method",
                  "invalid_headers",
                  "invalid_params",
                  "invalid_browser",
                  "invalid_locale",
                  "invalid_cookies",
                  "body_too_large",
                  "invalid_session",
                  "invalid_retry",
                  "invalid_render",
                  "invalid_format",
                  "invalid_parse",
                  "invalid_format_options",
                  "invalid_redact",
                  "invalid_auto_extract",
                  "invalid_render_auto",
                  "invalid_query",
                  "invalid_extract",
                  "invalid_tag",
                  "invalid_options",
                  "",
                  "",
                  "invalid_timeout",
                  "invalid_api_key",
                  "credits_exhausted",
                  "key_limit_reached",
                  "daily_limit_reached",
                  "account_suspended",
                  "email_not_verified",
                  "ip_not_allowed",
                  "target_not_allowed",
                  "not_found",
                  "rate_limited",
                  "concurrency_limited",
                  "invalid_idempotency_key",
                  "idempotency_in_progress",
                  "idempotency_key_reused",
                  "invalid_map",
                  "invalid_crawl",
                  "pdf_failed",
                  "search_failed",
                  "screenshot_failed",
                  "invalid_job",
                  "invalid_delivery",
                  "invalid_webhook",
                  "job_expired",
                  "nothing_to_retry",
                  "invalid_batch",
                  "too_many_jobs",
                  "job_budget_reached",
                  "invalid_schedule",
                  "too_many_schedules",
                  "invalid_destination",
                  "too_many_destinations",
                  "key_management_not_allowed",
                  "insufficient_scope",
                  "own_key",
                  "invalid_scopes",
                  "invalid_expiry",
                  "invalid_grace",
                  "cannot_roll",
                  "too_many_keys",
                  "invalid_value",
                  "answer_not_kept",
                  "invalid_preset",
                  "preset_not_found",
                  "preset_exists",
                  "too_many_presets",
                  "invalid_name",
                  "invalid_ip_list",
                  "invalid_limit",
                  "nothing_to_change",
                  "delivery_pending",
                  "delivery_expired",
                  "timeout",
                  "target_unreachable",
                  "connection_failed",
                  "tls_error",
                  "too_many_redirects",
                  "request_failed",
                  "busy",
                  "render_unavailable",
                  "rotation_failed",
                  "executor_unavailable",
                  "maintenance",
                  "internal_error"
                ],
                "description": "A stable code for your program. Every code is listed on the errors page."
              },
              "message": {
                "type": "string",
                "description": "A sentence for you, the developer. Let your program decide by `code`, not by the message."
              },
              "charged": {
                "type": "boolean",
                "description": "`false` when the target never answered. `true` when it had answered before something failed; `credits` then says what it cost."
              },
              "credits": {
                "type": "integer",
                "description": "Only with `\"charged\": true`: the credits the request cost."
              },
              "retry_after_ms": {
                "type": "integer",
                "description": "How long to wait before sending again, in milliseconds."
              },
              "index": {
                "type": "integer",
                "description": "Only with `invalid_job`: the position of the invalid request in your list."
              }
            },
            "required": [
              "code",
              "message"
            ]
          },
          "request_id": {
            "type": "string",
            "description": "Our id for this call (`call_…`), also in the `X-Request-Id` header of every answer. Quote it when you contact support."
          }
        },
        "required": [
          "error",
          "request_id"
        ]
      },
      "ErrorList": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string"
          },
          "docs": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "http": {
                  "type": "integer"
                },
                "group": {
                  "type": "string"
                },
                "group_title": {
                  "type": "string"
                },
                "retry": {
                  "type": "string",
                  "enum": [
                    "wait",
                    "yes",
                    "no"
                  ]
                },
                "description": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "JobRequest": {
        "type": "object",
        "properties": {
          "requests": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RequestBody"
            },
            "description": "The requests of the job: 1 to your plan's limit (10, 100, 500 or 1,000). Each is a request body as for `POST /v1/requests`.",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/jobs/#create"
            }
          },
          "request": {
            "$ref": "#/components/schemas/RequestBody",
            "description": "A single request instead of `requests`."
          },
          "urls": {
            "type": "array",
            "items": {},
            "description": "Addresses instead of `requests`; each is sent with the options in `defaults`.",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/jobs/#create"
            }
          },
          "defaults": {
            "type": "object",
            "description": "With `urls`: the options for every address (as for `POST /v1/requests`, without `url`).",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/jobs/#create"
            }
          },
          "max_credits": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000,
            "description": "Cost cap of the whole job: once it used that many credits, requests not started end as `job_budget_reached`.",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/automation/#job-cap"
            }
          },
          "webhook": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string",
                "description": "A public `https://` address.",
                "externalDocs": {
                  "url": "https://docs.virginproxy.com/webhooks/#setup"
                }
              },
              "events": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "item",
                    "done",
                    "item.succeeded",
                    "item.failed",
                    "item.changed"
                  ]
                },
                "description": "`item` (each finished request), `item.succeeded`, `item.failed`, `item.changed` (only pages that changed, with `track_changes`) and/or `done` (the whole job).",
                "default": [
                  "done"
                ],
                "externalDocs": {
                  "url": "https://docs.virginproxy.com/webhooks/#events"
                }
              },
              "include_body": {
                "type": "boolean",
                "description": "`false`: item events carry the figures and `id`, not the page – fetch it from the results.",
                "default": true,
                "externalDocs": {
                  "url": "https://docs.virginproxy.com/webhooks/#events"
                }
              },
              "metadata": {
                "type": "object",
                "description": "Up to 1 KB of your own data, sent back in every webhook call of the job.",
                "externalDocs": {
                  "url": "https://docs.virginproxy.com/webhooks/#events"
                }
              }
            },
            "additionalProperties": false,
            "description": "`{\"url\", \"events\"}`: where to send the results.",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/webhooks/"
            }
          },
          "delivery": {
            "type": "object",
            "description": "Write the results into your own storage when the job ends: `{\"destination\": \"dst_…\", \"format\": \"ndjson\"|\"json\"|\"csv\", \"path\": \"{date}/{job_id}.ndjson\"}`.",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/delivery/"
            }
          },
          "tag": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_.:/-]{1,64}$",
            "description": "Tag for the job; requests without their own tag get it."
          }
        },
        "additionalProperties": false
      },
      "Job": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "done",
              "canceled",
              "expired"
            ]
          },
          "total": {
            "type": "integer",
            "description": "Requests in the job (a crawl grows as it finds pages)."
          },
          "succeeded": {
            "type": "integer"
          },
          "failed": {
            "type": "integer"
          },
          "canceled": {
            "type": "integer"
          },
          "pending": {
            "type": "integer"
          },
          "credits": {
            "type": "integer"
          },
          "tag": {
            "type": [
              "string",
              "null"
            ]
          },
          "webhook": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "url": {
                "type": "string"
              },
              "events": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "item",
                    "done",
                    "item.succeeded",
                    "item.failed",
                    "item.changed"
                  ]
                }
              },
              "include_body": {
                "const": false
              },
              "metadata": {
                "type": "object"
              }
            }
          },
          "budget": {
            "type": "object",
            "description": "Only with `max_credits`: the cap, what was used and what is left.",
            "properties": {
              "max_credits": {
                "type": "integer"
              },
              "spent": {
                "type": "integer"
              },
              "left": {
                "type": "integer"
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "started_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "finished_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Results are deleted 24 hours after the end."
          },
          "last_progress_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "kind": {
            "type": "string",
            "enum": [
              "crawl"
            ],
            "description": "Only for crawls."
          },
          "delivery": {
            "type": "object",
            "description": "Only with `delivery`: where the results go and how it went.",
            "properties": {
              "destination": {
                "type": "string"
              },
              "format": {
                "type": "string",
                "enum": [
                  "ndjson",
                  "json",
                  "csv"
                ]
              },
              "path": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "delivered",
                  "failed"
                ]
              },
              "key": {
                "type": "string"
              },
              "bytes": {
                "type": "integer"
              },
              "parts": {
                "type": "integer",
                "description": "Results above 90 MB are written as numbered parts."
              },
              "keys": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "error": {
                "type": "string"
              }
            }
          },
          "crawl": {
            "type": "object",
            "description": "Only for crawls: the settings.",
            "properties": {
              "url": {
                "type": "string"
              },
              "max_pages": {
                "type": "integer"
              },
              "max_depth": {
                "type": "integer"
              },
              "include_paths": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "exclude_paths": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "include_subdomains": {
                "type": "boolean"
              },
              "ignore_query": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "JobResults": {
        "type": "object",
        "properties": {
          "job": {
            "$ref": "#/components/schemas/Job"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "integer"
                },
                "status": {
                  "type": "string"
                },
                "url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "depth": {
                  "type": "integer",
                  "description": "Only for crawls: links away from the start page."
                },
                "request_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "credits": {
                  "type": "integer"
                },
                "finished_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "response": {
                  "$ref": "#/components/schemas/RequestResponse"
                },
                "error": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "next_offset": {
            "type": [
              "integer",
              "null"
            ]
          }
        }
      },
      "CrawlRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "string",
            "description": "The start page."
          },
          "max_pages": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000,
            "description": "Pages at most; up to your plan's crawl limit (free 10, starter 100, growth 500, scale 1000). Default 100 or the plan limit if lower."
          },
          "only_changed": {
            "type": "boolean",
            "default": false,
            "description": "Only pages that changed since they were last read (best in a schedule): unchanged pages are left out of results, exports, the stream, deliveries and item webhooks. Each page is still read and charged."
          },
          "delivery": {
            "type": "object",
            "description": "As for jobs: write the results into your own storage when the crawl ends."
          },
          "max_depth": {
            "type": "integer",
            "minimum": 0,
            "maximum": 10,
            "default": 2,
            "description": "Links away from the start page (0 = only the start page)."
          },
          "include_paths": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string",
              "pattern": "^/"
            },
            "description": "Follow only paths matching one of these patterns (`*` = any characters except `/`, `**` = anything), e.g. `/blog/**`."
          },
          "exclude_paths": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string",
              "pattern": "^/"
            },
            "description": "Never follow paths matching one of these patterns."
          },
          "include_subdomains": {
            "type": "boolean",
            "default": false,
            "description": "Also follow links to subdomains of the start host."
          },
          "ignore_query": {
            "type": "boolean",
            "default": false,
            "description": "Treat addresses that differ only in the query string as the same page."
          },
          "request": {
            "type": "object",
            "description": "Options for every page, as for POST /v1/requests, without url, method and body. Links are read for the crawl in any case; they are in `parsed.links` only if you ask for them."
          },
          "webhook": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string",
                "description": "A public `https://` address.",
                "externalDocs": {
                  "url": "https://docs.virginproxy.com/webhooks/#setup"
                }
              },
              "events": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "item",
                    "done",
                    "item.succeeded",
                    "item.failed",
                    "item.changed"
                  ]
                },
                "description": "`item` (each finished request), `item.succeeded`, `item.failed`, `item.changed` (only pages that changed, with `track_changes`) and/or `done` (the whole job).",
                "default": [
                  "done"
                ],
                "externalDocs": {
                  "url": "https://docs.virginproxy.com/webhooks/#events"
                }
              },
              "include_body": {
                "type": "boolean",
                "description": "`false`: item events carry the figures and `id`, not the page – fetch it from the results.",
                "default": true,
                "externalDocs": {
                  "url": "https://docs.virginproxy.com/webhooks/#events"
                }
              },
              "metadata": {
                "type": "object",
                "description": "Up to 1 KB of your own data, sent back in every webhook call of the job.",
                "externalDocs": {
                  "url": "https://docs.virginproxy.com/webhooks/#events"
                }
              }
            },
            "additionalProperties": false,
            "description": "`{\"url\", \"events\"}`: where to send the results.",
            "externalDocs": {
              "url": "https://docs.virginproxy.com/webhooks/"
            }
          },
          "tag": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_.:/-]{1,64}$"
          },
          "max_credits": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10000000,
            "description": "Cost cap of the whole crawl: once it has used that many credits, pages not started end as `job_budget_reached`."
          },
          "robots": {
            "type": "string",
            "enum": [
              "ignore",
              "respect"
            ],
            "default": "ignore",
            "description": "`respect`: pages the site's robots.txt disallows are not read (reading robots.txt costs 1 credit)."
          }
        },
        "x-known-options": [
          "max_credits",
          "robots",
          "url",
          "max_pages",
          "max_depth",
          "include_paths",
          "exclude_paths",
          "include_subdomains",
          "ignore_query",
          "request",
          "webhook",
          "tag",
          "delivery",
          "only_changed"
        ]
      },
      "SearchRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "query"
        ],
        "x-known-options": [
          "query",
          "engine",
          "limit",
          "language",
          "country",
          "time_range",
          "include_domains",
          "exclude_domains",
          "scrape",
          "max_credits",
          "tag"
        ],
        "properties": {
          "query": {
            "type": "string",
            "minLength": 1,
            "maxLength": 400,
            "description": "The search text; operators of the engine (quotes, site:, -word) work."
          },
          "engine": {
            "type": "string",
            "enum": [
              "duckduckgo"
            ],
            "default": "duckduckgo"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 50,
            "default": 10
          },
          "language": {
            "type": "string",
            "default": "en",
            "description": "Language of the results, e.g. `en`, `de` or `pt-BR`."
          },
          "country": {
            "type": "string",
            "pattern": "^[A-Za-z]{2}$",
            "description": "The country the results are for (a search setting of the engine, not the address the request comes from)."
          },
          "time_range": {
            "type": "string",
            "enum": [
              "day",
              "week",
              "month",
              "year"
            ],
            "description": "Only results from this period."
          },
          "include_domains": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string"
            }
          },
          "exclude_domains": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "type": "string"
            }
          },
          "scrape": {
            "oneOf": [
              {
                "type": "boolean"
              },
              {
                "type": "object",
                "description": "Options of POST /v1/requests without `url`."
              }
            ],
            "description": "`true`: fetch every result as Markdown of its main content; an object: with these options."
          },
          "max_credits": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10000,
            "description": "Bound for the whole call, fetched results included."
          },
          "tag": {
            "type": "string"
          }
        }
      },
      "SearchResponse": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string"
          },
          "engine": {
            "type": "string",
            "enum": [
              "duckduckgo"
            ]
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "position": {
                  "type": "integer"
                },
                "title": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "display_url": {
                  "type": "string",
                  "description": "The address as the engine shows it, when it does."
                },
                "snippet": {
                  "type": "string"
                },
                "date": {
                  "type": "string"
                },
                "page": {
                  "type": "object",
                  "description": "Only with `scrape`: the fetched page (`body`, `body_encoding`, `format`, `tokens`, `status`, `final_url`, `extracted`, `parsed`, `auto_extracted`, `credits`), or `error` with its code."
                }
              }
            }
          },
          "ads": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "related": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "questions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "credits": {
            "type": "integer",
            "description": "Sum of all requests of this call."
          },
          "requests": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Ids of every request of this call; each is in your request log."
          },
          "tag": {
            "type": "string"
          },
          "test": {
            "const": true
          }
        }
      },
      "MapRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "url"
        ],
        "x-known-options": [
          "url",
          "sitemap",
          "include_subdomains",
          "search",
          "limit",
          "render",
          "browser",
          "locale",
          "session",
          "max_credits",
          "tag",
          "robots"
        ],
        "properties": {
          "url": {
            "type": "string",
            "description": "A page of the site, usually its home page."
          },
          "sitemap": {
            "type": "string",
            "enum": [
              "include",
              "skip",
              "only"
            ],
            "default": "include",
            "description": "Also read the sitemaps, skip them, or read only them."
          },
          "include_subdomains": {
            "type": "boolean",
            "default": false
          },
          "search": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "Keep only addresses (or link texts) containing this text, case ignored."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 5000,
            "default": 1000
          },
          "render": {
            "type": "boolean",
            "default": false,
            "description": "Load the page in a browser first (10 credits or more)."
          },
          "robots": {
            "type": "string",
            "enum": [
              "ignore",
              "respect",
              "report"
            ],
            "default": "ignore",
            "description": "`respect` leaves out addresses robots.txt disallows, `report` marks them with `disallowed: true`."
          },
          "browser": {
            "type": "string",
            "enum": [
              "chrome",
              "chrome_mac",
              "chrome_android",
              "edge",
              "firefox",
              "safari",
              "safari_ios",
              "none"
            ]
          },
          "locale": {
            "type": "string"
          },
          "session": {
            "type": "string"
          },
          "max_credits": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000,
            "description": "Bound for all reads of this call together."
          },
          "tag": {
            "type": "string"
          }
        }
      },
      "MapResponse": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "host": {
            "type": "string",
            "description": "The host after redirects."
          },
          "links": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string"
                },
                "text": {
                  "type": "string",
                  "description": "Link text (page links only)."
                },
                "source": {
                  "type": "string",
                  "enum": [
                    "page",
                    "sitemap"
                  ]
                },
                "disallowed": {
                  "const": true,
                  "description": "With `robots: report`: robots.txt disallows it."
                }
              }
            }
          },
          "robots": {
            "type": "object",
            "description": "Only with `robots`.",
            "properties": {
              "mode": {
                "type": "string"
              },
              "read": {
                "type": "boolean"
              },
              "stopped": {
                "type": "string"
              }
            }
          },
          "total": {
            "type": "integer",
            "description": "Addresses found (after search), before limit."
          },
          "truncated": {
            "type": "boolean"
          },
          "sitemaps": {
            "type": "object",
            "properties": {
              "read": {
                "type": "integer"
              },
              "stopped": {
                "type": "string",
                "description": "Why reading sitemaps stopped early, if it did."
              }
            }
          },
          "requests": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "status": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "error": {
                  "type": "string"
                },
                "credits": {
                  "type": "integer"
                }
              }
            },
            "description": "Every read of this call; each is in your request log."
          },
          "cost": {
            "type": "object",
            "properties": {
              "credits": {
                "type": "integer",
                "description": "Sum of all reads."
              },
              "credits_used": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "credits_included": {
                "type": "integer"
              }
            }
          },
          "tag": {
            "type": "string"
          }
        }
      },
      "Estimate": {
        "type": "object",
        "properties": {
          "credits": {
            "type": "object",
            "properties": {
              "min": {
                "type": "integer",
                "description": "When the target answers with up to 1 MB."
              },
              "max": {
                "type": "integer",
                "description": "The most the request may cost (size limit, browser traffic, retries with a new IP)."
              }
            }
          },
          "parts": {
            "type": "object"
          },
          "factor": {
            "type": "number",
            "description": "Credit factor of the target (1 for most)."
          },
          "max_response_bytes": {
            "type": "integer"
          },
          "requests": {
            "type": "integer",
            "description": "Only for a job body."
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "credits_remaining": {
            "type": "integer"
          },
          "fits": {
            "type": "boolean",
            "description": "Whether the worst case fits into the credits left (otherwise the request runs with a cost cap of what is left)."
          },
          "charged": {
            "const": false
          }
        }
      },
      "Account": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "plan": {
            "type": "string",
            "enum": [
              "free",
              "starter",
              "growth",
              "scale"
            ]
          },
          "status": {
            "type": "string"
          },
          "credits": {
            "type": "object",
            "properties": {
              "included": {
                "type": "integer"
              },
              "used": {
                "type": "integer"
              },
              "extra": {
                "type": "integer"
              },
              "remaining": {
                "type": "integer"
              }
            }
          },
          "period_start": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "period_end": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "limits": {
            "type": "object",
            "properties": {
              "concurrency": {
                "type": "integer"
              },
              "requests_per_second": {
                "type": "integer"
              },
              "max_response_bytes": {
                "type": "integer"
              },
              "timeout_ms": {
                "type": "integer"
              },
              "priority": {
                "type": "integer"
              },
              "requests_per_job": {
                "type": "integer"
              },
              "requests_per_batch": {
                "type": "integer"
              }
            }
          },
          "test_mode": {
            "const": true,
            "description": "Only when called with a test key."
          }
        }
      },
      "Limits": {
        "type": "object",
        "properties": {
          "concurrency": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer"
              },
              "in_use": {
                "type": "integer"
              },
              "peak_today": {
                "type": "integer"
              }
            }
          },
          "rate": {
            "type": "object",
            "properties": {
              "limit": {
                "type": "integer",
                "description": "Requests per second."
              },
              "now": {
                "type": "number"
              },
              "avg_5s": {
                "type": "number"
              },
              "peak_today": {
                "type": "number"
              }
            }
          },
          "daily_cap": {
            "type": [
              "object",
              "null"
            ],
            "description": "Only with a daily cap set.",
            "properties": {
              "cap": {
                "type": "integer"
              },
              "used": {
                "type": "integer"
              },
              "left": {
                "type": "integer"
              },
              "resets_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "key": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "credit_limit": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "daily_limit": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "daily_used": {
                "type": "integer"
              },
              "daily_left": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            }
          },
          "test_mode": {
            "const": true
          }
        }
      },
      "AccountSettings": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "daily_cap": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "maximum": 100000000,
            "description": "Credits per UTC day for the whole account, or null for none."
          },
          "alert_thresholds": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "maxItems": 5,
            "description": "Percentages of the credits at which you are told (null: 80 and 100)."
          },
          "alert_hook_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "An https address of yours for account alerts, or null."
          },
          "alert_hook_slack": {
            "type": "boolean",
            "description": "Send alerts in Slack's message format."
          }
        }
      },
      "PresetBody": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9_.-]{0,63}$"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 200
          },
          "request": {
            "type": "object",
            "description": "Request options as for POST /v1/requests, without `url` (checked when saved)."
          }
        }
      },
      "Preset": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "request": {
            "type": "object"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ScheduleBody": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 64
          },
          "every": {
            "type": "string",
            "description": "A fixed interval (5m, 15m, 30m, 1h, 6h, 12h, 1d, 7d) or a rhythm in words in your account's time zone: `every 30 minutes`, `hourly`, `every 6 hours`, `daily at 08:00`, `weekdays at 09:30`, `weekly on monday at 07:00`, `every 2 days`. At least every 5 minutes, and not more often than your plan allows."
          },
          "notify": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "email": {
                "type": "boolean"
              },
              "webhook": {
                "type": "boolean",
                "description": "To your alert webhook as `alert.monitor_changed`."
              }
            },
            "description": "With `track`: when a run finds new, removed or changed pages. E-mail at most once per hour and schedule."
          },
          "track": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "pages",
              null
            ],
            "description": "`pages`: compare every run with the last one (a monitor); see `/v1/schedules/{id}/reports`."
          },
          "goal": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 500,
            "description": "With `track`: which changes matter, in words (\"a price drops\"). Only when the service has AI features switched on; then only changes that matter are reported."
          },
          "max_credits": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000000,
            "description": "The most one run may cost (required when creating)."
          },
          "job": {
            "type": "object",
            "description": "As for POST /v1/jobs (without max_credits). Either this or crawl."
          },
          "crawl": {
            "type": "object",
            "description": "As for POST /v1/crawl (without max_credits)."
          },
          "start_at": {
            "type": "string",
            "format": "date-time",
            "description": "The first run (default: now)."
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused"
            ]
          }
        }
      },
      "Schedule": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "every": {
            "type": "string"
          },
          "rhythm": {
            "type": "string",
            "description": "The rhythm in words, also for the fixed codes."
          },
          "time_zone": {
            "type": "string",
            "description": "Only for wall-clock rhythms: the zone they run in."
          },
          "notify": {
            "type": "object",
            "properties": {
              "email": {
                "type": "boolean"
              },
              "webhook": {
                "type": "boolean"
              }
            }
          },
          "track": {
            "type": [
              "string",
              "null"
            ]
          },
          "goal": {
            "type": "string",
            "description": "Only when set."
          },
          "next_runs": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "date-time"
            },
            "description": "The next three runs (empty when paused)."
          },
          "kind": {
            "type": "string",
            "enum": [
              "job",
              "crawl"
            ]
          },
          "job": {
            "type": "object"
          },
          "crawl": {
            "type": "object"
          },
          "max_credits": {
            "type": "integer"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused"
            ]
          },
          "paused_reason": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "by_you",
              "credits_exhausted",
              "daily_limit_reached",
              "key_limit_reached",
              "key_revoked",
              "account_suspended",
              "email_not_verified",
              null
            ]
          },
          "next_run_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_run_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "last_job": {
            "type": [
              "string",
              "null"
            ]
          },
          "runs": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "DestinationBody": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "bucket",
          "access_key_id",
          "secret_access_key"
        ],
        "x-known-options": [
          "name",
          "type",
          "endpoint",
          "region",
          "bucket",
          "prefix",
          "access_key_id",
          "secret_access_key",
          "path_style"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 64
          },
          "type": {
            "const": "s3"
          },
          "endpoint": {
            "type": [
              "string",
              "null"
            ],
            "description": "The https address of the service; leave out for AWS S3."
          },
          "region": {
            "type": "string",
            "default": "us-east-1",
            "description": "Cloudflare R2: `auto`."
          },
          "bucket": {
            "type": "string"
          },
          "prefix": {
            "type": "string",
            "maxLength": 200,
            "description": "A folder in the bucket, e.g. `virginproxy/`."
          },
          "access_key_id": {
            "type": "string"
          },
          "secret_access_key": {
            "type": "string",
            "writeOnly": true
          },
          "path_style": {
            "type": "boolean",
            "description": "Address the bucket as <endpoint>/<bucket> (default for services other than AWS) or as <bucket>.<endpoint>."
          }
        }
      },
      "Destination": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "const": "s3"
          },
          "endpoint": {
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "type": "string"
          },
          "bucket": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "access_key_id": {
            "type": "string"
          },
          "path_style": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_test": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "at": {
                "type": "string",
                "format": "date-time"
              },
              "ok": {
                "type": "boolean"
              },
              "error": {
                "type": "string"
              }
            }
          }
        }
      },
      "ScheduleReport": {
        "type": "object",
        "properties": {
          "judgement": {
            "type": "object",
            "description": "Only for monitors with a goal: whether the change mattered, and why.",
            "properties": {
              "meaningful": {
                "type": "boolean"
              },
              "reason": {
                "type": "string"
              }
            }
          },
          "job": {
            "type": "string"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "first_run": {
            "type": "boolean",
            "description": "The first run only records the pages; nothing is reported as new."
          },
          "pages": {
            "type": "integer"
          },
          "counts": {
            "type": "object",
            "properties": {
              "added": {
                "type": "integer"
              },
              "removed": {
                "type": "integer"
              },
              "changed": {
                "type": "integer"
              }
            }
          },
          "added": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "removed": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "changed": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "BatchRequest": {
        "type": "object",
        "additionalProperties": false,
        "x-known-options": [
          "requests",
          "urls",
          "request",
          "max_credits",
          "tag"
        ],
        "properties": {
          "requests": {
            "type": "array",
            "minItems": 1,
            "maxItems": 25,
            "items": {
              "$ref": "#/components/schemas/RequestBody"
            },
            "description": "Request bodies, as for POST /v1/requests. Either this or `urls`."
          },
          "urls": {
            "type": "array",
            "minItems": 1,
            "maxItems": 25,
            "items": {
              "type": "string"
            },
            "description": "Addresses; each is sent with the options in `request`. Either this or `requests`."
          },
          "request": {
            "type": "object",
            "description": "With `urls`: the options for every URL, as for POST /v1/requests without `url`."
          },
          "max_credits": {
            "type": "integer",
            "minimum": 1,
            "maximum": 25000,
            "description": "Bound for all requests of the batch together. A request that would exceed what is left is skipped (not charged)."
          },
          "tag": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_.:/-]{1,64}$",
            "description": "Tag for requests without their own."
          }
        }
      },
      "BatchResponse": {
        "type": "object",
        "properties": {
          "requests": {
            "type": "integer"
          },
          "succeeded": {
            "type": "integer"
          },
          "failed": {
            "type": "integer"
          },
          "skipped": {
            "type": "integer"
          },
          "items": {
            "type": "array",
            "description": "One entry per request, in the order sent.",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "integer"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "succeeded",
                    "failed",
                    "skipped"
                  ]
                },
                "response": {
                  "$ref": "#/components/schemas/RequestResponse"
                },
                "request_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "For a failed request that was run."
                },
                "error": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "charged": {
                      "type": "boolean"
                    },
                    "credits": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "cost": {
            "type": "object",
            "properties": {
              "credits": {
                "type": "integer",
                "description": "All requests of the batch together."
              },
              "credits_used": {
                "type": "integer"
              },
              "credits_included": {
                "type": "integer"
              }
            }
          },
          "duration_ms": {
            "type": "integer"
          },
          "tag": {
            "type": "string"
          },
          "test": {
            "const": true
          }
        }
      },
      "Key": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string",
            "description": "The visible start of the key, e.g. vp_live_Ab3d."
          },
          "mode": {
            "type": "string",
            "enum": [
              "live",
              "test"
            ]
          },
          "ip_allowlist": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "credit_limit": {
            "type": [
              "integer",
              "null"
            ]
          },
          "daily_limit": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Credits this key may use per UTC day; null = no daily limit."
          },
          "last_used_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "current": {
            "type": "boolean",
            "description": "This is the key of the call."
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "requests",
                "read",
                "manage"
              ]
            },
            "description": "What the key may do: requests (send requests, jobs, crawls), read (account, usage, request log), manage (keys and webhooks). Keys without stored scopes have all three."
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "After this time the key no longer works (401). Set by you, or by a roll (the end of its grace period)."
          },
          "rolled_to": {
            "type": [
              "string",
              "null"
            ],
            "description": "The id of the key that replaced this one in a roll."
          },
          "usage": {
            "type": "object",
            "properties": {
              "period_credits": {
                "type": "integer",
                "description": "Credits in the current period (what counts against credit_limit)."
              },
              "requests_30d": {
                "type": "integer"
              },
              "credits_30d": {
                "type": "integer"
              }
            }
          }
        }
      },
      "KeyCreate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "mode": {
            "type": "string",
            "enum": [
              "live",
              "test"
            ],
            "default": "live",
            "description": "test: sample answers, never charged (see Test mode)."
          },
          "credit_limit": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "description": "Credits this key may use per period."
          },
          "daily_limit": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1,
            "description": "Credits this key may use per UTC day (daily_limit_reached past it)."
          },
          "ip_allowlist": {
            "type": [
              "array",
              "null"
            ],
            "maxItems": 20,
            "items": {
              "type": "string"
            },
            "description": "Only these addresses may use the key."
          },
          "scopes": {
            "type": [
              "array",
              "null"
            ],
            "minItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "requests",
                "read",
                "manage"
              ]
            },
            "description": "Permissions of the new key; never more than the calling key has. Default: the calling key's own."
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Optional expiry date, at least 5 minutes and at most 366 days ahead."
          }
        }
      },
      "KeyCreated": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "key": {
            "type": "string",
            "description": "The full key. Shown only here."
          },
          "credit_limit": {
            "type": [
              "integer",
              "null"
            ]
          },
          "daily_limit": {
            "type": [
              "integer",
              "null"
            ]
          },
          "ip_allowlist": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "requests",
                "read",
                "manage"
              ]
            },
            "description": "What the key may do: requests (send requests, jobs, crawls), read (account, usage, request log), manage (keys and webhooks). Keys without stored scopes have all three."
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "note": {
            "type": "string"
          }
        }
      },
      "KeyUpdate": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "credit_limit": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1
          },
          "daily_limit": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1
          },
          "ip_allowlist": {
            "type": [
              "array",
              "null"
            ],
            "maxItems": 20,
            "items": {
              "type": "string"
            }
          },
          "scopes": {
            "type": [
              "array",
              "null"
            ],
            "minItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "requests",
                "read",
                "manage"
              ]
            },
            "description": "Only within the calling key's own permissions."
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "null removes the expiry date."
          }
        }
      },
      "WebhookAttempt": {
        "type": "object",
        "properties": {
          "attempt": {
            "type": "integer"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "duration_ms": {
            "type": [
              "integer",
              "null"
            ]
          },
          "status_code": {
            "type": [
              "integer",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "request_headers": {
            "type": [
              "object",
              "null"
            ],
            "description": "The headers we sent (the signature, never the secret)."
          },
          "response_excerpt": {
            "type": [
              "string",
              "null"
            ],
            "description": "The start of your server's answer, at most 2048 bytes."
          }
        }
      },
      "WebhookDelivery": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "job_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "null for an alert of the account webhook (event alert.…)."
          },
          "event": {
            "type": "string",
            "description": "job.item, job.done, or alert.… for the account webhook for alerts."
          },
          "index": {
            "type": [
              "integer",
              "null"
            ]
          },
          "url": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "delivered",
              "failed"
            ]
          },
          "attempts": {
            "type": "integer"
          },
          "next_attempt_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_code": {
            "type": [
              "integer",
              "null"
            ]
          },
          "last_error": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_attempt_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "delivered_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "redeliverable": {
            "type": "boolean",
            "description": "Can be sent again (finished, and its last attempt less than 72 hours ago)."
          },
          "redelivered_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When it was last sent again on request."
          }
        }
      },
      "Usage": {
        "type": "object",
        "properties": {
          "days": {
            "type": "integer"
          },
          "from": {
            "type": "string",
            "format": "date-time"
          },
          "to": {
            "type": "string",
            "format": "date-time"
          },
          "tag": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "day": {
                  "type": "string",
                  "format": "date"
                },
                "requests": {
                  "type": "integer"
                },
                "successful": {
                  "type": "integer"
                },
                "credits": {
                  "type": "integer"
                },
                "bytes_down": {
                  "type": "integer"
                },
                "bytes_up": {
                  "type": "integer"
                }
              }
            }
          }
        }
      }
    }
  }
}
