Get started


The Crediblemeds.org QTdrugs™ API provides programmatic access to read QTdrugs List data in JSON-encoded format.

QTdrugs™ API access is provided as optional feature for certain types of Crediblemeds.org licenses.

The QTdrugs™ API uses API token to authenticate requests. You can view and manage your API token form your Account Settings page, API settings section.

Query Syntax


# Request example 
curl 'https://crediblemeds.org/index.php/
tools/api/query/v1?token=YOUR_API_TOKEN&list=dta'
                

To get QT drugs data you need to pass your api token and other optional parameters as a GET parameters to the following url :
https://crediblemeds.org/index.php/tools/api/query/v1



Example of successful request response :

{ 
    "Meta": 
{ 
    "Disclaimer": "The absence of drugs from these lists should 
                   not be considered an indication that they are free of risk 
                   of QT prolongation or torsades de pointes. Many medicines have 
                   not been tested for this risk in patients, especially those with 
                   congenital long QT syndrome. All brand names may not be listed.", 
    "Last List Update": "October 13, 2021", 
    "Mobile Version": "3.0"
 }
, 
    "Results": [ 

{ 
    "generic_name": "Chlorpromazine", 
    "brand_names": "Thorazine,Largactil,Megaphen", 
    "rxnorm_id": "2403", 
    "atc_code": "N05AA01", 
    "drug_action": "Antipsychotic / Antiemetic", 
    "main_therapeutic_use": "Nausea, Schizophrenia, many others", 
    "route_administered": "oral,injection,suppository", 
    "link_to_pubmed_for_qt_tdp_search": "http://www.ncbi.nlm.nih.gov/pubmed/?
                                     term=chlorpromazine+AND+(%22QT%22+OR+Torsad*)", 
    "category": "R", 
    "last_tdp_category_update_date_filled_automatically": "2000-10-17"
 }
 ]

 }
                

QUERY PARAMETERS

Field Type Description
token String Your API token.
list (optional) String Drug list type. Accepts as values:
  • composite - drugs included in first 3 categories Known risk of TdP, Possible risk of TdP, Conditional risk of TdP
  • dta (default) - drugs to avoid list, which includes composite list plus additional drugs to be avoided in CLQTS WHICH are not included in first 3 categories
filters (optional) Array (optional) array of filter parameters, described in "FILTERS" section.


SUCCESSFUL REQUEST OUTPUT FIELDS

Field Description
Meta Metadata about the query, including a disclaimer, link to data license, last-updated date, and total matching records, if applicable.Metadata about the query, including a disclaimer, link to data license, last-updated date, and total matching records, if applicable..
Results List of matching results, dependent on which list and filters were passed as request parameters.


FAILED REQUEST OUTPUT FIELDS

Field Description
error_code Error type unique identifier
error_message Short error description.

FILTERS


Examples:
curl 'https://crediblemeds.org/index.php/
tools/api/query/v1?token=YOUR_API_TOKEN&list=dta
&filters[category]=P
&filters[drug_action]=Antipsychotic';
                

Filter parameters

Field Description
generic_name Generic Name: Name of the unique medicine as defined by US Adopted Names (USAN) or the International Nonproprietary Name (INN)
drug_action * Drug Class:  The drug class is the Anatomical Therapeutic Chemical (ATC) classification that is based on the drug’s predominant pharmacologic actions
category Risk Category:  This field is the drug’s risk category for a drugs likelihood to cause Torsades de Pointes
brand_names Brand Names:  This field contains the names of the most commonly used brands of products that contain the medicine.  For some drugs, it is not a complete list.
route_administered * Administration Route:  The field includes a list of all of the routes of administration for which the drug has a risk associated with Torsades de Pointes
main_therapeutic_use * This field includes the predominant medical use(s) for the medication
atc_code * Anatomical Therapeutic Chemical (ATC) classification system: 5th level
rxnorm_id * RxNorm provides normalized names for clinical drugs and links its names to many of the drug vocabularies commonly used in pharmacy management and drug interaction software.
drugs_listed_in_contraindications_section * Contraindicated Concomitant medicines
warning_for_clqts * Warning for use in patients with congenital LQTS
ecg_recommendations_in_fda_label * ECG Recommendations in FDA label
market_status * List if drug is on US or Non-US markets or if it has been discontinued
qt_increase_mentioned_in_drug_label_y/n * QT increase mentioned in drug label
tdp_cases_mentioned_in_drug_label_y/n * TdP cases mentioned in drug label

* Depending on your contract, you may not have access to this data-point.

Examples



$url = "https://crediblemeds.org/index.php/tools/api/query/v1";

$params = array('token'=>"xxxxxxxxxxxxxxxxxxx", // Your API token
                'list'=>'dta',
                'filters'=> array('category'=>"P")
                );
                
$query =  http_build_query($params);

$opts = array('https' => array('method'  => 'GET', 
                'header'  => 'Content-type: application/json', 
                'content' => $query));
                
$context  = stream_context_create($opts);

$result = file_get_contents($url, false, $context);

PHP usage example

Errors


                 Examples:
                 

    {
        "error_code":2,
        "error_message":"Missing API token"
    },
    {
        "error_code":3,
        "error_message":"Wrong API token"
    },
    {
        "error_code":4,
        "error_message":"License linked to this token expired"
    },
    {
        "error_code":5,
        "error_message":"License linked to this token has API access disabled"
    },
    {
        "error_code":6,
        "error_message":"Internal error occured"
    },
    {
        "error_code":8,
        "error_message":"'list' parameter accepts only "dta" and "combined" values"
    },
    {
        "error_code":9,
        "error_message":"\"Invalid filter parameter: {param}"
    },
    {
        "error_code":10,
        "error_message":"\"Category filter parameter accepts only R, P, C, A values"
    }                   
                

Invalid requests can return the following error codes:

Error Code Description
2 Missing API token
3 Wrong or invalid API token.
4 License linked to this token expired
5 License linked to this token has API access disabled.
6 Internal error occured.
8 Invalid "list" parameter set.
9 Invalid "filter" parameter set.
10 Invalid "category" filter parameter set.