Drug Name Search Implementation Guide
What is Drug Name Search?
Our Drug Name Search is just one of the ways our API users can dig into our data. Unlike our Medication Search, which is typically broken down into a series of steps to find the correct result, the Drug Name Search is a simplified one-step query. From our experience, users get the most benefit from this search when they are seeking quick results and need to find a specific drug product and its jurisdiction product code. Users also appreciate the ease of the auto-complete-style format of the Drug Name Search.
Here's a scenario where Drug Name Search could be applied:
Dr. Sam is a busy physician and wants to be able to quickly and confidently prescribe medication. By entering the drug product into the patient prescription app, Dr. Sam will see a dropdown list of possible products matching that drug for them to choose from.
The Drug Name Search feature is useful to search actual drug products directly from the database. This list will provide you with direct jurisdiction drug product codes like NDC codes. Although it might be good for doctors, the Drug Name Search shines the most for companies that are doing drug dispensing.
This searching system is as granular as you will get for drug products.
Drug Name Search Vs. Medication Search
If you find the Drug Name Search does not provide you with the specificity you need we recommend trying our Medication Search as an alternative. This search function has been created to help users capture all NDC codes with the same attributes under one identifier.
How Does Drug Name Search Work?
Drug Name Search is a straightforward search function that enables users to enter a drug name they need information on. The search will quickly return a list of possible products along with their NDC and/or other local product codes. It will also return a unique Drugbank ID, which maps to the product's active ingredient. Both the product codes and DrugBank IDs can also be stored and connected to other endpoints that may be useful to your application.
Step 1: To start a Drug Name Search, you would enter the following:
https://api.drugbank.com/v1/drug_names?q=
Copy to clipboard
Step 2: In the example of Tylenol, the call to the API would look like this:
https://api.drugbank.com/v1/drug_names?q=Tylenol
Copy to clipboard
Note: In this response, the drug name “Tylenol” was partially queried. Looking at line 7, the drug name Tylenol 8HR was captured. If you have access to multiple regions, you can set the region parameter to the specific regions you are interested in. For example: region=us or region=us,ca for both US and Canada. This allows the search to also look specifically for products approved in the US region or US and Canada depending on which regions you use. In line 18, you can see the ndc_product_code for this drug product is populated because we have restricted the search to US only as per our region parameter.
Auto-complete: Drug Name Search also has the ability to auto-complete. For instance, if you had tried looking for Tylenol but only typed Tyle, you would retrieve the same hits. This is thanks to our auto-complete. The string that is in between the <em> and </em> is what is directly matched to the query, the remaining, outside of the <em> and </em> is what is auto-completed. It's important to note that the fewer characters you input into your search and/or the more misspelled drug names you type, the more results you will likely return, which creates an unnecessarily long list of medications to filter from.
Let's scroll down further for the above API call, and look at the other details that populated in the query:
Note: There are a few additional details that are returned in this search. You can see the different attributes of this product, on line 24: dosage form, line 26: strength, and line 29: route. On line 39 you can see the drugbank_id: DB00316, which is the well-known active ingredient acetaminophen.
Tip: For this initial drug name search, we recommend showing the “name” to create dropdown options that an end-user can select. You can choose to display additional information like the NDC code or capture this id, save it, and connect to other endpoints afterwards.
What is a Fuzzy Drug Name Search?
Fuzzy Search is an aid embedded in our Drug Name Search that helps users quickly and easily look up drugs without having to worry about exact spelling. It works by auto-completing as a user types, finding the closest matches to what you've provided in the search bar. It will pull a synonym, brand name, or active ingredients that it thinks could relate to your search.
For more information on Fuzzy Search check out our Help Center.
Here's a scenario applying Fuzzy Search with Drug Name Search:
Dr. Sam is a busy physician entering a drug product name into the Drug Name search but has mistyped the medication name. With the help of the fuzzy search functionality, Dr. Sam's search will still result in a comprehensive list of medications. From this list they're able to select the medication they were searching for and prescribe it to their patient.
In this case, enabling Fuzzy Search with the Drug Name Search helped Dr. Sam retrieve a list of medications. They're able to select the desired drug product for their patient and store this in the patient's profile.
How Does the Fuzzy Drug Name Search Work?
In this API call, we show how to enable the Fuzzy Search by adding a parameter for fuzzy=true. Even though the drug name Tylenol is misspelled as Tlyenol, the API returns a list of possible matches:
Fuzzy: In the “hits” array we are still getting returns from the API for Tylenol.
Actually, if you compare this to the first call, the return is the same:
https://api.drugbank.com/v1/drug_names?q=Tylenol®ion=us
Copy to clipboard
Good to Know
Regional settings: filtering your search by a jurisdiction will limit the products returned, only showing you the currently approved products set to that specific region. The regions currently available are:
Region | Region Code |
---|---|
Austria | at |
Canada | ca |
Colombia | co |
European Union | eu |
Indonesia | idn |
Italy | it |
Malaysia | my |
Singapore | sg |
Thailand | th |
Turkey | tr |
United States | us |
Common fields in Drug Names: Depending on what information is needed on your end, you may not require every piece of data returned by the Drug Name Search. Here are a few common fields that are valuable and typically of interest:
Fields | Description |
---|---|
name | This will display the drug name given by the manufacturer of the product |
prescribable_name | The more detailed and scientific way of naming the drug product |
Rx_norm_prescribable_name | This is specific to US products. Using the Rx Norm prescribable name from Drug Name search, you will be able to map to rxCUI codes through the Product Concepts search |
ndc_product_codes / other local product IDs | The US region FDA code (or another jurisdiction) the product is registered under. You may also capture this NDC code to use in other endpoints. |
route | The route that the drug product is available in |
dosage_form | The form that the drug product is available in |
strength | The strengths that the drug product is available in |
ingredients→ drugbank_id | The DrugBank ID that specifies the active ingredient in the product. You may also capture this DBID to use in other endpoints. |
ingredients→ cas | Unique and unambiguous identifier that is assigned by the Chemical Abstracts Service (CAS) for every chemical substance. A CAS No. for an active ingredient is universal, which you can use to search up a drug's information. |
The local_product_id and drugbank_id can both be used to access many other endpoints in Drugbank's Clinical API. Below are some of the endpoints that may be helpful.
Start with the basic call structure:
https://api.drugbank.com/v1/products/<local_product_id>
Copy to clipboard
https://api.drugbank.com/v1/drugs/<drugbank_id>
Copy to clipboard
Then add the appropriate extension for the endpoint you are looking for in the table below.
End Point | Extension | Product IDs | DrugBank IDs |
---|---|---|---|
Drug-Drug Interactions | /ddi | https://api.drugbank.com/v1/ | https://api.drugbank.com/v1/ |
Adverse Effects | /adverse_effects | https://api.drugbank.com/v1/products/ | https://api.drugbank.com/v1/drugs/ |
Indications | /indications | https://api.drugbank.com/v1/products/ | https://api.drugbank.com/v1/drugs/ |
Contraindications | /contraindications | https://api.drugbank.com/v1/products/ | https://api.drugbank.com/v1/drugs/ |
Black Box Warnings | /boxed_warnings | https://api.drugbank.com/v1/products/ | https://api.drugbank.com/v1/drugs/ |
Additional Helpful Parameters
Parameter | Default | Description |
---|---|---|
q | null | The string you want to search with |
fuzzy | false | If set to true , enable fuzzy search |
include_allergens | false | If set to true , include allergen products in the results |
include_vaccines | true | If set to true , include vaccine products in the results |
include_simple_desc | false | If set to true , include simple descriptions for the product ingredients |
include_clinical_desc | false | If set to true , include clinical descriptions for the product ingredients |