483 Risk Scores
Retrieve facility risk scores computed from FDA 483 inspection data. Each score is a composite [0, 100] value combining weighted classification ratios, citation frequency, recency decay, severity, and peer benchmarking.
Tier Access
Required Tier: Pro+ (Pro, Enterprise)
Rate limits apply per tier — see Rate Limits for details.
Risk Score Methodology (v2.0):
- oai_ratio (40%) — Weighted classification ratio (OAI=1.0, VAI=0.5, NAI=0.1)
- citation_frequency (25%) — Citations per year normalized
- recency (15%) — Exponential decay (half-life = 2 years)
- severity (10%) — Weighted CFR violation severity
- peer_benchmark (10%) — Comparison to product-type peer group average
Risk Levels: low (<25), medium (25-50), high (50-75), critical (≥75)
GET /v1/483/risk-scores/{fei_number}
Get risk score detail with full factor breakdown for a specific facility.
Request
GET https://api.ctwise.ai/v1/483/risk-scores/3005012345
X-Api-Key: YOUR_API_KEY
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
fei_number | string | Yes | FDA Establishment Identifier (FEI) |
Response
{
"fei_number": "3005012345",
"risk_score": 42.5,
"risk_level": "medium",
"methodology_version": "v2.0",
"factors": {
"oai_ratio": 16.0,
"citation_frequency": 8.5,
"recency": 9.0,
"severity": 4.5,
"peer_benchmark": 4.5
},
"methodology": "Composite score [0,100] = oai_ratio(40%) + citation_frequency(25%) + recency(15%) + severity(10%) + peer_benchmark(10%). Risk levels: low (<25), medium (25-50), high (50-75), critical (>=75).",
"factor_descriptions": {
"oai_ratio": "Weighted classification ratio (OAI=1.0, VAI=0.5, NAI=0.1)",
"citation_frequency": "Citation frequency normalized by years of inspection history",
"recency": "Exponential recency decay (half-life = 2 years)",
"severity": "Weighted severity of CFR violations cited",
"peer_benchmark": "Comparison to product-type peer group average"
},
"query_metadata": {
"execution_time_ms": 85
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
fei_number | string | FDA Establishment Identifier |
risk_score | number | Composite risk score (0-100) |
risk_level | string | Risk level: low, medium, high, critical |
methodology_version | string | Algorithm version (currently v2.0) |
factors | object | Score contribution from each factor |
factors.oai_ratio | number | OAI ratio contribution (max 40) |
factors.citation_frequency | number | Citation frequency contribution (max 25) |
factors.recency | number | Recency contribution (max 15) |
factors.severity | number | Severity contribution (max 10) |
factors.peer_benchmark | number | Peer benchmark contribution (max 10) |
methodology | string | Full methodology description |
factor_descriptions | object | Human-readable factor descriptions |
GET /v1/483/risk-scores
List all facility risk scores with filtering and pagination.
Request
GET https://api.ctwise.ai/v1/483/risk-scores?risk_level=high&limit=10&sort_order=desc
X-Api-Key: YOUR_API_KEY
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | No | Results per page (default: 20, max: 100) |
offset | integer | No | Pagination offset (default: 0) |
risk_level | string | No | Filter: low, medium, high, critical |
min_score | number | No | Minimum risk score filter |
max_score | number | No | Maximum risk score filter |
sort_order | string | No | Sort by risk_score: asc or desc (default: desc) |
Response
{
"results": [
{
"fei_number": "3002808316",
"risk_score": 68.2,
"risk_level": "high",
"factors": {
"oai_ratio": 28.0,
"citation_frequency": 15.0,
"recency": 12.5,
"severity": 7.2,
"peer_benchmark": 5.5
}
}
],
"total": 8145,
"offset": 0,
"limit": 10,
"methodology": "Composite score [0,100] = oai_ratio(40%) + citation_frequency(25%) + recency(15%) + severity(10%) + peer_benchmark(10%).",
"query_metadata": {
"execution_time_ms": 92
}
}
Examples
Get High-Risk Facilities
curl -X GET "https://api.ctwise.ai/v1/483/risk-scores?risk_level=high&limit=10" \
-H "X-Api-Key: YOUR_API_KEY"
Python Example
import requests
API_KEY = "your_api_key"
BASE_URL = "https://api.ctwise.ai/v1"
# Get risk score for a specific facility
response = requests.get(
f"{BASE_URL}/483/risk-scores/3005012345",
headers={"X-Api-Key": API_KEY}
)
score = response.json()
print(f"Risk Score: {score['risk_score']}/100 ({score['risk_level'].upper()})")
print(f"Methodology: {score['methodology_version']}")
print("\nFactor Breakdown:")
for factor, value in score['factors'].items():
desc = score['factor_descriptions'].get(factor, '')
print(f" {factor}: {value:.1f} - {desc}")
JavaScript Example
const API_KEY = 'your_api_key';
const BASE_URL = 'https://api.ctwise.ai/v1';
// Get high-risk facilities
const response = await fetch(
`${BASE_URL}/483/risk-scores?risk_level=high&sort_order=desc&limit=10`,
{ headers: { 'X-Api-Key': API_KEY } }
);
const data = await response.json();
console.log(`Found ${data.total} high-risk facilities`);
data.results.forEach(facility => {
console.log(`FEI ${facility.fei_number}: ${facility.risk_score}/100 (${facility.risk_level})`);
});
Error Responses
Risk Score Not Found
{
"error": "Risk score not found for FEI: 9999999999",
"status_code": 404
}
Status: 404 Not Found
Invalid Parameters
{
"error": "Invalid risk_level. Allowed values: low, medium, high, critical",
"status_code": 400
}
Status: 400 Bad Request
Performance
| Metric | Target |
|---|---|
| Response time | < 2 seconds |
| Data freshness | Updated with each pipeline run |
| Timeout | 30 seconds |
Related Endpoints
- POST /v1/483/observations/search - Search observations
- GET /v1/483/facilities/{fei_number} - Facility inspection history
- GET /v1/483/analytics/benchmarks - Industry benchmarks