{
 "openapi": "3.1.0",
 "info": {
  "title": "Pathogen X: published files",
  "version": "1",
  "description": "A running archive of outbreak reporting, Ebola and plague first: health organisations, news, journals and preprints, collected hourly and kept whole, with a daily brief whose every reference carries its claim class. Pathogen X archives what was reported and by whom; it does not judge whether a report is true. claim_class is what kind of outlet published an item, from the outlet registry, never from reading the item.",
  "license": {
   "name": "CC BY 4.0",
   "url": "https://creativecommons.org/licenses/by/4.0/"
  },
  "contact": {
   "email": "admin@liminallayers.com"
  }
 },
 "servers": [
  {
   "url": "https://pathogenx.liminallayers.com"
  }
 ],
 "paths": {
  "/data/evidence.json": {
   "get": {
    "operationId": "get-data-evidence-json",
    "summary": "Evidence index (30 days)",
    "responses": {
     "200": {
      "description": "Every item kept in the last 30 days: title, link, archive copy, publisher, claim_class, dates, diseases named, topic tags. No article text, no social posts.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "generated_at": {
           "type": "string"
          },
          "build_id": {
           "type": "string"
          },
          "source": {
           "type": "string"
          },
          "license": {
           "type": "object"
          },
          "provenance_rule": {
           "type": "string"
          },
          "fields": {
           "type": "object"
          },
          "claim_classes": {
           "type": "object"
          },
          "count": {
           "type": "integer"
          },
          "documents": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string",
              "description": "PX-D- plus 12 hex: stable for the item's URL."
             },
             "title": {
              "type": "string",
              "description": "The item's headline, as collected."
             },
             "url": {
              "type": "string",
              "description": "The item."
             },
             "archive_url": {
              "type": [
               "null",
               "string"
              ],
              "description": "An Internet Archive copy, where one has been made; null otherwise."
             },
             "source": {
              "type": "string",
              "description": "The registry outlet id it was collected through (data/sources.json)."
             },
             "publisher": {
              "type": "string",
              "description": "Who published it: the outlet's name, or a news-search hit's own publisher."
             },
             "via": {
              "type": "string",
              "description": "The registry outlet it reached the archive through, by name."
             },
             "claim_class": {
              "type": "string",
              "description": "What kind of outlet published it (claim_classes), from the registry."
             },
             "published_at": {
              "type": "string",
              "description": "UTC, as the source gave it; null when it gave none."
             },
             "fetched_at": {
              "type": "string",
              "description": "UTC, when the archive collected it."
             },
             "language": {
              "type": "string",
              "description": "Detected language code."
             },
             "diseases": {
              "type": "array",
              "description": "Tracked diseases the item names (collectors/keywords.py)."
             },
             "tags": {
              "type": "array",
              "description": "Topic and story-thread tags from the nightly tagger (taxonomy); empty until tagged."
             },
             "title_only": {
              "type": "boolean",
              "description": "The body could not be read; only the headline is held."
             }
            }
           }
          }
         }
        }
       }
      }
     }
    },
    "description": "Every item kept in the last 30 days: title, link, archive copy, publisher, claim_class, dates, diseases named, topic tags. No article text, no social posts."
   }
  },
  "/data/evidence.jsonl": {
   "get": {
    "operationId": "get-data-evidence-jsonl",
    "summary": "Evidence index (30 days), JSON Lines",
    "responses": {
     "200": {
      "description": "The evidence index as one JSON object per line, the same records as /data/evidence.json.",
      "content": {
       "application/jsonl": {
        "schema": {
         "type": "string"
        }
       }
      }
     }
    },
    "description": "The evidence index as one JSON object per line, the same records as /data/evidence.json."
   }
  },
  "/data/sources.json": {
   "get": {
    "operationId": "get-data-sources-json",
    "summary": "Sources",
    "responses": {
     "200": {
      "description": "Every registered outlet: tier, claim_class, collection method, whether it is active, its last good and last failed poll, and 30-day social-media counts.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "generated_at": {
           "type": "string"
          },
          "build_id": {
           "type": "string"
          },
          "source": {
           "type": "string"
          },
          "license": {
           "type": "object"
          },
          "provenance_rule": {
           "type": "string"
          },
          "fields": {
           "type": "object"
          },
          "claim_classes": {
           "type": "object"
          },
          "social": {
           "type": "object"
          },
          "count": {
           "type": "integer"
          },
          "sources": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "id": {
              "type": "string",
              "description": "Registry id: the `source` of every evidence record and reference."
             },
             "name": {
              "type": "string",
              "description": "The outlet's name."
             },
             "tier": {
              "type": "integer",
              "description": "2: a health body or specialist outlet, archived in full. 1: general news, kept only when it passes the relevance gate."
             },
             "claim_class": {
              "type": "string",
              "description": "What kind of record its items are (claim_classes)."
             },
             "method": {
              "type": "string",
              "description": "How it is read: rss, sitemap, gnews, newsapi, or a bespoke collector."
             },
             "policy": {
              "type": "string",
              "description": "archive_all (everything kept, gated only for scope) or general_feed (gated)."
             },
             "feed_scoped": {
              "type": "boolean",
              "description": "The feed is scoped at source and bypasses the topical gate."
             },
             "domain": {
              "type": [
               "null",
               "string"
              ],
              "description": "Its web address, for display."
             },
             "enabled": {
              "type": "boolean",
              "description": "False for a retired outlet: no longer polled, kept because its archived items still cite it."
             },
             "active": {
              "type": "boolean",
              "description": "Polled successfully in the last 7 days."
             },
             "last_ok": {
              "type": "string",
              "description": "UTC, the last poll that succeeded (with or without new items); null if none in the 90 days the collection log keeps."
             },
             "last_error": {
              "type": [
               "null",
               "string"
              ],
              "description": "UTC, the last poll that failed; null if none in 90 days."
             },
             "last_error_detail": {
              "type": [
               "null",
               "string"
              ],
              "description": "What the last failure said, or null."
             },
             "articles_30d": {
              "type": "integer",
              "description": "Articles kept from it in the last 30 days."
             }
            }
           }
          }
         }
        }
       }
      }
     }
    },
    "description": "Every registered outlet: tier, claim_class, collection method, whether it is active, its last good and last failed poll, and 30-day social-media counts."
   }
  },
  "/data/outbreaks/ebola.json": {
   "get": {
    "operationId": "get-data-outbreaks-ebola-json",
    "summary": "Ebola, day by day",
    "responses": {
     "200": {
      "description": "The Ebola living page's record: WHO Disease Outbreak News confirmed counts per country, each with WHO's own sentence, and one checked entry per day with its sources and Internet Archive copies.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "generated_at": {
           "type": "string"
          },
          "build_id": {
           "type": "string"
          },
          "source": {
           "type": "string"
          },
          "license": {
           "type": "object"
          },
          "provenance_rule": {
           "type": "string"
          },
          "fields": {
           "type": "object"
          },
          "figures_fields": {
           "type": "object"
          },
          "notes_fields": {
           "type": "object"
          },
          "days_fields": {
           "type": "object"
          },
          "weeks_fields": {
           "type": "object"
          },
          "slug": {
           "type": "string"
          },
          "name": {
           "type": "string"
          },
          "page": {
           "type": "string"
          },
          "start": {
           "type": "string"
          },
          "figures": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "as_of": {
              "type": "string",
              "description": "The date WHO's figures describe."
             },
             "don": {
              "type": "string",
              "description": "The Disease Outbreak News issue id."
             },
             "url": {
              "type": "string",
              "description": "The issue on who.int."
             },
             "wayback": {
              "type": "string",
              "description": "An Internet Archive copy of the issue, or null."
             },
             "rows": {
              "type": "array",
              "description": "One per country: country, cases, deaths (cumulative CONFIRMED only; deaths null when the issue states none) and quote (WHO's own sentence, verbatim)."
             }
            }
           }
          },
          "notes": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "date": {
              "type": "string",
              "description": "The day the note is about (UTC)."
             },
             "label": {
              "type": "string",
              "description": "A short label for the note."
             },
             "text": {
              "type": "string",
              "description": "The note. It carries no counts: a hand-written number goes stale."
             },
             "refs": {
              "type": "array",
              "description": "The archived items it cites: n, title, source, url, wayback."
             }
            }
           }
          },
          "days": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "date": {
              "type": "string",
              "description": "The day (UTC)."
             },
             "status": {
              "type": "string",
              "description": "recorded (written once, two days after the day, never rewritten), settling (inside those two days) or pending (due but not yet written)."
             },
             "sentences": {
              "type": "array",
              "description": "The entry. Each cites refs by [n] and was checked by a second model against the sources it cites."
             },
             "milestone": {
              "type": [
               "null",
               "string"
              ],
              "description": "A short label when the day marks a milestone, else null."
             },
             "articles": {
              "type": "integer",
              "description": "How many items the archive holds for the outbreak that day."
             },
             "refs": {
              "type": "array",
              "description": "n, title, source, url, and wayback (an Internet Archive copy, preferred, or null)."
             }
            }
           }
          },
          "weeks": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "week": {
              "type": "string",
              "description": "The ISO week, e.g. 2026-W42."
             },
             "start": {
              "type": "string",
              "description": "The Monday the week starts (UTC)."
             },
             "headline": {
              "type": "string",
              "description": "One line on what defined the week, written from its checked entries."
             }
            }
           }
          }
         }
        }
       }
      }
     }
    },
    "description": "The Ebola living page's record: WHO Disease Outbreak News confirmed counts per country, each with WHO's own sentence, and one checked entry per day with its sources and Internet Archive copies."
   }
  },
  "/data/rejections.json": {
   "get": {
    "operationId": "get-data-rejections-json",
    "summary": "Rejections",
    "responses": {
     "200": {
      "description": "What the collection gates dropped before storage, per day and reason, over the 30 days the log keeps.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "generated_at": {
           "type": "string"
          },
          "build_id": {
           "type": "string"
          },
          "source": {
           "type": "string"
          },
          "license": {
           "type": "object"
          },
          "provenance_rule": {
           "type": "string"
          },
          "fields": {
           "type": "object"
          },
          "reasons": {
           "type": "object"
          },
          "window_days": {
           "type": "integer"
          },
          "count": {
           "type": "integer"
          },
          "days": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "date": {
              "type": "string",
              "description": "UTC day."
             },
             "counts": {
              "type": "object",
              "description": "Items dropped that day, by reason (reasons)."
             }
            }
           }
          }
         }
        }
       }
      }
     }
    },
    "description": "What the collection gates dropped before storage, per day and reason, over the 30 days the log keeps."
   }
  },
  "/briefs/index.json": {
   "get": {
    "operationId": "get-briefs-index-json",
    "summary": "Every edition",
    "responses": {
     "200": {
      "description": "Every daily edition, newest first, with links to its page, markdown, JSON, transcript and audio.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "generated_at": {
           "type": "string"
          },
          "build_id": {
           "type": "string"
          },
          "source": {
           "type": "string"
          },
          "license": {
           "type": "object"
          },
          "provenance_rule": {
           "type": "string"
          },
          "fields": {
           "type": "object"
          },
          "count": {
           "type": "integer"
          },
          "editions": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "date": {
              "type": "string",
              "description": "The edition's date (UTC)."
             },
             "issue": {
              "type": "integer",
              "description": "The date as a number: No. 81 was 2026-08-10 and each day adds one, so a missed day leaves its number unused and the series does not start at 1."
             },
             "title": {
              "type": "string",
              "description": "The lead story's headline, as the model wrote it."
             },
             "standfirst": {
              "type": "string",
              "description": "Two sentences under the title, model-written."
             },
             "pathogens": {
              "type": "array",
              "description": "Disease slugs the brief's own prose covers (collectors/keywords.py)."
             },
             "page": {
              "type": "string",
              "description": "The edition as a web page."
             },
             "markdown": {
              "type": "string",
              "description": "The edition as published, references annotated. Cite this, not latest.md."
             },
             "json": {
              "type": "string",
              "description": "This edition's metadata, with every reference as a record."
             },
             "transcript": {
              "type": [
               "null",
               "string"
              ],
              "description": "What the podcast said, or null when there is no episode."
             },
             "audio": {
              "type": [
               "null",
               "string"
              ],
              "description": "The episode's mp3, or null."
             },
             "audio_bytes": {
              "type": [
               "integer",
               "null"
              ],
              "description": "Size of the mp3, or null."
             },
             "audio_seconds": {
              "type": [
               "integer",
               "null"
              ],
              "description": "Length of the episode in seconds, or null."
             },
             "written_at": {
              "type": "string",
              "description": "When the edition file was last written (UTC)."
             }
            }
           }
          }
         }
        }
       }
      }
     }
    },
    "description": "Every daily edition, newest first, with links to its page, markdown, JSON, transcript and audio."
   }
  },
  "/briefs/latest.json": {
   "get": {
    "operationId": "get-briefs-latest-json",
    "summary": "Newest edition (metadata)",
    "responses": {
     "200": {
      "description": "The newest edition with every reference as a record. It moves every day: cite canonical_url.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "generated_at": {
           "type": "string"
          },
          "build_id": {
           "type": "string"
          },
          "source": {
           "type": "string"
          },
          "license": {
           "type": "object"
          },
          "provenance_rule": {
           "type": "string"
          },
          "fields": {
           "type": "object"
          },
          "references_fields": {
           "type": "object"
          },
          "claim_classes": {
           "type": "object"
          },
          "canonical_url": {
           "type": "string"
          },
          "date": {
           "type": "string"
          },
          "issue": {
           "type": "integer"
          },
          "title": {
           "type": "string"
          },
          "standfirst": {
           "type": "string"
          },
          "pathogens": {
           "type": "array"
          },
          "page": {
           "type": "string"
          },
          "markdown": {
           "type": "string"
          },
          "json": {
           "type": "string"
          },
          "transcript": {
           "type": "string"
          },
          "audio": {
           "type": "string"
          },
          "audio_bytes": {
           "type": "integer"
          },
          "audio_seconds": {
           "type": "integer"
          },
          "written_at": {
           "type": "string"
          },
          "references": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "n": {
              "type": "integer",
              "description": "The number the brief cites it by. Numbers have gaps: uncited sources are dropped."
             },
             "title": {
              "type": "string",
              "description": "The item's headline, as collected."
             },
             "url": {
              "type": "string",
              "description": "The item."
             },
             "source": {
              "type": "string",
              "description": "The registry outlet id it was collected through."
             },
             "publisher": {
              "type": "string",
              "description": "Who published it: the outlet's name, or for a news-search hit the result's own publisher (null when the search gave none)."
             },
             "via": {
              "type": "string",
              "description": "The registry outlet it reached the archive through, by name. Equal to publisher for an outlet's own feed; \"News search (Bing News)\" for a search hit."
             },
             "claim_class": {
              "type": "string",
              "description": "What kind of outlet published it (claim_classes), from the registry. null for an outlet no longer in the registry."
             }
            }
           }
          }
         }
        }
       }
      }
     }
    },
    "description": "The newest edition with every reference as a record. It moves every day: cite canonical_url."
   }
  },
  "/briefs/latest.md": {
   "get": {
    "operationId": "get-briefs-latest-md",
    "summary": "Newest brief",
    "responses": {
     "200": {
      "description": "The newest edition, references annotated. It moves every day: cite /briefs/{date}.md.",
      "content": {
       "text/markdown": {
        "schema": {
         "type": "string"
        }
       }
      }
     }
    },
    "description": "The newest edition, references annotated. It moves every day: cite /briefs/{date}.md."
   }
  },
  "/briefs/{date}.md": {
   "get": {
    "operationId": "get-briefs-date-md",
    "summary": "One edition",
    "responses": {
     "200": {
      "description": "An edition as published, frontmatter included, every reference ending in its claim_class and via.",
      "content": {
       "text/markdown": {
        "schema": {
         "type": "string"
        }
       }
      }
     }
    },
    "description": "An edition as published, frontmatter included, every reference ending in its claim_class and via.",
    "parameters": [
     {
      "name": "date",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ]
   }
  },
  "/briefs/{date}.json": {
   "get": {
    "operationId": "get-briefs-date-json",
    "summary": "One edition (metadata)",
    "responses": {
     "200": {
      "description": "An edition's metadata, with every reference as a record: n, title, url, source, publisher, via, claim_class.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "generated_at": {
           "type": "string"
          },
          "build_id": {
           "type": "string"
          },
          "source": {
           "type": "string"
          },
          "license": {
           "type": "object"
          },
          "provenance_rule": {
           "type": "string"
          },
          "fields": {
           "type": "object"
          },
          "references_fields": {
           "type": "object"
          },
          "claim_classes": {
           "type": "object"
          },
          "canonical_url": {
           "type": "string"
          },
          "date": {
           "type": "string"
          },
          "issue": {
           "type": "integer"
          },
          "title": {
           "type": "string"
          },
          "standfirst": {
           "type": "string"
          },
          "pathogens": {
           "type": "array"
          },
          "page": {
           "type": "string"
          },
          "markdown": {
           "type": "string"
          },
          "json": {
           "type": "string"
          },
          "transcript": {
           "type": "string"
          },
          "audio": {
           "type": "string"
          },
          "audio_bytes": {
           "type": "integer"
          },
          "audio_seconds": {
           "type": "integer"
          },
          "written_at": {
           "type": "string"
          },
          "references": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "n": {
              "type": "integer",
              "description": "The number the brief cites it by. Numbers have gaps: uncited sources are dropped."
             },
             "title": {
              "type": "string",
              "description": "The item's headline, as collected."
             },
             "url": {
              "type": "string",
              "description": "The item."
             },
             "source": {
              "type": "string",
              "description": "The registry outlet id it was collected through."
             },
             "publisher": {
              "type": "string",
              "description": "Who published it: the outlet's name, or for a news-search hit the result's own publisher (null when the search gave none)."
             },
             "via": {
              "type": "string",
              "description": "The registry outlet it reached the archive through, by name. Equal to publisher for an outlet's own feed; \"News search (Bing News)\" for a search hit."
             },
             "claim_class": {
              "type": "string",
              "description": "What kind of outlet published it (claim_classes), from the registry. null for an outlet no longer in the registry."
             }
            }
           }
          }
         }
        }
       }
      }
     }
    },
    "description": "An edition's metadata, with every reference as a record: n, title, url, source, publisher, via, claim_class.",
    "parameters": [
     {
      "name": "date",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ]
   }
  },
  "/briefs.xml": {
   "get": {
    "operationId": "get-briefs-xml",
    "summary": "Pathogen X (briefs feed)",
    "responses": {
     "200": {
      "description": "RSS 2.0, the newest 30 editions in full (content:encoded).",
      "content": {
       "application/rss+xml": {
        "schema": {
         "type": "string"
        }
       }
      }
     }
    },
    "description": "RSS 2.0, the newest 30 editions in full (content:encoded)."
   }
  },
  "/podcast.xml": {
   "get": {
    "operationId": "get-podcast-xml",
    "summary": "Pathogen X (podcast feed)",
    "responses": {
     "200": {
      "description": "The podcast: RSS 2.0 with mp3 enclosures, transcripts, show notes with sources, and the iTunes and Podcasting 2.0 tags.",
      "content": {
       "application/rss+xml": {
        "schema": {
         "type": "string"
        }
       }
      }
     }
    },
    "description": "The podcast: RSS 2.0 with mp3 enclosures, transcripts, show notes with sources, and the iTunes and Podcasting 2.0 tags."
   }
  },
  "/feed.xml": {
   "get": {
    "operationId": "get-feed-xml",
    "summary": "Pathogen X (briefs feed, alternate address)",
    "responses": {
     "200": {
      "description": "The same bytes as /briefs.xml, for readers that look for a feed at /feed.xml.",
      "content": {
       "application/rss+xml": {
        "schema": {
         "type": "string"
        }
       }
      }
     }
    },
    "description": "The same bytes as /briefs.xml, for readers that look for a feed at /feed.xml."
   }
  }
 }
}
