PharmGKB Infobutton Service

The Context-Aware Knowledge Retrieval (Infobutton) specifications provide a standard mechanism for clinical information systems to request context-specific clinical knowledge from online resources.

For more details, consult the specification.

PharmGKB provides basic URL-based knowledge retrieval for drug/chemical data from PharmGKB.

Note: The PharmGKB service only supports RxNorm at this time so RxNorm and RxCUIs must be used for queries to the PharmGKB.


The PharmGKB Infobutton service is available at and accepts both GET and POST (with key-value parameters) requests.

The following request parameters are used for querying PharmGKB data.

Request Parameters

Using mainSearchCriteria.v.cs (codeSystem) and mainSearchCriteria.v.c (code/identifier)

These parameters are used to search for a chemical using a codeSystem (e.g. RxNorm) and its code/identifier (e.g. RxCUI) in the system.

The PharmGKB service only supports the RxNorm codeSystem (value 2.16.840.1.113883.6.88) and defaults to it if this argument is omitted. Any value for mainSearchCriteria.v.cs other than 2.16.840.1.113883.6.88 will return no results.

For example, the following two (equivalent) queries uses the RxCUI for warfarin: 11289:

Using mainSearchCriteria.v.dn (displayName)

This parameter is used to search for a chemical based on its name.

For example, the following query uses the drug name warfarin:

Using mainSearchCriteria.v.ot (originalText)

This parameter is used to search for a chemical based on some text, which can be a drug with specific form and/or dose.

For example, the following query is searching for Warfarin Sodium 7.5 MG Oral Tablet:

Usage order

The service consumes the request parameters in the following order

  1. mainSearchCriteria.v.c and mainSearchCriteria.v.cs
  2. mainSearchCriteria.v.dn
  3. mainSearchCriteria.v.ot

If a result is found at any stage, the remaining parameters are disregarded and the result is returned.

For example, the following query will return information on warfarin even though the latter parameters reference different drugs:

This is because the RxCUI for warfarin (11289) is given for the mainSearchCriteria.v.c parameter which is consumed first.

Multiple Queries

Multiple queries can be performed using a single request by appending a subsequent integer to the request parameters, i.e. request parameters ending in a number X (absent for first query) reference the X+1th query.

For example, a request for warfarin and aspirin is

Multiple queries are not combination queries: individual queries within a single multiple query are independent of each other.