A RESTful API providing access to the DrugCentral database with support for JSON, CSV, and TSV export formats.
Live API: https://uxn2ycvimg.us-east-2.awsapprunner.com
The DrugCentral DRS (Data Repository Service) API provides programmatic access to comprehensive drug information from the DrugCentral database. This API enables researchers, developers, and data scientists to query drug structures, activities, targets, products, and synonyms through a standardized REST interface.
https://uxn2ycvimg.us-east-2.awsapprunner.com
curl https://uxn2ycvimg.us-east-2.awsapprunner.com/Response:
{"status": "ok"}# Get 5 structures
curl "https://uxn2ycvimg.us-east-2.awsapprunner.com/structures?limit=5"
# Get activities with pagination
curl "https://uxn2ycvimg.us-east-2.awsapprunner.com/act_table_full?skip=10&limit=20"# Export structures as CSV
curl "https://uxn2ycvimg.us-east-2.awsapprunner.com/structures/csv?limit=100" -o structures.csv
# Export target components as CSV
curl "https://uxn2ycvimg.us-east-2.awsapprunner.com/target_component/csv?limit=50" -o targets.csv# Export products as TSV
curl "https://uxn2ycvimg.us-east-2.awsapprunner.com/product/tsv?limit=100" -o products.tsv
# Export synonyms as TSV
curl "https://uxn2ycvimg.us-east-2.awsapprunner.com/synonyms/tsv?limit=200" -o synonyms.tsvAll JSON endpoints support pagination via skip and limit parameters (default limit: 10).
| Endpoint | Description | Example |
|---|---|---|
/ |
Health check | curl https://uxn2ycvimg.us-east-2.awsapprunner.com/ |
/structures |
Chemical structures | curl "https://uxn2ycvimg.us-east-2.awsapprunner.com/structures?limit=5" |
/act_table_full |
Activity data | curl "https://uxn2ycvimg.us-east-2.awsapprunner.com/act_table_full?limit=5" |
/target_component |
Target components | curl "https://uxn2ycvimg.us-east-2.awsapprunner.com/target_component?limit=5" |
/product |
Drug products | curl "https://uxn2ycvimg.us-east-2.awsapprunner.com/product?limit=5" |
/synonyms |
Drug synonyms | curl "https://uxn2ycvimg.us-east-2.awsapprunner.com/synonyms?limit=5" |
All CSV endpoints support pagination via skip and limit parameters (default limit: 1000).
| Endpoint | Description | Example |
|---|---|---|
/structures/csv |
Export structures as CSV | curl "https://uxn2ycvimg.us-east-2.awsapprunner.com/structures/csv?limit=100" -o structures.csv |
/act_table_full/csv |
Export activities as CSV | curl "https://uxn2ycvimg.us-east-2.awsapprunner.com/act_table_full/csv?limit=100" -o activities.csv |
/target_component/csv |
Export targets as CSV | curl "https://uxn2ycvimg.us-east-2.awsapprunner.com/target_component/csv?limit=100" -o targets.csv |
/product/csv |
Export products as CSV | curl "https://uxn2ycvimg.us-east-2.awsapprunner.com/product/csv?limit=100" -o products.csv |
/synonyms/csv |
Export synonyms as CSV | curl "https://uxn2ycvimg.us-east-2.awsapprunner.com/synonyms/csv?limit=100" -o synonyms.csv |
All TSV endpoints support pagination via skip and limit parameters (default limit: 1000).
| Endpoint | Description | Example |
|---|---|---|
/structures/tsv |
Export structures as TSV | curl "https://uxn2ycvimg.us-east-2.awsapprunner.com/structures/tsv?limit=100" -o structures.tsv |
/act_table_full/tsv |
Export activities as TSV | curl "https://uxn2ycvimg.us-east-2.awsapprunner.com/act_table_full/tsv?limit=100" -o activities.tsv |
/target_component/tsv |
Export targets as TSV | curl "https://uxn2ycvimg.us-east-2.awsapprunner.com/target_component/tsv?limit=100" -o targets.tsv |
/product/tsv |
Export products as TSV | curl "https://uxn2ycvimg.us-east-2.awsapprunner.com/product/tsv?limit=100" -o products.tsv |
/synonyms/tsv |
Export synonyms as TSV | curl "https://uxn2ycvimg.us-east-2.awsapprunner.com/synonyms/tsv?limit=100" -o synonyms.tsv |
The API provides memory-efficient streaming export of data in CSV and TSV formats:
- Streaming Implementation: Uses Python generators to stream data without loading entire datasets into memory
- Automatic Timestamps: Downloaded files include timestamps in filenames (e.g.,
structures_20231219_143022.csv) - Proper Content Headers: Sets appropriate Content-Type and Content-Disposition headers for browser downloads
- Type Handling: Correctly handles datetime objects (ISO format) and NULL values (empty strings)
- Pagination Support: Use
skipandlimitparameters to control data ranges
All endpoints support pagination:
skip- Number of records to skip (default: 0)limit- Maximum number of records to return- JSON endpoints: default 10
- CSV/TSV endpoints: default 1000
Example:
# Get records 100-200
curl "https://uxn2ycvimg.us-east-2.awsapprunner.com/structures?skip=100&limit=100"
# Export first 5000 structures as CSV
curl "https://uxn2ycvimg.us-east-2.awsapprunner.com/structures/csv?limit=5000" -o structures.csv- Manjil Pradhan, BSc (University of New Mexico)
- Praveen Kumar, PhD (University of New Mexico)
- Jeremy Yang, PhD (University of New Mexico)
This API is part of the Illuminating the Druggable Genome (IDG) Data Coordinating Center (DCC) initiative, which develops tools and workflows for integration, harmonization, and FAIRification of IDG resources within the Common Fund Data Ecosystem (CFDE).
The Illuminating the Druggable Genome (IDG) Data Coordinating Center (DCC) develops code, tools, and workflows for integration, harmonization and FAIRification of IDG resources for access and interoperability in the Common Fund Data Ecosystem (CFDE).
Lead developer for the DRS API components is Praveen Kumar, PhD, of UNM.
The CFDE IDG DCC team is led by PIs Christophe Lambert, PhD, and Jeremy Yang, PhD, of UNM.
The Data Repository Service (DRS) API provides a generic interface to data repositories so data consumers, including workflow systems, can access data in a single, standardized way regardless of where it's stored or how it's managed. The primary functionality of DRS is to map a logical ID to a means for physically retrieving the data represented by the ID.
DRS APIs are designed for integration and interoperability with the Galaxy cloud workspace system, and being developed in cooperation with the CFDE Cloud Workspace Implementation Center (CWIC). Moreover, DRS and other industry and community standards are being employed for interoperability with CFDE centers and resources of the NIH Common Fund and beyond.
