{"openapi":"3.1.0","info":{"title":"trp-api — Trans Resilience Project","version":"1.1.0","summary":"Free, keyless, read-only community data endpoints. No registration, no tracking.","description":"First residents: the TDoR memorial dataset — reports of trans people lost to violence, from the Remembering Our Dead project (tdor.translivesmatter.info), maintained by Anna-Jayne Metcalfe and contributors. This API exists so that memorials, visualizations, and research don't need accounts to say the names.\n\nData is served from a mirror: the tdor-data repository export, plus a daily overlay from the live site's feed. Photos and full descriptions are never served. Every response carries attribution — please keep it with the data. Memorial responses carry `Content-Signal: ai-train=no`.","contact":{"name":"Trans Resilience Project","url":"https://transresilience.org"}},"servers":[{"url":"https://api.transresilience.org"}],"paths":{"/":{"get":{"operationId":"index","summary":"Self-describing index","responses":{"200":{"description":"Endpoints, attribution, and data freshness.","headers":{"ETag":{"description":"The data version; send back via If-None-Match for a 304.","schema":{"type":"string"}},"X-Dataset-Version":{"description":"Same value as the ETag, unquoted.","schema":{"type":"string"}},"Content-Signal":{"description":"Always `search=yes, ai-input=yes, ai-train=no` — these names are not ours to give to model training.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Meta"},{"type":"object"}]}}}},"304":{"description":"Not Modified — the If-None-Match validator still holds."}}}},"/openapi.json":{"get":{"operationId":"openapi","summary":"This document","responses":{"200":{"description":"OpenAPI 3.1","content":{"application/json":{}}},"304":{"description":"Not Modified — the If-None-Match validator still holds."}}}},"/v1/tdor/reports":{"get":{"operationId":"listReports","summary":"List / filter reports","description":"Always sorted date-descending. `year` (the TDoR reporting year) overrides `from`/`to` when present.","parameters":[{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"Earliest date of death, inclusive."},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"Latest date of death, inclusive."},{"name":"country","in":"query","schema":{"type":"string"},"description":"Case-insensitive exact match."},{"name":"category","in":"query","schema":{"type":"string"},"description":"Case-insensitive exact match."},{"name":"year","in":"query","schema":{"type":"integer"},"description":"TDoR reporting year: Oct 1 (previous year) – Sep 30, named for the year it ends. Overrides from/to."},{"name":"q","in":"query","schema":{"type":"string"},"description":"Case-insensitive substring across name, city, state, country."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":100}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"A page of reports.","headers":{"ETag":{"description":"The data version; send back via If-None-Match for a 304.","schema":{"type":"string"}},"X-Dataset-Version":{"description":"Same value as the ETag, unquoted.","schema":{"type":"string"}},"Content-Signal":{"description":"Always `search=yes, ai-input=yes, ai-train=no` — these names are not ours to give to model training.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Meta"},{"type":"object","required":["total","limit","offset","reports"],"properties":{"total":{"type":"integer","description":"Matches across all pages."},"limit":{"type":"integer"},"offset":{"type":"integer"},"reports":{"type":"array","items":{"$ref":"#/components/schemas/Report"}}}}]}}}},"304":{"description":"Not Modified — the If-None-Match validator still holds."}}}},"/v1/tdor/reports/{uid}":{"get":{"operationId":"getReport","summary":"One person's report","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{6,16}$"}}],"responses":{"200":{"description":"The report.","headers":{"ETag":{"description":"The data version; send back via If-None-Match for a 304.","schema":{"type":"string"}},"X-Dataset-Version":{"description":"Same value as the ETag, unquoted.","schema":{"type":"string"}},"Content-Signal":{"description":"Always `search=yes, ai-input=yes, ai-train=no` — these names are not ours to give to model training.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Meta"},{"type":"object","required":["report"],"properties":{"report":{"$ref":"#/components/schemas/Report"}}}]}}}},"304":{"description":"Not Modified — the If-None-Match validator still holds."},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}}}}},"/v1/tdor/sample":{"get":{"operationId":"sampleReports","summary":"Recency-weighted random sample, for living memorials","description":"Weight = exp(−age_days / tau); sampled without replacement; the most recent report is always included; sorted date-descending. Every call draws differently — responses are `no-store` and carry no validator. Built for memorial walls that should never repeat themselves and always lean toward now.","parameters":[{"name":"days","in":"query","schema":{"type":"integer","minimum":1,"maximum":3650,"default":400},"description":"Window: only deaths within the last N days."},{"name":"k","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":18},"description":"Sample size (the whole window if it holds fewer)."},{"name":"tau","in":"query","schema":{"type":"integer","minimum":1,"maximum":3650,"default":120},"description":"Recency e-folding time constant, in days — larger reaches deeper into the past."}],"responses":{"200":{"description":"The drawing.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Meta"},{"type":"object","required":["reports"],"properties":{"reports":{"type":"array","items":{"$ref":"#/components/schemas/Report"}}}}]}}}}}}},"/v1/tdor/stats":{"get":{"operationId":"stats","summary":"Counts by dimension","parameters":[{"name":"by","in":"query","required":true,"schema":{"type":"string","enum":["year","tdor_year","country","category"]},"description":"`year` = calendar year of death; `tdor_year` = the Oct–Sep TDoR reporting year (the community's own counting)."}],"responses":{"200":{"description":"Counts, largest first.","headers":{"ETag":{"description":"The data version; send back via If-None-Match for a 304.","schema":{"type":"string"}},"X-Dataset-Version":{"description":"Same value as the ETag, unquoted.","schema":{"type":"string"}},"Content-Signal":{"description":"Always `search=yes, ai-input=yes, ai-train=no` — these names are not ours to give to model training.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Meta"},{"type":"object","required":["by","counts"],"properties":{"by":{"type":"string"},"counts":{"type":"array","items":{"type":"object","required":["key","count"],"properties":{"key":{"type":"string"},"count":{"type":"integer"}}}}}}]}}}},"304":{"description":"Not Modified — the If-None-Match validator still holds."},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}}}}}},"components":{"schemas":{"Report":{"type":"object","description":"One memorial report — what the memorial cards hold. Photos and full descriptions are never served.","required":["uid","name","date","category"],"properties":{"uid":{"type":["string","null"],"pattern":"^[0-9a-f]{6,16}$","description":"The memorial site's stable id for this person; the key for /v1/tdor/reports/{uid}."},"name":{"type":"string","description":"\"Name unknown\" entries are part of the memorial's truth."},"age":{"type":["string","null"],"description":"As recorded — sometimes a range."},"date":{"type":"string","format":"date","description":"Date of death (YYYY-MM-DD)."},"city":{"type":["string","null"]},"state":{"type":["string","null"],"description":"State / province / region."},"country":{"type":["string","null"]},"latitude":{"type":["number","null"]},"longitude":{"type":["number","null"]},"category":{"type":"string","description":"e.g. \"violence\", \"suicide\", \"medical\", \"custodial\"."},"cause":{"type":["string","null"]},"ref":{"type":["string","null"],"description":"TDoR list / source reference, when the CSV export carries one."},"permalink":{"type":["string","null"],"format":"uri","description":"The person's page on tdor.translivesmatter.info."},"summary":{"type":["string","null"],"description":"First line of the report (the memorial-card line), ≤240 chars."}}},"Meta":{"type":"object","description":"Attribution + freshness, on every response.","properties":{"source":{"type":"string","format":"uri"},"data_repo":{"type":"string","format":"uri"},"attribution":{"type":"string","description":"Carry this forward: the data is the Remembering Our Dead project's work."},"dataset_version":{"type":"string","description":"<bundle-hash> or <bundle-hash>.<overlay-hash>; also the ETag."},"generated_at":{"type":"string","format":"date-time","description":"When the bundled dataset was compiled."},"overlay_fetched_at":{"type":["string","null"],"format":"date-time","description":"Last daily refresh from the live feed; null if none."},"newest_report":{"type":["string","null"],"format":"date","description":"Most recent date of death in the served data."}}}}}}