{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/audioscrape-com/json-schema/audioscrape-com-entity-detail-schema.json",
  "title": "EntityDetail",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/audioscrape-com-openapi.json#/components/schemas/EntityDetail",
  "type": "object",
  "required": [
    "id",
    "name",
    "slug",
    "entity_type",
    "mention_count"
  ],
  "properties": {
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "entity_type": {
      "type": "string"
    },
    "id": {
      "type": "integer",
      "format": "int64"
    },
    "mention_count": {
      "type": "integer",
      "format": "int64"
    },
    "name": {
      "type": "string"
    },
    "recent_episodes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EntityEpisodeMention"
      },
      "description": "Top episodes mentioning this entity. Only populated by\n`GET /api/entities/{slug}` — search results\n(`GET /api/entities`) always return an empty list and the field\nis omitted from the JSON to keep responses compact."
    },
    "slug": {
      "type": "string"
    },
    "wikidata_qid": {
      "type": [
        "string",
        "null"
      ],
      "description": "Wikidata QID for head entities (GH#161 linking) — the stable\nexternal join key. Omitted when unlinked (the long tail)."
    }
  },
  "$defs": {
    "EntityEpisodeMention": {
      "type": "object",
      "required": [
        "episode_id",
        "episode_title",
        "podcast_title",
        "mention_count"
      ],
      "properties": {
        "episode_id": {
          "type": "integer",
          "format": "int64"
        },
        "episode_title": {
          "type": "string"
        },
        "mention_count": {
          "type": "integer",
          "format": "int64"
        },
        "podcast_title": {
          "type": "string"
        }
      }
    }
  }
}