{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sfxmint-com/json-schema/sfxmint-com-search-result-schema.json",
  "title": "SearchResult",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sfxmint-com-openapi.yml#/components/schemas/SearchResult",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "category": {
      "type": "string"
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "description": {
      "type": "string"
    },
    "duration_ms": {
      "type": "integer",
      "description": "Length of the file."
    },
    "loopable": {
      "type": "boolean",
      "description": "Legacy flag; use loop_status=prepared for a checked loop."
    },
    "loop_status": {
      "type": "string"
    },
    "license": {
      "type": "string"
    },
    "acoustics": {
      "$ref": "#/$defs/Acoustics"
    },
    "format_metadata": {
      "type": "object",
      "description": "Per format (wav, mp3, ogg): sha256, bytes, duration_ms, sample_rate, channels, codec and decode checks."
    },
    "mp3_url": {
      "type": "string",
      "format": "uri"
    },
    "wav_url": {
      "type": "string",
      "format": "uri"
    },
    "ogg_url": {
      "type": "string",
      "format": "uri",
      "description": "Sounds published before 2026-10-14."
    },
    "page_url": {
      "type": "string",
      "format": "uri"
    },
    "fit": {
      "type": "string",
      "enum": [
        "full",
        "closest"
      ]
    },
    "missing_terms": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "audible_ms": {
      "type": "integer",
      "description": "Length of the sound itself."
    },
    "score": {
      "type": "number",
      "description": "Ranking signal, not a probability."
    },
    "match": {
      "type": "string"
    }
  },
  "$defs": {
    "Acoustics": {
      "type": [
        "object",
        "null"
      ],
      "description": "Measured from the WAV; null when not measured. Numbers, not a judgement of how a sound suits its use: listen.",
      "properties": {
        "onset_ms": {
          "type": "number",
          "description": "Silence before the sound starts."
        },
        "peak_ms": {
          "type": "number",
          "description": "The loudest sample, from the start of the file. Align this with an event."
        },
        "audible_ms": {
          "type": "number",
          "description": "First to last moment within 40 dB of the peak."
        },
        "attack_ms": {
          "type": [
            "number",
            "null"
          ],
          "description": "Rise from the sound's start to its loudest window; does not count silence before it."
        },
        "tail_ms": {
          "type": [
            "number",
            "null"
          ],
          "description": "Fall from the loudest window to -40 dB."
        },
        "centroid_hz": {
          "type": [
            "number",
            "null"
          ],
          "description": "Spectral brightness."
        },
        "peak_dbfs": {
          "type": "number"
        },
        "rms_dbfs": {
          "type": "number",
          "description": "Average level across the audible span."
        },
        "character": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    }
  }
}