Skip to main content

API Reference

Complete reference for the CTWiseAPI endpoints.

Base URL

https://api.ctwise.ai/v1

Authentication

All requests require an API key in the X-Api-Key header:

X-Api-Key: YOUR_API_KEY

See Authentication for details.

Content Type

All requests and responses use JSON:

Content-Type: application/json

Endpoints

MethodEndpointDescription
POST/semantic-searchAI-powered semantic search across regulatory rules

Rules

MethodEndpointDescription
GET/rulesList regulatory rules with filtering
POST/rulesSearch rules with advanced query options

Catalog

MethodEndpointDescription
GET/catalog/sourcesList available data sources with summary stats

483 Inspection Intelligence

Observations

MethodEndpointDescription
POST/483/observations/searchSemantic search across FDA 483 observations
GET/483/observationsList observations with filtering

Facilities

MethodEndpointDescription
GET/483/facilitiesList facilities with filtering
GET/483/facilities/{fei_number}Facility detail with risk assessment
GET/483/facilities/{fei_number}/citationsCitations for a specific facility

Risk Scores

MethodEndpointDescription
GET/483/risk-scoresList facility risk scores with filtering
GET/483/risk-scores/{fei_number}Detailed risk score with factor breakdown

CFR References & Analytics

MethodEndpointDescription
GET/483/cfr-referencesList CFR references with occurrence counts
GET/483/cfr-references/{cfr}CFR detail with cross-references to regulatory rules
GET/483/analytics/summaryAggregate analytics across all 483 datasets
GET/483/analytics/benchmarksIndustry benchmarking by product type, state, or program area

Planned (Future Sprints)

MethodEndpointDescription
GET/483/citations/trendingTrending CFR citations analysis
POST/483/observations/regulatory-mappingMap observations to regulatory rules
GET/483/investigators/{id}/profileInvestigator profile and patterns

Health

MethodEndpointDescription
GET/healthAPI health check (no auth required)

Request Format

Query Parameters

GET /rules?source=FDA&limit=10&offset=0

Request Body (POST)

{
"query": "informed consent",
"sources": ["FDA", "ICH"],
"limit": 10,
"filters": {
"documentType": "Guidance"
}
}

Response Format

Success Response

{
"data": {
// Response data
},
"meta": {
"requestId": "req_abc123",
"processingTimeMs": 245
}
}

Error Response

{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message",
"details": {}
},
"meta": {
"requestId": "req_abc123"
}
}

Pagination

List endpoints support pagination:

ParameterTypeDefaultDescription
limitinteger20Results per page (max 100)
offsetinteger0Results to skip
GET /rules?limit=20&offset=40

Response includes pagination info:

{
"data": [...],
"pagination": {
"limit": 20,
"offset": 40,
"total": 247,
"hasMore": true
}
}

HTTP Status Codes

StatusDescription
200Success
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
403Forbidden - Insufficient tier access
404Not Found - Resource doesn't exist
429Too Many Requests - Rate limit exceeded
500Internal Server Error
503Service Unavailable

Rate Limiting

Rate limits are enforced per API key:

TierLimit
Free2 requests/second
Starter10 requests/second

Rate limit headers:

X-RateLimit-Limit: 10
X-RateLimit-Remaining: 8
X-RateLimit-Reset: 1704067200

Versioning

The API is versioned via URL path:

https://api.ctwise.ai/v1/search

Current version: v1

We maintain backward compatibility within major versions. Breaking changes require a new major version.

SDKs

Official client libraries: