{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/audioscrape-com/json-schema/audioscrape-com-search-request-schema.json",
  "title": "SearchRequest",
  "description": "API v1 Search Request - simplified for external API users",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/audioscrape-com-openapi.json#/components/schemas/SearchRequest",
  "type": "object",
  "required": [
    "query"
  ],
  "properties": {
    "filters": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/SearchFilters"
        }
      ]
    },
    "limit": {
      "type": "integer",
      "description": "Results to return, 1–100; outside that range is a 400. Page with `offset`.",
      "default": 20,
      "maximum": 100,
      "minimum": 1
    },
    "offset": {
      "type": "integer",
      "description": "Result offset for pagination.",
      "default": 0,
      "minimum": 0
    },
    "query": {
      "type": "string",
      "description": "Natural-language or keyword query."
    },
    "search_type": {
      "type": [
        "string",
        "null"
      ],
      "description": "One of `\"text\"`, `\"semantic\"`, or `\"hybrid\"`. Defaults to auto-detect:\nqueries with boolean operators / quoted phrases use `\"text\"`, others `\"hybrid\"`."
    },
    "sort": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/SortOptions"
        }
      ]
    }
  },
  "$defs": {
    "SearchFilters": {
      "type": "object",
      "properties": {
        "content_types": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "description": "Restrict to content types (`phone_call`, `meeting`, `interview`,\n`government_meeting`, `podcast_episode`, ...) — the typed audio axis."
        },
        "date_from": {
          "type": [
            "string",
            "null"
          ],
          "description": "Filter by publish date (ISO 8601 format: \"2024-01-01\" or \"2024-01-01T00:00:00Z\")."
        },
        "date_to": {
          "type": [
            "string",
            "null"
          ],
          "description": "Filter by publish date (ISO 8601 format: \"2024-12-31\" or \"2024-12-31T23:59:59Z\")."
        },
        "podcast_ids": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "description": "Restrict to specific podcast IDs."
        },
        "speakers": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "description": "Restrict to specific speakers (exact match on speaker name)."
        },
        "visibility": {
          "type": [
            "string",
            "null"
          ],
          "description": "Tenancy scope: `all` (default: the public corpus plus your own data) |\n`public` (the public corpus only) | `workspace` (your own data only;\nwith an API key, the key's workspace). It only narrows what you may\nread, never widens it; any other value is a 400. `workspace` also\nrelaxes the short-segment floor and scopes semantic retrieval."
        }
      }
    },
    "SortOptions": {
      "type": "object",
      "properties": {
        "field": {
          "type": [
            "string",
            "null"
          ],
          "description": "`\"relevance\"` or `\"date\"`."
        },
        "order": {
          "type": [
            "string",
            "null"
          ],
          "description": "`\"asc\"` or `\"desc\"`."
        }
      }
    }
  }
}