User Tools

Site Tools

C3PI RxImageAccess RESTful Web API

Sample C3PI Image

RxImageAccess Applications Programming Interface (API) is an online offering from the National Library of Medicine (NLM) Lister Hill National Center for Biomedical Communications’ Office of High Performance Computing and Communications (OHPCC) for searching for and retrieving digital images and associated metadata for prescription oral solid dosage formulations (tablets, gel caps and capsules, etc. – commonly known as pills) from a publicly available, increasingly comprehensive, standardized, curated database. RxImageAccess has the following features:

  • Curated image database of over 3800 prescription products representing over 29,000 unique NDCs.
  • RxImageAccess is a RESTful (representational state transfer) Web API.
  • Supports HTTPS connections
  • Results are returned in either JavaScript Object Notation (JSON) or Extensible Markup Language (XML) encoding.
  • Search parameters can include pill color, shape, imprint (text on a pill), and size, and NDC (National Drug Code), RxCUI (RxNorm Concept Unique Identifier), and Structured Product Label (SPL) identifier (SetID).
  • Images include watermarks to identify them as having originated with the NLM.
  • Images can include an information panel that provides the name, dosage, manufacturer, shape, size, color, and imprint.
  • Output control parameters include image resolution, number of results, number of images per page, page number, and whether returned metadata are to include active ingredients, inactive ingredients, trade names, and generic names.
  • RxImageAccess image files are standardized in two layout formats and available in multiple resolutions to support online, mobile, and desktop application development.

Fees and NLM Attribution

RxImageAccess images are free for public use.

The NLM requests that the following citation be included with the images when they are used in software or online applications:

“Images supplied by the National Library of Medicine (NLM) Office of High Performance Computing and Communications (OHPCC) have been supported by the American Recovery and Reinvestment Act of 2009 (ARRA) and through NIH intramural funding approved by the NLM Board of Scientific Counselors.”

For developers wishing for a waiver of the attribution or who may wish to use an NLM logo in their applications or who may wish to be placed on a developer informational forum please submit a request to:

Correspondence and requests to be include in e-mail announcements

Please send comments, questions, suggestions, and requests to be included in RxImageAccess e-mail announcements to

About pharmaceutical products imaged

The pills that were photographed for this project were either, voluntarily provided by pharmaceutical manufacturers, purchased from licensed pharmaceutical retailers, acquired through wholesale channels or provided by other federal agencies.

About U.S. Food and Drug Administration (FDA) involvement

The U.S. Food and Drug Administration's (FDA) Center for Drug Evaluation and Research (CDER) provided technical advice, funding, and in-kind support for the development of the photography standards for this project, the establishment of an imaging facility, and the performance of some image capture.

More about the RxImageAccess database and API

The RxImageAccess collection contains high-quality images of over 2,300 pills that have been photographed using specialized macro-photography techniques and then image processed leveraging high-fidelity segmentation algorithms as part of OHPCC’s Computational Photography Project for Pill Identification (C3PI). The number of images available through the API is increasing as part of a multi-year commitment by the NLM to develop the first publicly accessible and curated standardized image collection of prescription pharmaceutical products marketed in the United States.

To promote the use of these images in healthcare and research applications, the RxImageAccess API has been designed to allow software and online applications developers access to the images of pill products through a reliable and high-performance RESTful (representational state transfer) architecture interface. The images provided through the API are designed to support a wide range of end-user environments including online, mobile, and desktop applications. To that end, RxImageAccess provides images in multiple sizes and resolutions.

RxImageAccess currently provides two layout formats (image collections) for all the supported resolutions that allow developers to choose whether pharmacological name(s) and physical characteristic data (e.g. shape, size, color, imprint and scoring information for pills) will be directly displayed with the pharmaceutical product’s image, or whether instead it would be better to suppress the physical data available from the image frame for a particular application.

RxBase RxNav
Sample RxBase ImageSample RxNav Image

The images are available through a RESTful Web API that allows developers to request pill images based on a wide number of parameters including:

The RxImageAccess API returns metadata information on the following items associated with the pill images:

  • Physical Characteristics (Shape, Color, etc.)
  • Original NDC (National Drug Code) and known relabelers
  • SPL Identifier (SetID)
  • Trade Pharmaceutical Name
  • Generic Pharmaceutical Name
  • Active Ingredients
  • Inactive Ingredients
  • Pack Size
  • Product Acquisition Date

The RxImageAccess images, metadata, were captured and the online API was configured by Medicos Consultants, LLC under contract with the Office of High Performance Computing and Communications in NLM’s Lister Hill National Center for Biomedical Communications. The RxImage project is a component of OHPCC’s Computational Photography Project for Pill Identification (C3PI).

Page Tools