API introduction
Pull prevalence rollups, reports, and exports directly into your own systems.
The PrevIQ API is a read-focused REST API that exposes everything the web app shows — prevalence rollups, reports, exports, and contextual data — as JSON. Use it to automate exports or feed PrevIQ data into your own dashboards and pipelines.
Base URL
All endpoints are served under the /api/v1 prefix:
Production (example)
https://api.previq.ospri.bio/api/v1
Local development
http://localhost:8000/api/v1
Note
Your exact API host is provided by OSPRI. The web app reads it from a configured base URL; for direct API use, substitute your host below.
Interactive API explorer
The service ships with built-in interactive documentation generated from the live schema:
| Path | What it is |
|---|---|
/docs |
Swagger UI — try requests in the browser. |
/redoc |
ReDoc — clean reference rendering. |
/openapi.json |
The raw OpenAPI specification. |
Tip
/docsis the fastest way to experiment — it always reflects the exact version you're calling.
Quick example
cURL
curl "https://api.previq.ospri.bio/api/v1/prevalence?syndrome=UTI&min_tested=100&limit=5"
Python
import httpx
base = "https://api.previq.ospri.bio/api/v1"
r = httpx.get(f"{base}/prevalence", params={"syndrome": "UTI", "min_tested": 100, "limit": 5})
r.raise_for_status()
for row in r.json()["data"]:
print(row["organism"], row["prevalence_rate"], row["sample_size_tier"])
JavaScript
const base = "https://api.previq.ospri.bio/api/v1";
const url = new URL(`${base}/prevalence`);
url.search = new URLSearchParams({ syndrome: "UTI", min_tested: "100", limit: "5" });
const res = await fetch(url);
const { data } = await res.json();
console.log(data);
What you can do
- Catalog — List syndromes, vendors, organisms, panels; health check.
- Prevalence — Query, summarize, and compare prevalence rollups.
- Reports — Generate client summaries, panel recommendations, cross-client pivots.
- Export — Download filtered rollups as CSV, Excel, or JSON.
- Geo & external — Vendor geography and CDC RESP-NET context.
- Ingestion — Inspect load history and database stats.
Conventions
- HTTP: only
GETandPOSTare used; all reads areGET. - Envelopes: list endpoints return
{ data, meta }. See Envelopes & errors. - Rates:
prevalence_rate,ci_lower,ci_upperare fractions (e.g.0.152= 15.2%). - Dates: ISO 8601 strings.