Live API

Healthcare Data API

Access 8M+ healthcare providers, comprehensive drug data, ICD-10 diagnosis codes, hospital quality and performance data across 8 categories, and clinical trial information through one unified REST API. Built on authoritative federal data sources including NPPES, openFDA, RxNorm, NLM Clinical Tables, CMS Provider Data Catalog, and ClinicalTrials.gov.

8M+Providers
20Endpoints
8Data Sources
<200msAvg Response

Authentication

All API requests can be made without authentication for testing. For production use, include your API key to track credits and access higher rate limits.

1
Create an Account

Sign up at cognizantcloud.com/account. New accounts receive 50 free credits to get started.

2
Generate an API Key

Go to cognizantcloud.com/api-keys to create and manage your API keys. You can generate multiple keys for different projects.

3
Include the Key in Requests

Pass your API key in the x-api-key header with every request.

x-api-key: your_api_key_here

Test Your Key

bash
curl -H "x-api-key: YOUR_API_KEY" \
  "https://cognizantcloud.com/api/v1/?endpoint=provider/search&last_name=smith&state=NY&limit=1"
javascript
const response = await fetch(
  "https://cognizantcloud.com/api/v1/?endpoint=provider/search&last_name=smith&state=NY&limit=1",
  { headers: { "x-api-key": "YOUR_API_KEY" } }
);
const data = await response.json();
console.log("Credits remaining:", response.headers.get("X-Credits-Remaining"));
console.log(data);
python
import requests

response = requests.get(
    "https://cognizantcloud.com/api/v1/",
    headers={"x-api-key": "YOUR_API_KEY"},
    params={"endpoint": "provider/search", "last_name": "smith", "state": "NY", "limit": 1}
)
print("Credits remaining:", response.headers.get("X-Credits-Remaining"))
print(response.json())

Key rotation: Generate a new key before revoking the old one. Update your application to use the new key, verify it works, then revoke the old key from the API Keys dashboard. Never share keys in client-side code or public repositories.

Quick Start

Make your first API call in seconds. No API key required for testing.

bash
# Search for providers named Smith in New York
curl "https://cognizantcloud.com/api/v1/?endpoint=provider/search&last_name=smith&state=NY"

# Check drug interactions for metformin
curl "https://cognizantcloud.com/api/v1/?endpoint=drug/interactions&drug=metformin"

# Look up ICD-10 codes for diabetes
curl "https://cognizantcloud.com/api/v1/?endpoint=diagnosis/icd10&query=diabetes"
javascript
// Search for providers named Smith in New York
const response = await fetch(
  "https://cognizantcloud.com/api/v1/?endpoint=provider/search&last_name=smith&state=NY"
);
const data = await response.json();
console.log(data.data.result_count, "providers found");
python
import requests

# Search for providers named Smith in New York
response = requests.get(
    "https://cognizantcloud.com/api/v1/",
    params={"endpoint": "provider/search", "last_name": "smith", "state": "NY"}
)
data = response.json()
print(f"{data['data']['result_count']} providers found")

The API returns JSON with provider data, response time, and credit usage. All endpoints accept GET with query parameters or POST with a JSON body.

Base URL

Base URL https://cognizantcloud.com/api/v1/

All endpoints use query parameters. Pass the endpoint parameter to select a data source, then add endpoint-specific parameters. The API accepts both GET and POST methods. For POST requests, send parameters as a JSON body.

Response Headers

Every response includes these custom headers for monitoring and debugging:

HeaderDescription
X-AuthAuthentication status: authenticated or anonymous
X-Credits-UsedNumber of credits consumed by this request
X-Credits-RemainingCredits remaining on your account (authenticated only)
X-Response-TimeServer-side processing time in milliseconds
X-EndpointThe endpoint that was called
X-Rate-LimitYour per-key rate limit (authenticated only)
X-Powered-ByAlways returns Cognizant Cloud API v1

Drug Endpoints

GETdrug/interactions Get drug-drug interaction data via RxNorm. Resolves drug name to RxCUI, then retrieves all known interactions. 2 credits

Parameters

ParameterTypeDescription
drug requiredstringDrug name, brand or generic (e.g., "metformin", "Lipitor")

Code Examples

bash
curl -H "x-api-key: YOUR_API_KEY" \
  "https://cognizantcloud.com/api/v1/?endpoint=drug/interactions&drug=metformin"
javascript
const response = await fetch(
  "https://cognizantcloud.com/api/v1/?endpoint=drug/interactions&drug=metformin",
  { headers: { "x-api-key": "YOUR_API_KEY" } }
);
const { data } = await response.json();
console.log("RxCUI:", data.rxcui);
console.log("Interactions:", data.interactions);
python
import requests

response = requests.get(
    "https://cognizantcloud.com/api/v1/",
    headers={"x-api-key": "YOUR_API_KEY"},
    params={"endpoint": "drug/interactions", "drug": "metformin"}
)
data = response.json()["data"]
print(f"RxCUI: {data['rxcui']}")
print(f"Found {len(data.get('interactions', {}))} interaction groups")

Example Response

json
{
  "endpoint": "drug/interactions",
  "credits_used": 2,
  "auth": "authenticated",
  "response_time_ms": 234,
  "data": {
    "rxcui": "6809",
    "drug": "metformin",
    "interactions": {
      "interactionTypeGroup": [
        {
          "sourceName": "DrugBank",
          "interactionType": [
            {
              "interactionPair": [
                {
                  "interactionConcept": [
                    { "minConceptItem": { "rxcui": "6809", "name": "metformin" } },
                    { "minConceptItem": { "rxcui": "4815", "name": "insulin" } }
                  ],
                  "severity": "N/A",
                  "description": "Metformin may enhance the hypoglycemic effect of Insulin."
                }
              ]
            }
          ]
        }
      ]
    }
  }
}
FieldTypeDescription
data.rxcuistringRxNorm Concept Unique Identifier for the drug
data.drugstringThe drug name you searched for
data.interactionsobjectFull interaction data from RxNorm API
interactions.interactionTypeGroup[]arrayGrouped by source (DrugBank, ONCHigh)
interactionType[].interactionPair[]arrayEach interacting drug pair
interactionPair[].descriptionstringClinical description of the interaction
interactionPair[].severitystringSeverity level (varies by source)
Try It
Live
Response
Fill in parameters and click Send Request
GETdrug/label Retrieve FDA-approved drug labeling from openFDA, including indications, warnings, dosage, and contraindications 1 credit

Parameters

ParameterTypeDescription
drug requiredstringDrug brand name (e.g., "lisinopril", "Tylenol")
limit optionalintegerMax results (default: 1). Increase if a brand has multiple formulations.

Code Examples

bash
curl -H "x-api-key: YOUR_API_KEY" \
  "https://cognizantcloud.com/api/v1/?endpoint=drug/label&drug=lisinopril"
javascript
const response = await fetch(
  "https://cognizantcloud.com/api/v1/?endpoint=drug/label&drug=lisinopril",
  { headers: { "x-api-key": "YOUR_API_KEY" } }
);
const { data } = await response.json();
const label = data.results[0];
console.log("Indications:", label.indications_and_usage);
console.log("Warnings:", label.warnings);
python
import requests

response = requests.get(
    "https://cognizantcloud.com/api/v1/",
    headers={"x-api-key": "YOUR_API_KEY"},
    params={"endpoint": "drug/label", "drug": "lisinopril"}
)
label = response.json()["data"]["results"][0]
print("Indications:", label.get("indications_and_usage", ["N/A"])[0][:200])
FieldTypeDescription
data.results[]arrayArray of drug label records from openFDA
results[].indications_and_usagestring[]FDA-approved indications
results[].dosage_and_administrationstring[]Dosing information
results[].warningsstring[]Safety warnings
results[].adverse_reactionsstring[]Known adverse reactions
results[].contraindicationsstring[]Conditions where drug should not be used
results[].drug_interactionsstring[]Known drug-drug interactions from label
results[].openfda.brand_namestring[]Brand names
results[].openfda.generic_namestring[]Generic names
results[].openfda.manufacturer_namestring[]Manufacturer names
Try It
Live
Response
Fill in parameters and click Send Request
GETdrug/adverse-events Search the FDA Adverse Event Reporting System (FAERS) for adverse event reports 2 credits

Parameters

ParameterTypeDescription
drug requiredstringDrug name (brand or generic)
limit optionalintegerMax results (default: 10, max: 100)

Code Examples

bash
curl -H "x-api-key: YOUR_API_KEY" \
  "https://cognizantcloud.com/api/v1/?endpoint=drug/adverse-events&drug=atorvastatin&limit=5"
javascript
const response = await fetch(
  "https://cognizantcloud.com/api/v1/?endpoint=drug/adverse-events&drug=atorvastatin&limit=5",
  { headers: { "x-api-key": "YOUR_API_KEY" } }
);
const { data } = await response.json();
for (const event of data.results) {
  const reactions = event.patient.reaction.map(r => r.reactionmeddrapt);
  console.log("Reactions:", reactions.join(", "));
}
python
import requests

response = requests.get(
    "https://cognizantcloud.com/api/v1/",
    headers={"x-api-key": "YOUR_API_KEY"},
    params={"endpoint": "drug/adverse-events", "drug": "atorvastatin", "limit": 5}
)
for event in response.json()["data"]["results"]:
    reactions = [r["reactionmeddrapt"] for r in event["patient"]["reaction"]]
    print("Reactions:", ", ".join(reactions))
FieldTypeDescription
data.results[]arrayFAERS adverse event reports
results[].safetyreportidstringUnique FAERS report identifier
results[].seriousstring"1" if the event was serious
results[].patient.reaction[]arrayReported adverse reactions
reaction[].reactionmeddraptstringMedDRA preferred term for the reaction
results[].patient.drug[]arrayDrugs the patient was taking
drug[].medicinalproductstringDrug name as reported
drug[].drugcharacterizationstring"1"=suspect, "2"=concomitant, "3"=interacting
Try It
Live
Response
Fill in parameters and click Send Request
GETdrug/recalls Search FDA drug recall enforcement reports by drug name or free text 1 credit

Parameters

ParameterTypeDescription
drug optionalstringDrug name to filter recalls. Searches both reason_for_recall and brand_name.
search optionalstringFree-text search across recall records (alternative to drug filter)
limit optionalintegerMax results (default: 10, max: 100)

Code Examples

bash
# Search recalls by drug name
curl -H "x-api-key: YOUR_API_KEY" \
  "https://cognizantcloud.com/api/v1/?endpoint=drug/recalls&drug=metformin&limit=3"

# Search recalls by text (contamination, mislabeling, etc.)
curl -H "x-api-key: YOUR_API_KEY" \
  "https://cognizantcloud.com/api/v1/?endpoint=drug/recalls&search=contamination&limit=5"
javascript
const response = await fetch(
  "https://cognizantcloud.com/api/v1/?endpoint=drug/recalls&drug=metformin&limit=3",
  { headers: { "x-api-key": "YOUR_API_KEY" } }
);
const { data } = await response.json();
for (const recall of data.results) {
  console.log(`[${recall.classification}] ${recall.reason_for_recall}`);
}
python
import requests

response = requests.get(
    "https://cognizantcloud.com/api/v1/",
    headers={"x-api-key": "YOUR_API_KEY"},
    params={"endpoint": "drug/recalls", "drug": "metformin", "limit": 3}
)
for recall in response.json()["data"]["results"]:
    print(f"[{recall['classification']}] {recall['reason_for_recall'][:100]}")
FieldTypeDescription
data.results[]arrayFDA enforcement/recall records
results[].recall_numberstringFDA recall number (e.g., D-1234-2026)
results[].classificationstringClass I (most serious), Class II, Class III
results[].reason_for_recallstringDescription of why the product was recalled
results[].statusstringOngoing, Completed, Terminated
results[].product_descriptionstringDescription of the recalled product
results[].recalling_firmstringCompany initiating the recall
results[].voluntary_mandatedstringWhether recall was voluntary or mandated
Try It
Live
Response
Fill in parameters and click Send Request
GETdrug/ndc Look up drugs by National Drug Code or brand name via the openFDA NDC directory 1 credit

Parameters

ParameterTypeDescription
ndc optionalstringNational Drug Code (e.g., "0069-1520-30"). Provide either ndc or drug.
drug optionalstringDrug brand name to search for
limit optionalintegerMax results (default: 10)

Code Examples

bash
# Look up by drug name
curl "https://cognizantcloud.com/api/v1/?endpoint=drug/ndc&drug=lipitor&limit=3"

# Look up by NDC code
curl "https://cognizantcloud.com/api/v1/?endpoint=drug/ndc&ndc=0069-1520-30"
javascript
const response = await fetch(
  "https://cognizantcloud.com/api/v1/?endpoint=drug/ndc&drug=lipitor&limit=3",
  { headers: { "x-api-key": "YOUR_API_KEY" } }
);
const { data } = await response.json();
for (const drug of data.results) {
  console.log(`${drug.brand_name} (${drug.product_ndc}) - ${drug.dosage_form}`);
}
python
import requests

response = requests.get(
    "https://cognizantcloud.com/api/v1/",
    headers={"x-api-key": "YOUR_API_KEY"},
    params={"endpoint": "drug/ndc", "drug": "lipitor", "limit": 3}
)
for drug in response.json()["data"]["results"]:
    print(f"{drug['brand_name']} ({drug['product_ndc']}) - {drug['dosage_form']}")
Try It
Live
Response
Fill in parameters and click Send Request
GETdrug/rxnorm Resolve drug names to RxNorm identifiers, concepts, and related clinical drug information 1 credit

Parameters

ParameterTypeDescription
drug requiredstringDrug name to look up in RxNorm (e.g., "amoxicillin")

Code Examples

bash
curl -H "x-api-key: YOUR_API_KEY" \
  "https://cognizantcloud.com/api/v1/?endpoint=drug/rxnorm&drug=amoxicillin"
javascript
const response = await fetch(
  "https://cognizantcloud.com/api/v1/?endpoint=drug/rxnorm&drug=amoxicillin",
  { headers: { "x-api-key": "YOUR_API_KEY" } }
);
const { data } = await response.json();
const concepts = data.drugGroup?.conceptGroup || [];
for (const group of concepts) {
  if (group.conceptProperties) {
    for (const drug of group.conceptProperties) {
      console.log(`${drug.name} (RxCUI: ${drug.rxcui}, TTY: ${drug.tty})`);
    }
  }
}
python
import requests

response = requests.get(
    "https://cognizantcloud.com/api/v1/",
    headers={"x-api-key": "YOUR_API_KEY"},
    params={"endpoint": "drug/rxnorm", "drug": "amoxicillin"}
)
data = response.json()["data"]
for group in data.get("drugGroup", {}).get("conceptGroup", []):
    for drug in group.get("conceptProperties", []):
        print(f"{drug['name']} (RxCUI: {drug['rxcui']}, TTY: {drug['tty']})")
FieldTypeDescription
data.drugGroup.namestringThe drug name you searched
data.drugGroup.conceptGroup[]arrayGrouped by term type (SBD, SCD, etc.)
conceptGroup[].ttystringTerm type: SBD=branded, SCD=clinical, IN=ingredient
conceptGroup[].conceptProperties[]arrayDrug concepts in this group
conceptProperties[].rxcuistringRxNorm Concept Unique Identifier
conceptProperties[].namestringFull drug name with dose and form
conceptProperties[].ttystringTerm type for this concept
Try It
Live
Response
Fill in parameters and click Send Request
GETdrug/pricing Get drug pricing data, NDC codes, packaging details, and manufacturer information 2 credits

Parameters

ParameterTypeDescription
drug optionalstringDrug brand name (e.g., "lipitor"). Provide either drug or ndc.
ndc optionalstringNational Drug Code (e.g., "0069-1520-30")
limit optionalintegerMax results (default: 10, max: 100)

Code Examples

bash
curl -H "x-api-key: YOUR_API_KEY" \
  "https://cognizantcloud.com/api/v1/?endpoint=drug/pricing&drug=lipitor&limit=3"
javascript
const response = await fetch(
  "https://cognizantcloud.com/api/v1/?endpoint=drug/pricing&drug=lipitor&limit=3",
  { headers: { "x-api-key": "YOUR_API_KEY" } }
);
const { data } = await response.json();
for (const product of data.results) {
  console.log(`${product.brand_name} by ${product.labeler_name}`);
  for (const pkg of product.packaging) {
    console.log(`  ${pkg.package_ndc}: ${pkg.description}`);
  }
}
python
import requests

response = requests.get(
    "https://cognizantcloud.com/api/v1/",
    headers={"x-api-key": "YOUR_API_KEY"},
    params={"endpoint": "drug/pricing", "drug": "lipitor", "limit": 3}
)
for product in response.json()["data"]["results"]:
    print(f"{product['brand_name']} by {product['labeler_name']}")
    for pkg in product["packaging"]:
        print(f"  {pkg['package_ndc']}: {pkg['description']}")

Example Response

json
{
  "endpoint": "drug/pricing",
  "credits_used": 2,
  "auth": "authenticated",
  "response_time_ms": 198,
  "data": {
    "query": "lipitor",
    "result_count": 3,
    "results": [
      {
        "brand_name": "LIPITOR",
        "generic_name": "Atorvastatin Calcium",
        "labeler_name": "Pfizer Laboratories",
        "product_ndc": "0071-0155",
        "product_type": "HUMAN PRESCRIPTION DRUG",
        "route": ["ORAL"],
        "dosage_form": "TABLET, FILM COATED",
        "packaging": [
          {
            "package_ndc": "0071-0155-23",
            "description": "90 TABLET, FILM COATED in 1 BOTTLE",
            "marketing_start_date": "19970101"
          }
        ],
        "active_ingredients": [
          { "name": "ATORVASTATIN CALCIUM", "strength": "10 mg" }
        ],
        "marketing_category": "NDA"
      }
    ]
  }
}
FieldTypeDescription
data.querystringThe drug name or NDC you searched
data.result_countintegerNumber of products found
data.results[]arrayDrug product records
results[].brand_namestringBrand name (uppercase)
results[].generic_namestringGeneric/chemical name
results[].labeler_namestringManufacturer or labeler
results[].product_ndcstringProduct-level NDC code
results[].product_typestringRx, OTC, etc.
results[].routestring[]Administration routes (ORAL, TOPICAL, etc.)
results[].dosage_formstringTABLET, CAPSULE, SOLUTION, etc.
results[].packaging[]arrayPackage configurations with package-level NDCs
results[].active_ingredients[]arrayActive ingredients with name and strength
results[].dea_schedulestringDEA schedule if controlled substance
results[].marketing_categorystringNDA, ANDA, OTC, etc.
Try It
Live
Response
Fill in parameters and click Send Request

Diagnosis Endpoints

GETdiagnosis/icd10 Look up ICD-10-CM diagnosis codes by keyword or partial code via the NLM Clinical Tables API 1 credit

Parameters

ParameterTypeDescription
query requiredstringSearch term: diagnosis name ("diabetes"), partial code ("E11"), or exact code ("E11.9")
limit optionalintegerMax results (default: 10, max: 100)

Code Examples

bash
# Search by diagnosis name
curl -H "x-api-key: YOUR_API_KEY" \
  "https://cognizantcloud.com/api/v1/?endpoint=diagnosis/icd10&query=diabetes&limit=5"

# Search by partial ICD-10 code
curl -H "x-api-key: YOUR_API_KEY" \
  "https://cognizantcloud.com/api/v1/?endpoint=diagnosis/icd10&query=E11&limit=10"
javascript
const response = await fetch(
  "https://cognizantcloud.com/api/v1/?endpoint=diagnosis/icd10&query=diabetes&limit=5",
  { headers: { "x-api-key": "YOUR_API_KEY" } }
);
const { data } = await response.json();
console.log(`${data.total_results} total matches`);
for (const code of data.results) {
  console.log(`${code.code}: ${code.description}`);
}
python
import requests

response = requests.get(
    "https://cognizantcloud.com/api/v1/",
    headers={"x-api-key": "YOUR_API_KEY"},
    params={"endpoint": "diagnosis/icd10", "query": "diabetes", "limit": 5}
)
data = response.json()["data"]
print(f"{data['total_results']} total matches")
for code in data["results"]:
    print(f"{code['code']}: {code['description']}")

Example Response

json
{
  "endpoint": "diagnosis/icd10",
  "credits_used": 1,
  "auth": "authenticated",
  "response_time_ms": 95,
  "data": {
    "query": "diabetes",
    "total_results": 142,
    "results": [
      { "code": "E11.9", "description": "Type 2 diabetes mellitus without complications" },
      { "code": "E10.9", "description": "Type 1 diabetes mellitus without complications" },
      { "code": "E11.65", "description": "Type 2 diabetes mellitus with hyperglycemia" },
      { "code": "E11.22", "description": "Type 2 diabetes mellitus with diabetic chronic kidney disease" },
      { "code": "E13.9", "description": "Other specified diabetes mellitus without complications" }
    ]
  }
}
FieldTypeDescription
data.querystringThe search term you used
data.total_resultsintegerTotal matching codes in the ICD-10-CM database
data.results[]arrayArray of matching ICD-10-CM codes
results[].codestringICD-10-CM code (e.g., E11.9)
results[].descriptionstringFull description of the diagnosis
Try It
Live
Response
Fill in parameters and click Send Request

Hospital Endpoints

GET / POSThospital/quality Search CMS Hospital Compare data including star ratings, quality measures, and facility details for 4,000+ US hospitals. Data refreshed from CMS CSV source with server-side caching. 2 credits

Parameters

ParameterTypeDescription
hospital_name optionalstringHospital or facility name (partial match, case-insensitive)
state optionalstringTwo-letter state code. Provide at least one filter (hospital_name, state, city, or zip).
city optionalstringFilter by city name (partial match, case-insensitive)
zip optionalstringFilter by ZIP code (exact match)
hospital_type optionalstringFilter by hospital type (e.g., "Acute Care Hospitals", "Critical Access Hospitals")
limit optionalintegerMax results (default: 10, max: 1000)

Code Examples

bash
# Search by hospital name and state
curl -H "x-api-key: YOUR_API_KEY" \
  "https://cognizantcloud.com/api/v1/?endpoint=hospital/quality&state=NY&hospital_name=mount+sinai&limit=5"

# POST with JSON body
curl -X POST -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"state":"CA","measure":"readmission","limit":10}' \
  "https://cognizantcloud.com/api/v1/?endpoint=hospital/quality"
javascript
// GET request
const response = await fetch(
  "https://cognizantcloud.com/api/v1/?endpoint=hospital/quality&state=NY&hospital_name=mount+sinai&limit=5",
  { headers: { "x-api-key": "YOUR_API_KEY" } }
);

// POST request (alternative)
const response2 = await fetch(
  "https://cognizantcloud.com/api/v1/?endpoint=hospital/quality",
  {
    method: "POST",
    headers: { "x-api-key": "YOUR_API_KEY", "Content-Type": "application/json" },
    body: JSON.stringify({ state: "CA", measure: "readmission", limit: 10 })
  }
);
python
import requests

# GET request
response = requests.get(
    "https://cognizantcloud.com/api/v1/",
    headers={"x-api-key": "YOUR_API_KEY"},
    params={"endpoint": "hospital/quality", "state": "NY", "hospital_name": "mount sinai"}
)

# POST request (alternative)
response = requests.post(
    "https://cognizantcloud.com/api/v1/?endpoint=hospital/quality",
    headers={"x-api-key": "YOUR_API_KEY"},
    json={"state": "CA", "measure": "readmission", "limit": 10}
)

Example Response

json
{
  "endpoint": "hospital/quality",
  "credits_used": 2,
  "auth": "authenticated",
  "response_time_ms": 312,
  "data": {
    "count": 5,
    "results": [
      {
        "facility_name": "MOUNT SINAI HOSPITAL",
        "state": "NY",
        "measure_name": "Mortality national comparison",
        "compared_to_national": "No Different Than the National Rate",
        "score": "Not Available",
        "footnote": "Results are based on a shorter time period than required."
      }
    ]
  }
}
FieldTypeDescription
data.countintegerNumber of quality measure records returned
data.results[]arrayCMS Hospital Compare quality measure records
results[].facility_namestringHospital name (uppercase)
results[].statestringState abbreviation
results[].measure_namestringQuality measure being reported
results[].compared_to_nationalstringPerformance vs. national benchmark
results[].scorestringNumeric score if available
results[].footnotestringCMS footnotes or caveats
Try It
Live
Response
Fill in parameters and click Send Request
GET / POSThospital/hcahps Patient experience survey scores (HCAHPS) including communication, responsiveness, cleanliness, and overall hospital rating. Real-time CMS data with 1hr cache. 2 credits

Parameters

ParameterTypeDescription
provider_id optionalstringCMS Provider ID (6-digit facility number)
state optionalstringTwo-letter state code
hospital_name optionalstringHospital name (partial match)
limit optionalintegerMax results (default: 10, max: 500)

Code Examples

bash
curl -H "x-api-key: YOUR_API_KEY" \
  "https://cognizantcloud.com/api/v1/?endpoint=hospital/hcahps&state=NY&limit=5"
Try It
Live
Response
Fill in parameters and click Send Request
GET / POSThospital/infections Healthcare-associated infection (HAI) data including CLABSI, CAUTI, SSI, MRSA, and C.diff rates compared to national benchmarks. Real-time CMS data with 1hr cache. 2 credits

Parameters

ParameterTypeDescription
provider_id optionalstringCMS Provider ID
state optionalstringTwo-letter state code
hospital_name optionalstringHospital name (partial match)
limit optionalintegerMax results (default: 10, max: 500)

Code Examples

bash
curl -H "x-api-key: YOUR_API_KEY" \
  "https://cognizantcloud.com/api/v1/?endpoint=hospital/infections&state=CA&limit=5"
Try It
Live
Response
Fill in parameters and click Send Request
GET / POSThospital/complications Complication and death rates for heart attack, heart failure, pneumonia, hip/knee replacement, and other serious conditions. Real-time CMS data with 1hr cache. 2 credits

Parameters

ParameterTypeDescription
provider_id optionalstringCMS Provider ID
state optionalstringTwo-letter state code
hospital_name optionalstringHospital name (partial match)
limit optionalintegerMax results (default: 10, max: 500)

Code Examples

bash
curl -H "x-api-key: YOUR_API_KEY" \
  "https://cognizantcloud.com/api/v1/?endpoint=hospital/complications&state=TX&limit=5"
Try It
Live
Response
Fill in parameters and click Send Request
GET / POSThospital/readmissions Unplanned readmission and mortality rates for heart attack, heart failure, pneumonia, COPD, stroke, CABG, and hip/knee replacement. Real-time CMS data with 1hr cache. 2 credits

Parameters

ParameterTypeDescription
provider_id optionalstringCMS Provider ID
state optionalstringTwo-letter state code
hospital_name optionalstringHospital name (partial match)
limit optionalintegerMax results (default: 10, max: 500)

Code Examples

bash
curl -H "x-api-key: YOUR_API_KEY" \
  "https://cognizantcloud.com/api/v1/?endpoint=hospital/readmissions&state=FL&limit=5"
Try It
Live
Response
Fill in parameters and click Send Request
GET / POSThospital/spending Medicare spending per beneficiary (MSPB) data showing how hospital episode costs compare to the national median across claim types. Real-time CMS data with 1hr cache. 2 credits

Parameters

ParameterTypeDescription
provider_id optionalstringCMS Provider ID
state optionalstringTwo-letter state code
hospital_name optionalstringHospital name (partial match)
limit optionalintegerMax results (default: 10, max: 500)

Code Examples

bash
curl -H "x-api-key: YOUR_API_KEY" \
  "https://cognizantcloud.com/api/v1/?endpoint=hospital/spending&state=IL&limit=5"
Try It
Live
Response
Fill in parameters and click Send Request
GET / POSThospital/timely-care Timely and effective care measures including ED wait times, sepsis treatment, blood clot prevention, immunization rates, and other process-of-care metrics. Real-time CMS data with 1hr cache. 2 credits

Parameters

ParameterTypeDescription
provider_id optionalstringCMS Provider ID
state optionalstringTwo-letter state code
hospital_name optionalstringHospital name (partial match)
limit optionalintegerMax results (default: 10, max: 500)

Code Examples

bash
curl -H "x-api-key: YOUR_API_KEY" \
  "https://cognizantcloud.com/api/v1/?endpoint=hospital/timely-care&state=PA&limit=5"
Try It
Live
Response
Fill in parameters and click Send Request
GET / POSThospital/profile General hospital information including address, phone, type, ownership, emergency services, overall star rating, and mortality/safety/readmission national comparisons. Real-time CMS data with 1hr cache. 2 credits

Parameters

ParameterTypeDescription
provider_id optionalstringCMS Provider ID
state optionalstringTwo-letter state code
hospital_name optionalstringHospital name (partial match)
city optionalstringFilter by city name
zip optionalstringFilter by ZIP code
limit optionalintegerMax results (default: 10, max: 500)

Code Examples

bash
curl -H "x-api-key: YOUR_API_KEY" \
  "https://cognizantcloud.com/api/v1/?endpoint=hospital/profile&state=MA&city=boston&limit=5"
Try It
Live
Response
Fill in parameters and click Send Request

Live API Tester

Test any endpoint directly from your browser. Responses come from the live production API. You can also use the "Try It" section within each endpoint above.

API Explorer

Connected
Response
Select an endpoint and click "Send Request" to see live results.

Error Codes

The API uses standard HTTP status codes. All error responses include a JSON body with an error field describing the problem.

400Bad Request
Missing required parameters or invalid parameter format. Check the endpoint documentation for required fields.
json
{
  "error": "drug parameter required"
}
401Unauthorized
Your API key is missing, invalid, or has been revoked. Verify your key at cognizantcloud.com/api-keys.
json
{
  "error": "Invalid or revoked API key"
}
402Payment Required
Your account does not have enough credits for this request. Purchase more credits at cognizantcloud.com/pricing.
json
{
  "error": "Insufficient credits",
  "credits_remaining": 0,
  "credits_required": 2,
  "upgrade_url": "https://cognizantcloud.com/pricing"
}
403Forbidden
Your API key is valid but access is denied. This can occur if your key has been disabled by an admin or your account has been suspended.
json
{
  "error": "User account not found for this API key"
}
404Not Found
The endpoint you requested does not exist. The response includes a list of valid endpoints.
json
{
  "error": "Unknown endpoint: drug/fake",
  "available": [
    "provider/search", "provider/lookup", "drug/interactions",
    "drug/label", "drug/adverse-events", "drug/recalls",
    "drug/ndc", "drug/rxnorm", "drug/pricing",
    "diagnosis/icd10", "hospital/quality", "trials/search"
  ]
}
429Too Many Requests
You have exceeded your rate limit. Wait until the reset time or upgrade your plan for higher limits.
json
{
  "error": "rate_limit_exceeded",
  "message": "You have exceeded your daily API call limit.",
  "limit": 100,
  "reset_at": "2026-04-03T00:00:00Z"
}
500Internal Server Error
An unexpected error occurred on the server, typically from an upstream API failure (NPPES, openFDA, etc.). If this persists, contact support@cognizantcloud.com.
json
{
  "error": "Upstream API error: 503",
  "endpoint": "provider/search"
}

Error handling best practice: Always check the HTTP status code first. For 5xx errors, implement exponential backoff with a maximum of 3 retries. For 402 errors, check the X-Credits-Remaining header proactively to avoid hitting zero. For 429 errors, respect the reset_at timestamp.

Rate Limits

Rate limits are applied per API key for authenticated requests, or per IP address for unauthenticated requests. Exceeding your limit returns HTTP 429.

Free
100
calls / day
Pro
5,000
calls / day
Ultra
50,000
calls / day

Rate Limit Headers

Authenticated responses include these headers to help you track usage:

HeaderDescription
X-Rate-LimitYour maximum allowed calls per day
X-Credits-RemainingCredits remaining in your account after this call
X-Credits-UsedCredits consumed by this specific request

Handling Rate Limits

javascript
async function apiCall(endpoint, params, retries = 3) {
  const url = new URL("https://cognizantcloud.com/api/v1/");
  url.searchParams.set("endpoint", endpoint);
  for (const [k, v] of Object.entries(params)) url.searchParams.set(k, v);

  for (let i = 0; i < retries; i++) {
    const response = await fetch(url, {
      headers: { "x-api-key": "YOUR_API_KEY" }
    });

    // Check credits proactively
    const remaining = response.headers.get("X-Credits-Remaining");
    if (remaining !== null && parseInt(remaining) < 10) {
      console.warn(`Low credits: ${remaining} remaining`);
    }

    if (response.status === 429) {
      const delay = Math.pow(2, i) * 1000; // exponential backoff
      console.log(`Rate limited. Retrying in ${delay}ms...`);
      await new Promise(r => setTimeout(r, delay));
      continue;
    }

    return await response.json();
  }
  throw new Error("Max retries exceeded");
}
python
import requests, time

def api_call(endpoint, params, retries=3):
    params["endpoint"] = endpoint
    for i in range(retries):
        response = requests.get(
            "https://cognizantcloud.com/api/v1/",
            headers={"x-api-key": "YOUR_API_KEY"},
            params=params
        )

        # Check credits proactively
        remaining = response.headers.get("X-Credits-Remaining")
        if remaining and int(remaining) < 10:
            print(f"Warning: only {remaining} credits remaining")

        if response.status_code == 429:
            delay = (2 ** i)  # exponential backoff
            print(f"Rate limited. Retrying in {delay}s...")
            time.sleep(delay)
            continue

        response.raise_for_status()
        return response.json()

    raise Exception("Max retries exceeded")

Rate limits vs. credits: Rate limits cap how many API calls you can make per day. Credits determine how many total calls you can make before purchasing more. You can hit a rate limit even if you have credits remaining. Upgrade your subscription tier to increase rate limits.

Pagination

Most endpoints support a limit parameter that controls how many results are returned per request. The maximum limit varies by endpoint, based on upstream API constraints.

EndpointDefaultMaximumUpstream Source
provider/search10200NPPES API
drug/adverse-events10100openFDA FAERS
drug/recalls10100openFDA Enforcement
drug/ndc10100openFDA NDC Directory
drug/pricing10100openFDA NDC Directory
diagnosis/icd1010100NLM Clinical Tables
hospital/quality10100CMS Hospital Compare
trials/search1050ClinicalTrials.gov v2

Paginating Through Large Result Sets

For endpoints that return a total_results or totalCount field larger than your limit, make multiple requests with different criteria to cover the full dataset. For the ICD-10 endpoint, the total_results field tells you how many total codes matched your query.

javascript
// Fetch providers in batches of 200 (maximum per request)
async function getAllProviders(state, specialty) {
  const response = await fetch(
    `https://cognizantcloud.com/api/v1/?endpoint=provider/search&state=${state}&taxonomy_description=${specialty}&limit=200`,
    { headers: { "x-api-key": "YOUR_API_KEY" } }
  );
  const { data } = await response.json();
  console.log(`Retrieved ${data.result_count} of ${data.result_count} providers`);
  return data.results;
}

// For ICD-10, check total_results to know the full count
const { data } = await fetch(
  "https://cognizantcloud.com/api/v1/?endpoint=diagnosis/icd10&query=diabetes&limit=100",
  { headers: { "x-api-key": "YOUR_API_KEY" } }
).then(r => r.json());
console.log(`Got ${data.data.results.length} of ${data.data.total_results} total matches`);
python
import requests

# Fetch max providers per request
response = requests.get(
    "https://cognizantcloud.com/api/v1/",
    headers={"x-api-key": "YOUR_API_KEY"},
    params={"endpoint": "provider/search", "state": "NY", "taxonomy_description": "Cardiology", "limit": 200}
)
data = response.json()["data"]
print(f"Retrieved {data['result_count']} providers")

# For ICD-10, check total_results to see full count
response = requests.get(
    "https://cognizantcloud.com/api/v1/",
    headers={"x-api-key": "YOUR_API_KEY"},
    params={"endpoint": "diagnosis/icd10", "query": "diabetes", "limit": 100}
)
data = response.json()["data"]
print(f"Got {len(data['results'])} of {data['total_results']} total matches")

Pagination strategy: Use more specific search parameters (adding state, specialty, city) to narrow results rather than paginating through thousands of records. This is faster, uses fewer credits, and returns more relevant data. For broad searches, the total_results field tells you how many records exist so you can refine your query.

Response Format

Every successful response follows a consistent envelope structure, making it simple to build reliable integrations regardless of which endpoint you call.

json
{
  "endpoint": "provider/search",      // which endpoint was called
  "credits_used": 1,                   // credits consumed (0 if unauthenticated)
  "auth": "authenticated",             // "authenticated" or "anonymous"
  "response_time_ms": 142,              // server-side processing time
  "data": { /* endpoint-specific payload */ }
}
endpoint

Echoes the endpoint you requested. Useful for logging and debugging.

credits_used

Credits deducted for this call. 0 for anonymous (unauthenticated) requests.

auth

Whether the request was authenticated with a valid API key.

response_time_ms

Server-side processing time in milliseconds. Does not include network transit.

data

The response payload. Structure varies by endpoint (see schemas above).

Credit Costs by Endpoint

EndpointCredits
provider/search1 credit per call
provider/lookup1 credit per call
drug/interactions2 credits per call
drug/label1 credit per call
drug/adverse-events2 credits per call
drug/recalls1 credit per call
drug/ndc1 credit per call
drug/rxnorm1 credit per call
drug/pricing2 credits per call
diagnosis/icd101 credit per call
hospital/quality2 credits per call
trials/search2 credits per call