{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/serpresult-com/json-schema/serpresult-com-search-response-schema.json",
  "title": "SearchResponse",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/serpresult-com-openapi.json#/components/schemas/SearchResponse",
  "type": "object",
  "required": [
    "id",
    "target",
    "query",
    "geo",
    "locale",
    "page",
    "results"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "The query's id in the log. `qry_` plus 32 hex characters.",
      "pattern": "^qry_[0-9a-f]{32}$"
    },
    "target": {
      "$ref": "#/$defs/Target"
    },
    "query": {
      "type": "string",
      "description": "The query as run, after whitespace normalisation."
    },
    "geo": {
      "$ref": "#/$defs/Geo"
    },
    "locale": {
      "$ref": "#/$defs/Locale"
    },
    "page": {
      "type": "integer",
      "minimum": 1
    },
    "results": {
      "type": "object",
      "required": [
        "organic"
      ],
      "properties": {
        "organic": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/OrganicResult"
          }
        }
      }
    }
  },
  "$defs": {
    "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}$"
    },
    "OrganicResult": {
      "type": "object",
      "description": "One organic result. `x-hub-fields` is the flat row every marketplace wrapper exposes: these organic fields plus the request echo (`query`, `target`, `geo`, `locale`, `page`), with `request_id` taken from the response `id`. It is paired with the fixtures in `docs/api/fixtures/`.",
      "x-hub-fields": [
        "position",
        "title",
        "url",
        "domain",
        "snippet",
        "query",
        "target",
        "geo",
        "locale",
        "page",
        "request_id"
      ],
      "required": [
        "position",
        "title",
        "url",
        "domain",
        "snippet"
      ],
      "properties": {
        "position": {
          "type": "integer",
          "minimum": 1,
          "description": "1-based rank within the answered page, after de-duplication."
        },
        "title": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "domain": {
          "type": "string",
          "description": "The registrable domain of `url` (`example.co.uk`), or the hostname when it has no public suffix."
        },
        "snippet": {
          "type": "string",
          "description": "The engine's description text. Empty when the engine gave none."
        }
      }
    },
    "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"
    }
  }
}