{"openapi":"3.1.0","info":{"title":"Topaz Game Data API","version":"1.0.0","description":"Unified structured data API for video games — entities, relationships, maps, provenance, incremental sync and multilingual content.\n\nAll data endpoints require an API key. Records are built from named upstream sources; each record carries its licence, attribution and verification status. No game images are served.","contact":{"name":"Topaz","url":"https://www.topazapi.dev"}},"servers":[{"url":"https://www.topazapi.dev/api/v1","description":"v1"}],"tags":[{"name":"Account"},{"name":"Games"},{"name":"Datasets"},{"name":"Entities"},{"name":"Search"},{"name":"Maps"},{"name":"Discovery"},{"name":"Sync"},{"name":"Admin"},{"name":"Verification"}],"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]}],"paths":{"/me":{"get":{"tags":["Account"],"summary":"Current account, plan and usage","operationId":"getMe","responses":{"200":{"description":"Account snapshot"},"401":{"$ref":"#/components/responses/Problem"}}}},"/games":{"get":{"tags":["Games"],"summary":"List games","operationId":"listGames","parameters":[{"$ref":"#/components/parameters/IfNoneMatch"}],"responses":{"200":{"description":"Game catalogue","headers":{"ETag":{"schema":{"type":"string"}},"RateLimit-Limit":{"schema":{"type":"string"}},"RateLimit-Remaining":{"schema":{"type":"string"}},"RateLimit-Reset":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"304":{"description":"Not Modified"},"401":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}}}},"/games/{game}":{"get":{"tags":["Games"],"summary":"Get a game","operationId":"getGame","parameters":[{"$ref":"#/components/parameters/GameSlug"},{"$ref":"#/components/parameters/IfNoneMatch"}],"responses":{"200":{"description":"Game detail"},"304":{"description":"Not Modified"},"404":{"$ref":"#/components/responses/Problem"}}}},"/games/{game}/datasets":{"get":{"tags":["Datasets"],"summary":"List datasets for a game","operationId":"listDatasets","parameters":[{"$ref":"#/components/parameters/GameSlug"}],"responses":{"200":{"description":"Datasets"}}}},"/games/{game}/datasets/{dataset}":{"get":{"tags":["Datasets"],"summary":"Get dataset detail, schema and versions","operationId":"getDataset","parameters":[{"$ref":"#/components/parameters/GameSlug"},{"name":"dataset","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Dataset detail"}}}},"/games/{game}/entities":{"get":{"tags":["Entities"],"summary":"List entities","operationId":"listEntities","parameters":[{"$ref":"#/components/parameters/GameSlug"},{"$ref":"#/components/parameters/Lang"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PerPage"},{"name":"type","in":"query","schema":{"type":"string"}},{"name":"q","in":"query","schema":{"type":"string"}},{"name":"sort","in":"query","schema":{"type":"string","enum":["name","updated","type"]}}],"responses":{"200":{"description":"Entity list"}}}},"/games/{game}/entities/{id}":{"get":{"tags":["Entities"],"summary":"Get entity by id or slug","operationId":"getEntity","parameters":[{"$ref":"#/components/parameters/GameSlug"},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Lang"},{"name":"include","in":"query","schema":{"type":"string"},"description":"Comma-separated includes, e.g. sources"}],"responses":{"200":{"description":"Entity detail (no image/media fields on the public API)"}}}},"/games/{game}/entities/{id}/related":{"get":{"tags":["Entities"],"summary":"Traverse entity relationships","operationId":"getRelatedEntities","parameters":[{"$ref":"#/components/parameters/GameSlug"},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Related entities"}}}},"/games/{game}/search":{"get":{"tags":["Search"],"summary":"Advanced full-text search with facets and attribute filters","operationId":"searchGame","parameters":[{"$ref":"#/components/parameters/GameSlug"},{"name":"q","in":"query","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Lang"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PerPage"},{"name":"type","in":"query","schema":{"type":"string"}},{"name":"attr","in":"query","schema":{"type":"string"},"description":"JSONB attribute key filter"},{"name":"attr_value","in":"query","schema":{"type":"string"}},{"name":"fields","in":"query","schema":{"type":"string"},"description":"Comma list: name,slug,type,attributes"},{"name":"facets","in":"query","schema":{"type":"string","enum":["0","1"],"default":"1"}}],"responses":{"200":{"description":"Ranked results with optional facets"}}}},"/games/{game}/types":{"get":{"tags":["Discovery"],"summary":"Discover entity types, attributes and relationship types","operationId":"listTypes","parameters":[{"$ref":"#/components/parameters/GameSlug"}],"responses":{"200":{"description":"Type catalogue"}}}},"/games/{game}/maps":{"get":{"tags":["Maps"],"summary":"List coordinate systems and map layers","operationId":"listMaps","parameters":[{"$ref":"#/components/parameters/GameSlug"}],"responses":{"200":{"description":"Map metadata"}}}},"/games/{game}/maps/features":{"get":{"tags":["Maps"],"summary":"Query map features as GeoJSON","operationId":"listMapFeatures","parameters":[{"$ref":"#/components/parameters/GameSlug"},{"name":"layer","in":"query","schema":{"type":"string"}},{"name":"bbox","in":"query","schema":{"type":"string"},"description":"minX,minY,maxX,maxY in game coordinates"},{"name":"q","in":"query","schema":{"type":"string"},"description":"Filter features by name"},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PerPage"}],"responses":{"200":{"description":"GeoJSON FeatureCollection"}}}},"/games/{game}/maps/geojson":{"get":{"tags":["Maps"],"summary":"Dedicated GeoJSON FeatureCollection (raw=1 for bare geo+json)","operationId":"getMapGeoJson","parameters":[{"$ref":"#/components/parameters/GameSlug"},{"name":"layer","in":"query","schema":{"type":"string"}},{"name":"bbox","in":"query","schema":{"type":"string"},"description":"minX,minY,maxX,maxY"},{"name":"entity_type","in":"query","schema":{"type":"string"}},{"name":"q","in":"query","schema":{"type":"string"}},{"name":"raw","in":"query","schema":{"type":"string","enum":["0","1"]}},{"name":"limit","in":"query","schema":{"type":"integer","maximum":2000,"default":500}}],"responses":{"200":{"description":"FeatureCollection","content":{"application/json":{"schema":{"type":"object"}},"application/geo+json":{"schema":{"type":"object"}}}}}}},"/games/{game}/maps/routing":{"get":{"tags":["Maps"],"summary":"Fastest drive between points, with stops and one alternative (Developer)","description":"Points are in the game's map units (same as /maps/features) and are snapped to the nearest road (max 500 m). Times use an average speed per road type: compare routes, don't promise arrival times. 501 when no road network is loaded.","operationId":"getMapRouting","parameters":[{"$ref":"#/components/parameters/GameSlug"},{"name":"from","in":"query","required":true,"schema":{"type":"string"},"example":"27700,39400"},{"name":"to","in":"query","required":true,"schema":{"type":"string"},"example":"30144,30930"},{"name":"via","in":"query","schema":{"type":"string"},"description":"Up to 8 stops: x,y;x,y"},{"name":"alternatives","in":"query","schema":{"type":"string","enum":["0","1"]}}],"responses":{"200":{"description":"FeatureCollection of routes (rank 0 = fastest), each with distance_m, duration_s, via and legs (each leg has turn-by-turn steps)","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"501":{"$ref":"#/components/responses/Problem"}}}},"/games/{game}/maps/roads":{"get":{"tags":["Maps"],"summary":"Drivable road network, junction to junction (Developer)","operationId":"getMapRoads","parameters":[{"$ref":"#/components/parameters/GameSlug"},{"name":"type","in":"query","schema":{"type":"string"},"description":"Comma-separated road types, e.g. highway,route"},{"name":"bbox","in":"query","schema":{"type":"string"},"description":"minX,minY,maxX,maxY"},{"name":"format","in":"query","schema":{"type":"string","enum":["compact"]},"description":"Whole graph in one small payload, to route offline"}],"responses":{"200":{"description":"GeoJSON FeatureCollection (or compact graph)","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"$ref":"#/components/responses/Problem"}}}},"/games/{game}/entities/{id}/verify":{"post":{"tags":["Verification"],"summary":"Update entity source verification status (Developer+)","operationId":"verifyEntity","parameters":[{"$ref":"#/components/parameters/GameSlug"},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["unverified","verified","disputed","rejected","pending_review"]},"source_id":{"type":"string","format":"uuid"},"confidence":{"type":"number","minimum":0,"maximum":1}}}}}},"responses":{"200":{"description":"Verification updated"},"403":{"$ref":"#/components/responses/Problem"}}}},"/admin/ingest":{"get":{"tags":["Admin"],"summary":"List curated ingestion adapters","operationId":"listIngestAdapters","responses":{"200":{"description":"Adapter catalogue"}}},"post":{"tags":["Admin"],"summary":"Run a curated fixture adapter (Developer+)","operationId":"runIngestAdapter","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["adapter"],"properties":{"adapter":{"type":"string"}}}}}},"responses":{"200":{"description":"Pipeline result"},"403":{"$ref":"#/components/responses/Problem"}}}},"/games/{game}/changes":{"get":{"tags":["Sync"],"summary":"Incremental change feed","operationId":"listChanges","parameters":[{"$ref":"#/components/parameters/GameSlug"},{"name":"since","in":"query","required":true,"schema":{"type":"string"},"description":"ISO-8601 timestamp or unix seconds"},{"name":"dataset","in":"query","schema":{"type":"string"}},{"$ref":"#/components/parameters/Page"},{"$ref":"#/components/parameters/PerPage"}],"responses":{"200":{"description":"Created, updated and deleted entities since timestamp"}}}},"/games/{game}/exports/{dataset}":{"get":{"tags":["Sync"],"summary":"Stream full dataset export as NDJSON","operationId":"exportDataset","parameters":[{"$ref":"#/components/parameters/GameSlug"},{"name":"dataset","in":"path","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/Lang"}],"responses":{"200":{"description":"NDJSON stream with header, entities and footer","content":{"application/x-ndjson":{"schema":{"type":"string"}}}}}}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key as Bearer token"},"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-Api-Key"}},"parameters":{"GameSlug":{"name":"game","in":"path","required":true,"schema":{"type":"string"},"description":"Game slug (e.g. monster-hunter-wilds)"},"Lang":{"name":"lang","in":"query","schema":{"type":"string","enum":["en","fr","es"],"default":"en"}},"Page":{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},"PerPage":{"name":"per_page","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},"IfNoneMatch":{"name":"If-None-Match","in":"header","schema":{"type":"string"},"description":"Conditional request ETag"}},"schemas":{"Envelope":{"type":"object","properties":{"data":{},"meta":{"type":"object","properties":{"api_version":{"type":"string"},"plan":{"type":"string"},"quota_remaining":{"type":"integer"},"page":{"type":"integer"},"per_page":{"type":"integer"},"total":{"type":"integer"}}}}},"Problem":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"}}}},"responses":{"Problem":{"description":"RFC 9457 Problem Details","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}