Leverage DrugBank's Clinical API with Drug Name Search

Learn more about the ways you can leverage our Clinical API to ensure accurate and fast drug product searches.

Leverage DrugBank's Clinical API with Drug Name Search

With Drugbank’s Clinical API, there are multiple ways to search for drug/product information.

As a result, you can pick and choose the methods that make the most sense for you to get the best results for your use case and the type of information you’re trying to capture.

One common way of looking up drug/product information is by utilizing our Drug Name Search.


Table of Contents

  1. What is Drug Name Search?
  2. How does Drug Name Search work?
  3. What is a fuzzy Drug Name Search?
  4. How does the fuzzy Drug Name Search work?

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.


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.

Learn More About Medication Search

It should be noted that end-users are typically familiar with medication names, but in instances when they are not they can benefit from the Drug Name Search’s added fuzzy search function, which we’ll discuss later in this post.



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=

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

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.



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

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:


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:

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> https://api.drugbank.com/v1/drugs/< drugbank_id>

Then add the appropriate extension for the endpoint you are looking for in the table below.


Additional Helpful Parameters:

Parameter

Default

Description

q

null

The string you want to search with.

fuzzy

false

If set to true, enable fuzzy search (see fuzzy searching below).

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.


No matter your use case, our Clinical API provides a range of powerful tools to help you bring more certainty and speed to you and your user’s day. Depending on your specific needs it’s a good idea to explore a range of options to find the right module for you. Our customer success team has the know-how and experience to help you identify what will work best for you and guide you along the way as you get up and running.