Query the FDA Global Substance Registration System (GSRS) API
Overview
Provides functions to query the FDA Global Substance Registration System (GSRS) REST API (https://gsrs.ncats.nih.gov/api/v1/). Enables programmatic access to substance records, UNII identifiers, synonyms, external codes, and chemical structures for over 170,000 registered substances.
New functions
gsrs_search(): free-text and Lucene-syntax search across GSRS substances, with optional automatic pagination.gsrs_substance(): fetch substance metadata by UNII (vectorized).gsrs_names(): retrieve all registered names / synonyms for one or more UNIIs.gsrs_codes(): retrieve all cross-reference codes (CAS, PubChem, ChEMBL, WHO-ATC, DrugBank, etc.) for one or more UNIIs, with optionalcode_systemfilter.gsrs_unii_from_name(): resolve substance names to their UNII identifiers.gsrs_structure(): fetch chemical structure data (SMILES, formula, MW, InChI, stereo info) by UNII.
Show all changes in 0.1.0Hide the rest of the changes in 0.1.0
gsrs_structure_search(): substructure, similarity, exact, and flexible structure search by SMILES.gsrs_chem_info(): retrieve chemical structure information from any identifier — name, CAS, UNII, InChIKey, or SMILES.gsrs_hierarchy(): retrieve the parent/child relationship tree for a substance.gsrs_browse(): page through the full GSRS substance catalogue.gsrs_vocabularies(): retrieve all controlled vocabulary terms.gsrs_all(): convenience umbrella returning substance metadata, names, codes, structure, and hierarchy in a single named list.write_dataframes_to_excel(): write a named list of data frames to an Excel workbook (requiresopenxlsx).
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK7 OK2026-05-06
Documentation
- Help pages
- 13
- Examples that run
- 0%13 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 0%
Downloads
Repository
Releases over time
10 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/c1au6i0/rgsrs on 2026-10-25.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-05-05 · The repository has a site deploy workflow
pkgdown site last built 2026-05-05
Show all practicesHide 1 practice
Dependencies
Code & Tests
People & History
- 0.1.0Latest2026-05-05 · current release
- RR 4.6.0 released · 2026-04-24
Package metadata
- First published
- 2026-05-05
- Total releases
- 1 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1
- Download size
- 40 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("rgsrs")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-26, which the citation names so these numbers can be found later. More on citing and the projects behind them.