{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/searlo-tech/json-schema/searlo-tech-serp-html-result-schema.json",
  "title": "SerpHtmlResult",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/searlo-tech-openapi.yaml#/components/schemas/SerpHtmlResult",
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "searchParameters": {
      "type": "object",
      "properties": {
        "q": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "html",
            "rendered"
          ]
        },
        "gl": {
          "type": "string"
        },
        "hl": {
          "type": "string"
        },
        "page": {
          "type": "integer"
        },
        "device": {
          "type": "string",
          "enum": [
            "desktop",
            "ios"
          ]
        },
        "tbs": {
          "type": "string"
        }
      }
    },
    "html": {
      "type": "string",
      "description": "The page. Without js, the bytes Google's server sent; with js=true, the DOM after the page's JavaScript ran and the AI Overview was opened out."
    },
    "url": {
      "type": [
        "string",
        "null"
      ],
      "description": "The results page's URL."
    },
    "empty": {
      "type": "boolean",
      "description": "true when Google answered with a results page that has no results."
    },
    "rendered": {
      "type": "boolean",
      "description": "Whether JavaScript ran (js=true)."
    },
    "aio": {
      "type": "object",
      "description": "With js=true: what happened to the AI Overview.",
      "properties": {
        "present": {
          "type": "boolean",
          "description": "Google showed an AI Overview."
        },
        "expanded": {
          "type": "boolean",
          "description": "Show more took. On iOS, the tap went through (the mobile Show more lifts a height limit and adds no content)."
        },
        "sourcesOpened": {
          "type": "boolean",
          "description": "Every source is on show: Show all took, or there was nothing left to open (see showAll)."
        },
        "showAll": {
          "type": "string",
          "enum": [
            "pressed",
            "absent",
            "complete",
            "failed"
          ],
          "description": "What the Show all step found: pressed; absent, no Show all to press (short lists, the mobile layout); complete, every source already on screen; failed, the press took nowhere with sources still hidden."
        },
        "sourcesBefore": {
          "type": "integer"
        },
        "sources": {
          "type": "integer",
          "description": "Unique source links on the page."
        },
        "sourcesVisible": {
          "type": "integer",
          "description": "Source links on screen."
        }
      }
    },
    "aiOverview": {
      "type": [
        "object",
        "null"
      ],
      "description": "With js=true on desktop: the overview parsed from the captured page. null on iOS, where the overview is in html only.",
      "properties": {
        "text": {
          "type": "string"
        },
        "markdown": {
          "type": "string"
        },
        "sources": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        }
      }
    },
    "bytes": {
      "type": "integer",
      "description": "Size of html in bytes (UTF-8)."
    },
    "fetchedAt": {
      "type": "string",
      "format": "date-time"
    },
    "source": {
      "type": "string",
      "enum": [
        "searlo.tech(google_serp_html)",
        "searlo.tech(google_serp_rendered)"
      ]
    },
    "credits": {
      "type": "object",
      "properties": {
        "used": {
          "type": "number"
        }
      }
    }
  }
}