Drug Interaction RESTful API
OverviewThe Drug Interaction RESTful web API is a web service developed at the National Library of Medicine for accessing drug-drug interactions data. Representational state transfer (REST) is a style of software architecture for distributed hypermedia systems such as the World Wide Web. REST-style architectures consist of clients and servers. Clients initiate requests to servers; servers process requests and return appropriate responses. Requests and responses are built around the transfer of "representations" of "resources". A resource can be essentially any coherent and meaningful concept that may be addressed. A representation of a resource is typically a document that captures the current or intended state of a resource.
The Drug Interaction RESTful web API is a simple web service implemented using HTTP and can be thought of as a collection of resources, specified as URIs. Some characteristics of the Drug Interaction RESTful web API:
- The base URI for the web service is https://rxnav.nlm.nih.gov/REST/interaction
- The schema file that describes the XML format is located here.
- The web service can return the data in XML or JSON formats. The format can be
specified by appending the extension (.xml or .json) to the URI before the query parameters.
Example to return JSON (click on the link below to view the output):
- The web service only supports the HTTP method GET, since the web service function is to retrieve Interactions data.
The following table lists the Interaction API resources. The query string fields are described in the detailed sections for each resource.
|/interaction||Find the interactions of a drug (specified by RxCUI).|
|/list||Find the interactions between a list of drugs.|
|/sources||Get the sources of the interactions|
|/version||Get the version of the data sets|