{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/serpresult-com/json-schema/serpresult-com-bulk-request-schema.json",
  "title": "BulkRequest",
  "description": "`target`, `geo`, `locale` and `source` are defaults every row starts from; a row's own fields override them. The same rules as `GET /v1/query` apply to each row.",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/serpresult-com-openapi.json#/components/schemas/BulkRequest",
  "type": "object",
  "required": [
    "queries"
  ],
  "properties": {
    "target": {
      "$ref": "#/$defs/Target"
    },
    "geo": {
      "$ref": "#/$defs/Geo"
    },
    "locale": {
      "$ref": "#/$defs/Locale"
    },
    "source": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256,
      "description": "Optional attribution label stored with the search (for example `zapier`, `make`, `n8n`). Stored truncated to 32 characters. Defaults to `api` when omitted. Not returned in the response."
    },
    "queries": {
      "type": "array",
      "minItems": 1,
      "maxItems": 50,
      "items": {
        "$ref": "#/$defs/BulkQueryRow"
      }
    }
  },
  "$defs": {
    "BulkQueryRow": {
      "description": "A bare query string, or an object naming the query and any per-row overrides. Unknown keys are ignored.",
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 400
        },
        {
          "type": "object",
          "required": [
            "query"
          ],
          "properties": {
            "query": {
              "type": "string",
              "minLength": 1,
              "maxLength": 400
            },
            "target": {
              "$ref": "#/$defs/Target"
            },
            "geo": {
              "$ref": "#/$defs/Geo"
            },
            "locale": {
              "$ref": "#/$defs/Locale"
            },
            "page": {
              "type": "integer",
              "minimum": 1,
              "maximum": 5,
              "default": 1
            },
            "num": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20,
              "default": 10
            },
            "safe": {
              "$ref": "#/$defs/SafeSearch"
            },
            "source": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "description": "Optional attribution label stored with the search (for example `zapier`, `make`, `n8n`). Stored truncated to 32 characters. Defaults to `api` when omitted. Not returned in the response."
            }
          },
          "additionalProperties": true
        }
      ]
    },
    "Geo": {
      "type": "string",
      "description": "A supported country, as an ISO 3166-1 alpha-2 code. Results are\nlocalized to this country, the same ones a user searching there would\nsee, and the code also picks the default `locale`.\n",
      "enum": [
        "us",
        "in",
        "gb",
        "ca",
        "au",
        "de",
        "fr",
        "sg",
        "ae",
        "jp",
        "ad",
        "af",
        "ag",
        "al",
        "am",
        "ao",
        "ar",
        "at",
        "aw",
        "az",
        "ba",
        "bb",
        "bd",
        "be",
        "bf",
        "bg",
        "bh",
        "bi",
        "bj",
        "bn",
        "bo",
        "br",
        "bs",
        "bw",
        "by",
        "bz",
        "cd",
        "cg",
        "ch",
        "ci",
        "cl",
        "cm",
        "cn",
        "co",
        "cr",
        "cu",
        "cv",
        "cy",
        "cz",
        "dk",
        "do",
        "dz",
        "ec",
        "ee",
        "eg",
        "es",
        "et",
        "fi",
        "fj",
        "fm",
        "fo",
        "ga",
        "gd",
        "ge",
        "gf",
        "gg",
        "gh",
        "gm",
        "gp",
        "gq",
        "gr",
        "gt",
        "gu",
        "gy",
        "hk",
        "hn",
        "hr",
        "ht",
        "hu",
        "id",
        "ie",
        "il",
        "iq",
        "ir",
        "is",
        "it",
        "jm",
        "jo",
        "ke",
        "kg",
        "kh",
        "km",
        "kn",
        "kr",
        "kw",
        "ky",
        "kz",
        "la",
        "lb",
        "lc",
        "lk",
        "lr",
        "ls",
        "lt",
        "lu",
        "lv",
        "ly",
        "ma",
        "md",
        "me",
        "mg",
        "mk",
        "ml",
        "mm",
        "mn",
        "mo",
        "mp",
        "mq",
        "mr",
        "mt",
        "mu",
        "mv",
        "mw",
        "mx",
        "my",
        "mz",
        "na",
        "nc",
        "ne",
        "ng",
        "ni",
        "nl",
        "no",
        "np",
        "nz",
        "om",
        "pa",
        "pe",
        "pf",
        "pg",
        "ph",
        "pk",
        "pl",
        "pr",
        "ps",
        "pt",
        "pw",
        "py",
        "qa",
        "re",
        "ro",
        "rs",
        "ru",
        "rw",
        "sa",
        "sb",
        "sd",
        "se",
        "si",
        "sk",
        "sl",
        "sn",
        "so",
        "sr",
        "st",
        "sv",
        "sy",
        "sz",
        "td",
        "tg",
        "th",
        "tj",
        "tl",
        "tn",
        "to",
        "tr",
        "tt",
        "tw",
        "tz",
        "ua",
        "ug",
        "uy",
        "uz",
        "vc",
        "ve",
        "vg",
        "vi",
        "vn",
        "vu",
        "ye",
        "za",
        "zm",
        "zw"
      ],
      "default": "us"
    },
    "Locale": {
      "type": "string",
      "description": "A language-region tag, `xx-yy`.",
      "pattern": "^[A-Za-z]{2}-[A-Za-z]{2}$"
    },
    "SafeSearch": {
      "type": "string",
      "enum": [
        "off",
        "moderate",
        "strict"
      ],
      "default": "off"
    },
    "Target": {
      "type": "string",
      "description": "The engine to search.\n- `google_search`: pages 1–5, `num` up to 20, safe search supported.\n- `bing_search`: page 1 only, `num` up to 20, safe search supported.\n- `duckduckgo_search`: page 1 only, `num` up to 10, no safe search.\n- `yahoo_search`: page 1 only, `num` up to 10, safe search supported.\n- `brave_search`: pages 1–5, `num` up to 20, safe search supported.\n- `yandex_search`: pages 1–5, `num` up to 10, no safe search.\n",
      "enum": [
        "google_search",
        "bing_search",
        "duckduckgo_search",
        "yahoo_search",
        "brave_search",
        "yandex_search"
      ],
      "default": "google_search"
    }
  }
}