{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/replynodes-com/json-schema/replynodes-com-web-search-response-schema.json",
  "title": "WebSearchResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/replynodes-com-web-search-api-openapi.yml#/components/schemas/WebSearchResponse",
  "type": "object",
  "required": [
    "data",
    "meta"
  ],
  "additionalProperties": false,
  "properties": {
    "data": {
      "$ref": "#/$defs/WebSearchData"
    },
    "meta": {
      "$ref": "#/$defs/ResponseMeta"
    }
  },
  "$defs": {
    "ResponseMeta": {
      "type": "object",
      "required": [
        "request_id"
      ],
      "properties": {
        "request_id": {
          "type": "string"
        },
        "contract_version": {
          "type": "string"
        },
        "generated_at": {
          "type": "string",
          "format": "date-time"
        },
        "availability": {
          "type": "string"
        },
        "next_cursor": {
          "type": "string"
        },
        "missing_fields": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "stale": {
          "type": "boolean"
        }
      },
      "additionalProperties": true
    },
    "WebSearchData": {
      "type": "object",
      "required": [
        "data",
        "pagination",
        "meta"
      ],
      "additionalProperties": false,
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/WebSearchRecord"
          }
        },
        "pagination": {
          "$ref": "#/$defs/WebSearchPagination"
        },
        "meta": {
          "$ref": "#/$defs/WebSearchMeta"
        }
      }
    },
    "WebSearchMeta": {
      "type": "object",
      "required": [
        "contract_version",
        "generated_at",
        "source",
        "availability",
        "engines_requested",
        "engines_failed"
      ],
      "additionalProperties": false,
      "properties": {
        "contract_version": {
          "type": "string",
          "enum": [
            "v2"
          ]
        },
        "generated_at": {
          "type": "string",
          "format": "date-time",
          "description": "When the original upstream result was generated; preserved on cache hits."
        },
        "source": {
          "type": "string",
          "enum": [
            "searxng"
          ]
        },
        "availability": {
          "type": "string",
          "enum": [
            "complete",
            "partial"
          ]
        },
        "engines_requested": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "engines_failed": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "WebSearchPagination": {
      "type": "object",
      "required": [
        "page",
        "next_page",
        "has_more"
      ],
      "additionalProperties": false,
      "properties": {
        "page": {
          "type": "integer",
          "minimum": 1
        },
        "next_page": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Always null: continuation is never promised."
        },
        "has_more": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Always null: continuation is never promised."
        }
      }
    },
    "WebSearchRecord": {
      "type": "object",
      "required": [
        "id",
        "platform",
        "rank",
        "title",
        "snippet",
        "domain",
        "url",
        "engines"
      ],
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "description": "web-search:s_ followed by the lowercase SHA-256 hex of the canonical URL."
        },
        "platform": {
          "type": "string",
          "enum": [
            "web-search"
          ]
        },
        "rank": {
          "type": "integer",
          "minimum": 1,
          "description": "One-based position within the returned page; never a global rank."
        },
        "title": {
          "type": [
            "string",
            "null"
          ]
        },
        "snippet": {
          "type": [
            "string",
            "null"
          ]
        },
        "domain": {
          "type": [
            "string",
            "null"
          ]
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "engines": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Engines that actually returned this record; empty when provenance is unknown."
        }
      }
    }
  }
}