{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ludoteca-dev/json-schema/ludoteca-dev-juego-schema.json",
  "title": "Juego",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ludoteca-dev-openapi.json#/components/schemas/Juego",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Id de ludoteca.dev: estable, no cambia aunque cambie el slug"
    },
    "titulo": {
      "type": "string",
      "description": "Título"
    },
    "titulo_original": {
      "type": [
        "string",
        "null"
      ],
      "description": "Título en chino, japonés o coreano cuando el título es la traducción inglesa de Steam"
    },
    "ano": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Año de lanzamiento"
    },
    "lanzamiento": {
      "type": "object",
      "properties": {
        "fecha": {
          "type": [
            "string",
            "null"
          ],
          "description": "Tal como la da la tienda (\"10 SEP 2019\", \"Por confirmarse\")"
        },
        "proximamente": {
          "type": "boolean"
        }
      }
    },
    "url_ficha": {
      "type": "string",
      "description": "URL de la ficha",
      "format": "uri"
    },
    "url_permanente": {
      "type": "string",
      "description": "URL que redirige siempre a la ficha (/id/LDT-n)",
      "format": "uri"
    },
    "descripcion": {
      "type": [
        "string",
        "null"
      ]
    },
    "idioma_descripcion": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "es",
        "en",
        null
      ],
      "description": "\"en\" cuando la única descripción disponible es en inglés"
    },
    "traduccion_automatica": {
      "type": "boolean",
      "description": "La descripción es una traducción automática del inglés (no había ninguna en español en las tiendas)"
    },
    "portada": {
      "type": "object",
      "description": "Copias reducidas servidas por ludoteca.dev (WebP); las originales de la tienda, en origen",
      "properties": {
        "grande": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "mini": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "vertical": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "horizontal": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "origen": {
          "type": "object",
          "properties": {
            "vertical": {
              "type": [
                "string",
                "null"
              ]
            },
            "horizontal": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        }
      }
    },
    "captura": {
      "type": [
        "object",
        "null"
      ],
      "description": "Una captura del juego en marcha (de momento, de Steam): imagen reducida servida por ludoteca.dev y la original de la tienda",
      "properties": {
        "imagen": {
          "type": "string",
          "format": "uri"
        },
        "origen": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "estudio": {
      "type": [
        "string",
        "null"
      ],
      "description": "Desarrollador, como texto"
    },
    "desarrollador": {
      "type": "null",
      "description": "Siempre null (compatibilidad con el formato de DeVuego, donde es una persona)"
    },
    "editora": {
      "type": [
        "string",
        "null"
      ]
    },
    "pais": {
      "type": [
        "string",
        "null"
      ],
      "description": "ISO 3166-1 del estudio desarrollador"
    },
    "pais_fuente": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "estudio",
        "editora",
        "wikidata",
        "devuego",
        "manual",
        null
      ],
      "description": "De dónde sale el país. «editora»: la tienda no dice qué estudio lo desarrolla y es el de su editora (deducción)"
    },
    "empresas": {
      "type": "object",
      "properties": {
        "desarrolladores": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EmpresaCorta"
          }
        },
        "editoras": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EmpresaCorta"
          }
        }
      }
    },
    "tiendas": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tienda"
      }
    },
    "otras_versiones": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Version"
      }
    },
    "tiendas_retiradas": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/TiendaRetirada"
      },
      "description": "Tiendas en las que estuvo y ya no se vende (delisted). Aparte de tiendas para no enlazarlas como sitio donde comprar."
    },
    "pack": {
      "type": "boolean",
      "description": "true si la tienda lo vende como lote de 2 o más juegos distintos (Xbox, Nintendo). Los packs no salen en los listados."
    },
    "packs": {
      "type": "object",
      "description": "incluye: juegos de ludoteca.dev que contiene este pack (si la tienda lo detalla). incluido_en: packs que contienen este juego.",
      "properties": {
        "incluye": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "titulo": {
                "type": "string"
              },
              "ano": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "url": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        },
        "incluido_en": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "titulo": {
                "type": "string"
              },
              "ano": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "url": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      }
    },
    "dlc": {
      "type": "object",
      "description": "DLC del juego por tienda (de momento, steam), sin ficha propia. Solo los que la tienda sigue vendiendo; lista con los 40 primeros por título y total. Es la lista que da Steam en la ficha del juego: en algunos juegos antiguos no trae todos (url lleva a la página completa de DLC en la tienda).",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Página de DLC del juego en la tienda"
          },
          "lista": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "titulo": {
                  "type": "string"
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                }
              }
            }
          }
        }
      }
    },
    "descatalogado": {
      "type": "boolean",
      "description": "true si salió hace al menos 2 años y no se vende en ninguna tienda digital (clásicos, retirados...). Listado: /descatalogados."
    },
    "duracion": {
      "type": [
        "object",
        "null"
      ],
      "description": "Cuánto dura, en minutos, según los votos de los jugadores de IGDB (game_time_to_beats). Null si no hay dato (lo tiene ~1 de cada 10 fichas con IGDB).",
      "properties": {
        "rapido_min": {
          "type": [
            "integer",
            "null"
          ]
        },
        "normal_min": {
          "type": [
            "integer",
            "null"
          ]
        },
        "completo_min": {
          "type": [
            "integer",
            "null"
          ]
        },
        "votos": {
          "type": "integer",
          "description": "Jugadores que han votado: con pocos, tómalo como orientativo"
        },
        "fuente": {
          "type": "string"
        }
      }
    },
    "relaciones": {
      "type": "array",
      "description": "Relaciones con otras fichas, de IGDB. sentido «de»: este juego es un <tipo> del otro (Black Mesa: remake de Half-Life); «tiene»: el otro es un <tipo> de este.",
      "items": {
        "type": "object",
        "properties": {
          "tipo": {
            "type": "string",
            "enum": [
              "remake",
              "remaster",
              "expansion",
              "dlc",
              "port",
              "edicion",
              "episodio",
              "mod"
            ]
          },
          "sentido": {
            "type": "string",
            "enum": [
              "de",
              "tiene"
            ]
          },
          "id": {
            "type": "string"
          },
          "titulo": {
            "type": "string"
          },
          "ano": {
            "type": [
              "integer",
              "null"
            ]
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    },
    "compra_fisica": {
      "type": "array",
      "description": "Dónde comprar la edición física: tiendas de ediciones físicas (GAME, Tesura Games) que la tienen en su catálogo, una entrada por tienda y plataforma.",
      "items": {
        "type": "object",
        "properties": {
          "tienda": {
            "type": "string"
          },
          "nombre": {
            "type": "string"
          },
          "plataforma": {
            "type": "string",
            "description": "Clave de la plataforma (la de etiquetas.fisico)"
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    },
    "ids": {
      "type": "object",
      "description": "Ids en otras bases de datos",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    },
    "valoraciones": {
      "type": "object",
      "description": "Solo las que existen. steam: la de los jugadores (se refresca con la cola de Steam). opencritic: media de la crítica sobre 100 según Wikidata (CC0), con la fecha de ese dato: no siempre es la actual, la vigente está en url.",
      "properties": {
        "steam": {
          "type": "object",
          "properties": {
            "categoria": {
              "type": "string",
              "enum": [
                "extremadamente_positivas",
                "muy_positivas",
                "positivas",
                "mayormente_positivas",
                "variadas",
                "mayormente_negativas",
                "negativas",
                "muy_negativas",
                "extremadamente_negativas"
              ]
            },
            "texto": {
              "type": "string"
            },
            "resenas": {
              "type": "integer"
            },
            "url": {
              "type": "string",
              "format": "uri"
            }
          }
        },
        "opencritic": {
          "type": "object",
          "properties": {
            "nota": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100
            },
            "fecha": {
              "type": [
                "string",
                "null"
              ],
              "format": "date"
            },
            "url": {
              "type": [
                "string",
                "null"
              ],
              "format": "uri"
            },
            "fuente": {
              "type": "string",
              "enum": [
                "wikidata"
              ]
            }
          }
        }
      }
    },
    "compatibilidad": {
      "type": "object",
      "description": "Solo lo que se sabe, de la versión de Steam. Se comprueba cada ~90 días (comprobado = fecha).",
      "properties": {
        "steam_deck": {
          "type": "object",
          "description": "Veredicto de Valve",
          "properties": {
            "nivel": {
              "type": "string",
              "enum": [
                "verificado",
                "jugable",
                "no_compatible"
              ]
            },
            "texto": {
              "type": "string"
            },
            "url": {
              "type": "string",
              "format": "uri"
            },
            "comprobado": {
              "type": "string",
              "format": "date"
            }
          }
        },
        "protondb": {
          "type": "object",
          "description": "Linux vía Proton, según los informes de la comunidad en ProtonDB",
          "properties": {
            "nivel": {
              "type": "string",
              "enum": [
                "native",
                "platinum",
                "gold",
                "silver",
                "bronze",
                "borked",
                "pending"
              ]
            },
            "url": {
              "type": "string",
              "format": "uri"
            },
            "comprobado": {
              "type": "string",
              "format": "date"
            }
          }
        }
      }
    },
    "etiquetas": {
      "type": "object",
      "description": "generos: unificados de los de cada tienda. saga y motor: de Wikidata. acceso: game-pass y ea-play (Xbox), ps-plus (catálogo de PS Plus Extra), gratis, demo, acceso-anticipado. fisico: plataformas con edición física (eShop de Nintendo y DeVuego; solo consta el «sí»). descatalogado: no se vende en ninguna tienda digital (recalculado a diario; al momento, el campo descatalogado). Cada una con la URL de su listado en ludoteca.dev (o null).",
      "properties": {
        "generos": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "clave": {
                "type": "string"
              },
              "nombre": {
                "type": "string"
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri"
              }
            }
          }
        },
        "saga": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "clave": {
                "type": "string"
              },
              "nombre": {
                "type": "string"
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri"
              }
            }
          }
        },
        "motor": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "clave": {
                "type": "string"
              },
              "nombre": {
                "type": "string"
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri"
              }
            }
          }
        },
        "acceso": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "clave": {
                "type": "string"
              },
              "nombre": {
                "type": "string"
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri"
              }
            }
          }
        },
        "fisico": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "clave": {
                "type": "string"
              },
              "nombre": {
                "type": "string"
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri"
              }
            }
          }
        },
        "descatalogado": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "clave": {
                "type": "string"
              },
              "nombre": {
                "type": "string"
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri"
              }
            }
          }
        }
      }
    },
    "tecnico": {
      "type": [
        "object",
        "null"
      ],
      "description": "Datos técnicos. Cada tienda describe su versión (el tamaño en Switch no es el de PC), así que van por tienda; solo aparecen los campos que esa tienda da. null si no hay ninguno.",
      "properties": {
        "pegi": {
          "type": [
            "object",
            "null"
          ],
          "description": "La edad que dan más tiendas",
          "properties": {
            "edad": {
              "type": "integer",
              "enum": [
                3,
                7,
                12,
                16,
                18
              ]
            },
            "descriptores": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "violencia",
                  "lenguaje",
                  "miedo",
                  "drogas",
                  "sexo",
                  "discriminacion",
                  "juego",
                  "compras"
                ]
              }
            }
          }
        },
        "esrb": {
          "type": [
            "object",
            "null"
          ],
          "description": "Clasificación ESRB (EE. UU.). Fuente, por este orden: Steam (por appid, en la tienda de EE. UU.), Xbox (por id de la tienda) o la eShop de Nintendo de EE. UU. (emparejada por título y estudio/editora). null si ninguna la da.",
          "properties": {
            "codigo": {
              "type": "string",
              "enum": [
                "ec",
                "e",
                "e10",
                "t",
                "m",
                "ao",
                "rp"
              ]
            },
            "etiqueta": {
              "type": "string",
              "enum": [
                "Early Childhood",
                "Everyone",
                "Everyone 10+",
                "Teen",
                "Mature 17+",
                "Adults Only 18+",
                "Rating Pending"
              ]
            },
            "descriptores": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Descriptores de contenido, en inglés como los publica la ESRB"
            },
            "interactivos": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Elementos interactivos (no son contenido)"
            },
            "fuente": {
              "type": "string",
              "enum": [
                "steam",
                "xbox",
                "nintendo_us"
              ]
            }
          }
        },
        "idiomas": {
          "type": "object",
          "description": "Códigos BCP 47 (en, es-ES, es-419, zh-Hans...) de todas las tiendas",
          "properties": {
            "textos": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "voces": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Doblaje (solo lo da Steam)"
            }
          }
        },
        "accesibilidad": {
          "type": "array",
          "description": "Opciones de accesibilidad (solo las da Steam, desde 2024)",
          "items": {
            "type": "object",
            "properties": {
              "clave": {
                "type": "string",
                "enum": [
                  "subtitulos",
                  "texto_ajustable",
                  "color",
                  "dificultad",
                  "sin_tiempo",
                  "guardar",
                  "camara",
                  "menus_narrados",
                  "volumen",
                  "envolvente",
                  "solo_teclado",
                  "solo_raton",
                  "solo_tactil",
                  "voz_a_texto",
                  "texto_a_voz"
                ]
              },
              "nombre": {
                "type": "string"
              }
            }
          }
        },
        "tiendas": {
          "type": "object",
          "description": "Por clave de tienda (steam, nintendo, xbox, playstation...)",
          "additionalProperties": {
            "type": "object",
            "properties": {
              "plataformas": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "tamano_mb": {
                "type": "integer"
              },
              "tamano_tipo": {
                "type": "string",
                "enum": [
                  "disco",
                  "descarga"
                ],
                "description": "disco: espacio que pide en PC; descarga: lo que ocupa al bajarlo"
              },
              "requisitos": {
                "type": "object",
                "description": "{\"min\": {\"so\", \"cpu\", \"ram\", \"gpu\", \"directx\", \"disco\"}, \"rec\": {...}} (PC, de Steam)"
              },
              "mando": {
                "type": "string",
                "enum": [
                  "total",
                  "parcial"
                ]
              },
              "logros": {
                "type": "integer"
              },
              "jugadores": {
                "type": "integer",
                "description": "Máximo de jugadores"
              },
              "funciones": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "un_jugador",
                    "multijugador",
                    "multijugador_online",
                    "multijugador_local",
                    "cooperativo",
                    "coop_online",
                    "coop_local",
                    "pantalla_partida",
                    "pvp",
                    "pvp_online",
                    "pvp_local",
                    "mmo",
                    "juego_cruzado",
                    "modo_tv",
                    "modo_sobremesa",
                    "modo_portatil",
                    "nube",
                    "necesita_conexion",
                    "chat_voz",
                    "remote_play",
                    "remote_play_together",
                    "play_anywhere",
                    "optimizado_series",
                    "mejorado_ps5pro",
                    "vibracion_dualsense",
                    "gatillos_adaptativos",
                    "4k",
                    "hdr",
                    "120fps",
                    "raytracing",
                    "vr",
                    "workshop",
                    "subtitulos",
                    "compras",
                    "demo",
                    "version_fisica",
                    "gratis",
                    "acceso_anticipado"
                  ]
                }
              },
              "pegi": {
                "type": "integer"
              }
            }
          }
        }
      }
    }
  },
  "$defs": {
    "EmpresaCorta": {
      "type": "object",
      "properties": {
        "nombre": {
          "type": "string"
        },
        "nombre_original": {
          "type": [
            "string",
            "null"
          ],
          "description": "En chino, japonés o coreano, si «nombre» es el nombre latino"
        },
        "slug": {
          "type": "string"
        },
        "pais": {
          "type": [
            "string",
            "null"
          ]
        },
        "url": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "Tienda": {
      "type": "object",
      "properties": {
        "clave": {
          "type": "string",
          "enum": [
            "steam",
            "epic",
            "gog",
            "itch",
            "playstation",
            "xbox",
            "nintendo",
            "appstore",
            "googleplay"
          ]
        },
        "nombre": {
          "type": "string"
        },
        "id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Id en la tienda, en el formato que acepta /externo/{clave}/{id}; null si no se conoce"
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "icono": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "color": {
          "type": [
            "string",
            "null"
          ]
        },
        "fuente": {
          "type": "string",
          "description": "De dónde salió el enlace: la tienda de origen, catalogo, wikidata, busqueda, devuego o revisado (confirmado a mano)"
        },
        "titulo": {
          "type": [
            "string",
            "null"
          ],
          "description": "Título en esa tienda (puede llevar la edición o la plataforma)"
        },
        "editora": {
          "type": [
            "string",
            "null"
          ],
          "description": "Editora según esa tienda (cambia a menudo en consolas y GOG)"
        },
        "desarrollador": {
          "type": [
            "string",
            "null"
          ],
          "description": "Desarrollador según esa tienda"
        },
        "fecha": {
          "type": [
            "string",
            "null"
          ],
          "description": "Fecha de lanzamiento en esa tienda, tal como la da"
        }
      }
    },
    "TiendaRetirada": {
      "type": "object",
      "properties": {
        "clave": {
          "type": "string",
          "enum": [
            "steam",
            "epic",
            "gog",
            "itch",
            "playstation",
            "xbox",
            "nintendo",
            "appstore",
            "googleplay"
          ]
        },
        "nombre": {
          "type": "string"
        },
        "id": {
          "type": [
            "string",
            "null"
          ]
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "La URL que tenía (probablemente ya no funciona)"
        },
        "url_archivo": {
          "type": "string",
          "format": "uri",
          "description": "Copia en Wayback Machine (archive.org), la más cercana a la retirada"
        },
        "retirado_desde": {
          "type": [
            "string",
            "null"
          ],
          "format": "date",
          "description": "Cuándo se detectó o se marcó la retirada (no la fecha exacta)"
        }
      }
    },
    "Version": {
      "type": "object",
      "description": "Otra versión del juego en una tienda que ya tiene enlace (PS4 y PS5, Xbox One y Series...)",
      "properties": {
        "clave": {
          "type": "string",
          "enum": [
            "steam",
            "epic",
            "gog",
            "itch",
            "playstation",
            "xbox",
            "nintendo",
            "appstore",
            "googleplay"
          ]
        },
        "nombre": {
          "type": "string"
        },
        "id": {
          "type": [
            "string",
            "null"
          ]
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "titulo": {
          "type": [
            "string",
            "null"
          ]
        },
        "editora": {
          "type": [
            "string",
            "null"
          ]
        },
        "desarrollador": {
          "type": [
            "string",
            "null"
          ]
        },
        "fecha": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}