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": "2000-10-17"
}
]
}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
token | String | Your API token. |
list (optional) | String | Drug list type. Accepts as values:
|
filters (optional) | Array | (optional) array of filter parameters, described in "FILTERS" section. |
display_mode (optional) | string | (optional) If is set, lists the query output in human readable format |
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. |
RESULTS DATA FIELDS
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 * | QT increase mentioned in drug label |
tdp_cases_mentioned_in_drug_label * | TdP cases mentioned in drug label |
* Depending on your contract, you may not have access to this data-point.
FAILED REQUEST OUTPUT FIELDS
Field | Description |
---|---|
error_code | Error type unique identifier |
error_message | Short error description. |
FILTERS
Example #1:
Get entries from DTA list with "Possible risk of TdP" category
and "Antipsychotic" drug action:
curl \
--data-urlencode "token=YOUR_API_TOKEN" \
--data-urlencode "list=dta" \
--data-urlencode "filters[category]=P" \
--data-urlencode "filters[drug_action]=Antipsychotic" \
https://crediblemeds.org/index.php/tools/api/query/v1
Example #2:
Get entries from DTA list in "Possible risk of TdP" or "Known risk of TdP" category,
with "antipsychotic" and "atypical" drug action:
curl \
--data-urlencode "token=YOUR_API_TOKEN" \
--data-urlencode "list=dta" \
--data-urlencode "filters[category][]=P" \
--data-urlencode "filters[category][]=R" \
--data-urlencode "filters[category][operator]=or" \
--data-urlencode "filters[drug_action][]=antipsychotic" \
--data-urlencode "filters[drug_action][]=atypical" \
--data-urlencode "filters[drug_action][operator]=and" \
https://crediblemeds.org/index.php/tools/api/query/v1
Filter parameters
Field | Type | Values | URL parameter example |
---|---|---|---|
generic_name | String or array** | Any drug generic name | &filters[generic_name]=Amiodarone |
brand_names | String or array** | Any drug brand name | &filters[brand_names]=Cipralex |
category | String or array** | R – Known risk of TdP P – Possible risk of TdP C – Conditional risk of TdP A – Additional Drugs to be avoided in CLQTS WHICH are not included in first 3 categories |
&filters[category]=R |
drug_action * | String or array** | Any drug action | &filters[drug_action]=Antiviral |
route_administered * | String or array** | Oral, sublingual, topical, injection, inhaled, nasal, suppository | &filters[route_administered]=topical |
main_therapeutic_use * | String or array** | Any therapeutic use | &filters[main_therapeutic_use]=Asthma |
atc_code * | String or array** | Any 5th level Anatomical Therapeutic Chemical (ATC) code | &filters[atc_code]=J05AR26 |
rxnorm_id * | String or array** | Any RxNorm id | &filters[rxnorm_id]=85762 |
drugs_listed_in_contraindications_section * | String or array** | Contraindicated Concomitant medicines | &filters[drugs_listed_in_contraindications_section]=alfuzosin |
warning_for_clqts * | String or array** | Caution Avoid Box warning Contraindicated None |
&filters[warning_for_clqts]=avoid |
market_status * | String or array** | On US Market On US and non US Market Removed from US Market On non US Market |
&filters[market_status]=On+non+US+Market |
* Depending on your contract, you may not have access to this data-point.
** When multiple filter values are passed as array, additional parameter operator can be passed with and
and or
as possible values. If not specified, or
will be applied as default operator. URL parameters example:
&filters[category][]=R
&filters[category][]=P
&filters[category][operator]=or
The filter above will return drug entries in "R – Known risk of TdP" or "P – Possible risk of TdP" categories
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. |