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
Search
| Method | Endpoint | Description |
|---|---|---|
POST | /semantic-search | AI-powered semantic search across regulatory rules |
Rules
| Method | Endpoint | Description |
|---|---|---|
GET | /rules | List regulatory rules with filtering |
POST | /rules | Search rules with advanced query options |
Catalog
| Method | Endpoint | Description |
|---|---|---|
GET | /catalog/sources | List available data sources with summary stats |
483 Inspection Intelligence
Observations
| Method | Endpoint | Description |
|---|---|---|
POST | /483/observations/search | Semantic search across FDA 483 observations |
GET | /483/observations | List observations with filtering |
Facilities
| Method | Endpoint | Description |
|---|---|---|
GET | /483/facilities | List facilities with filtering |
GET | /483/facilities/{fei_number} | Facility detail with risk assessment |
GET | /483/facilities/{fei_number}/citations | Citations for a specific facility |
Risk Scores
| Method | Endpoint | Description |
|---|---|---|
GET | /483/risk-scores | List facility risk scores with filtering |
GET | /483/risk-scores/{fei_number} | Detailed risk score with factor breakdown |
CFR References & Analytics
| Method | Endpoint | Description |
|---|---|---|
GET | /483/cfr-references | List CFR references with occurrence counts |
GET | /483/cfr-references/{cfr} | CFR detail with cross-references to regulatory rules |
GET | /483/analytics/summary | Aggregate analytics across all 483 datasets |
GET | /483/analytics/benchmarks | Industry benchmarking by product type, state, or program area |
Planned (Future Sprints)
| Method | Endpoint | Description |
|---|---|---|
GET | /483/citations/trending | Trending CFR citations analysis |
POST | /483/observations/regulatory-mapping | Map observations to regulatory rules |
GET | /483/investigators/{id}/profile | Investigator profile and patterns |
Health
| Method | Endpoint | Description |
|---|---|---|
GET | /health | API 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:
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 20 | Results per page (max 100) |
offset | integer | 0 | Results 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
| Status | Description |
|---|---|
200 | Success |
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Invalid or missing API key |
403 | Forbidden - Insufficient tier access |
404 | Not Found - Resource doesn't exist |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error |
503 | Service Unavailable |
Rate Limiting
Rate limits are enforced per API key:
| Tier | Limit |
|---|---|
| Free | 2 requests/second |
| Starter | 10 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:
- Python SDK
- JavaScript/TypeScript SDK
- Java SDK (Coming Soon)
- C# SDK (Coming Soon)