RxCheck API documentation

Resolve medication inputs and query a versioned interaction dataset through predictable JSON. Start with the live request below.

Quickstart

  1. Create a free API key—no card required.
  2. Export it as a server-side secret; never ship it in client code.
  3. Run this request and branch on result_status.
cURL
curl -H "X-API-Key: YOUR_API_KEY" \
  "https://api.rxcheck.dev/v1/interactions?drug1=warfarin&drug2=aspirin"
Run it in the live playground →

Authentication

Send X-API-Key: YOUR_API_KEY. Keep keys in environment variables or a secrets manager. Query-string keys remain accepted for compatibility but can leak through logs and browser history and should not be used.

Endpoint reference

Each example omits clinical field values unless returned by the active dataset. Add X-API-Key to authenticated requests.

GET/v1/interactions
Auth/limit
Optional for anonymous demo; key for metered use
Input
drug1, drug2, optional format=full|minimal|clinical
Returns
Resolution details, explicit result_status, interaction record or no-record disclaimer, dataset release, usage metadata.
Errors
400 unresolved input; 429 quota; 503 terminology dependency.
Request shape
GET /v1/interactions?drug1=warfarin&drug2=aspirin
Response shape
{ "result_status": "interaction_found | no_record_found", "interaction": { "found": true }, "dataset_release": "…" }
POST/v1/interactions/batch
Auth/limit
Starter+ or Pay as you go; maximum 10/50/200 pairs by paid tier (50 on Pay as you go)
Input
JSON { "pairs": [{ "drug1": "…", "drug2": "…" }] }
Returns
One result per unique pair plus evaluated_pairs. Tier batch-size limits apply.
Errors
400 oversized/duplicate/self pair; 401 missing key; 403 tier restriction; 429 quota.
Request shape
POST /v1/interactions/batch
{ "pairs": [{ "drug1": "warfarin", "drug2": "aspirin" }] }
Response shape
{ "results": [{ "result_status": "…", "interaction": { "found": true } }], "evaluated_pairs": 1 }
GET/v1/interactions/polypharmacy
Auth/limit
Growth+ or Pay as you go; 2–10 unique drugs
Input
drugs as one comma-separated query value
Returns
All evaluated n-choose-2 pairs and aggregate summary fields.
Errors
401 missing key; 403 tier restriction; 422 invalid/duplicate list; 429 quota.
Request shape
GET /v1/interactions/polypharmacy?drugs=warfarin,aspirin,ibuprofen
Response shape
{ "results": ["<one result per pair>"], "summary": { "total_pairs": 3 } }
GET/v1/drugs/search
Auth/limit
None; 60 requests/minute per IP
Input
q, at least 2 characters
Returns
Resolved candidates with RxCUI, generic name, brand names, and class when available.
Errors
422 invalid query; 429 rate limit; empty results when no supported candidate matches.
Request shape
GET /v1/drugs/search?q=warfarin
Response shape
{ "results": [{ "name": "<resolved name>", "rxcui": "<identifier>", "brand_names": [] }] }
GET/v1/drugs/{rxcui}/interactions
Auth/limit
API key; paginated
Input
RxCUI path value; optional severity, limit, and offset
Returns
Paginated stored records for the resolved concept.
Errors
400 invalid identifier/filter; 401 missing key; 429 quota.
Request shape
GET /v1/drugs/11289/interactions?severity=major&limit=20&offset=0
Response shape
{ "results": ["<stored interaction records>"], "total": 0, "limit": 20, "offset": 0 }

Response semantics

interaction_found means RxCheck returned a stored record. no_record_found means the active dataset has no matching record; it never means “safe” or “no interaction exists.” Dataset values vary and the example placeholders below deliberately avoid inventing clinical content.

Example response shape
{
  "status": "success",
  "result_status": "interaction_found",
  "dataset_release": "<current release>",
  "query": {
    "drug1": { "input": "warfarin", "resolved_name": "warfarin", "rxcui": "11289" },
    "drug2": { "input": "aspirin", "resolved_name": "aspirin", "rxcui": "1191" }
  },
  "interaction": {
    "found": true,
    "severity": "<dataset value>",
    "sources": ["<documented source>"]
  },
  "meta": { "response_time_ms": 18, "queries_used": 1, "queries_remaining": 99 }
}

Language examples

Python
import requests

response = requests.get(
    "https://api.rxcheck.dev/v1/interactions",
    params={"drug1": "warfarin", "drug2": "aspirin"},
    headers={"X-API-Key": "YOUR_API_KEY"},
    timeout=10,
)
response.raise_for_status()
result = response.json()
print(result["result_status"], result["interaction"].get("severity"))
JavaScript
const params = new URLSearchParams({ drug1: 'warfarin', drug2: 'aspirin' });
const response = await fetch(
  `https://api.rxcheck.dev/v1/interactions?${params}`,
  { headers: { 'X-API-Key': 'YOUR_API_KEY' } },
);
if (!response.ok) throw new Error(`RxCheck HTTP ${response.status}`);
const result = await response.json();
console.log(result.result_status, result.interaction.severity);
TypeScript types
type ResultStatus = 'interaction_found' | 'no_record_found';
interface RxCheckResult {
  status: string;
  result_status: ResultStatus;
  dataset_release: string;
  interaction: { found: boolean; severity?: string; disclaimer?: string };
  meta: { response_time_ms: number; queries_used: number; queries_remaining: number };
}

const result = (await response.json()) as RxCheckResult;

Errors and retries

HTTPCodeAction
400drug_not_resolved / invalid_requestCorrect the input; do not retry unchanged.
401api_key_required / invalid_api_keySupply an active key in X-API-Key.
403tier_restrictionUse an endpoint included in the current plan.
422validation errorCorrect field shape, length, or duplicates.
429rate_limit_exceeded / monthly_limit_exceededBack off for burst limits; monthly exhaustion resets on the key schedule.
503dependency_unavailableRetry with exponential backoff and jitter.
500internal_errorRetry safely; retain the request ID when contacting support.

Limits and metering

Free includes 100 evaluated pairs/month; Starter 5,000; Growth 50,000; Scale 500,000. Pay as you go has no monthly limit: a $20/month minimum covers the first 5,000 evaluated pairs, then $3.80 per 1,000, billed in arrears. Per-minute burst limits still apply to every plan, and its responses omit the monthly limit and remaining headers. Batch requests are metered by evaluated pair, not HTTP request. Read X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset where returned. Current pricing and endpoint entitlements are on the pricing page.

Common mistakes

  • Treating a no-record result as proof of safety.
  • Logging API keys or medication inputs unnecessarily.
  • Sending duplicate or self-pairs in batch requests.
  • Retrying validation failures instead of correcting the request.
  • Calling authenticated endpoints directly from a public browser bundle.