Back to Claude Scientific Skills

Metabolomics Workbench REST API

scientific-skills/database-lookup/references/metabolomics-workbench.md

2.38.03.3 KB
Original Source

Metabolomics Workbench REST API

Base URL

https://www.metabolomicsworkbench.org/rest/

Auth

No API key required. Fully public.

URL Structure

/rest/{context}/{input_item}/{input_value}/{output_item}

Contexts: study, compound, refmet, gene, protein, moverz, exactmass

Key Endpoints

Study Context

URL PatternDescription
/rest/study/study_id/{ST_ID}/summaryStudy summary metadata
/rest/study/study_id/{ST_ID}/metabolitesMetabolites in a study
/rest/study/study_id/{ST_ID}/analysisAnalysis details
/rest/study/study_id/{ST_ID}/factorsExperimental factors
/rest/study/study_id/{ST_ID}/dataNamed metabolite data matrix
/rest/study/study_id/{ST_ID}/speciesSpecies information
/rest/study/study_id/{ST_ID}/diseaseDisease information
/rest/study/study_title/{keyword}/summarySearch studies by title keyword
/rest/study/study_type/{type}/summarySearch by study type
/rest/study/analysis_id/{AN_ID}/summarySummary by analysis ID

Study IDs: ST###### (e.g., ST000001). Analysis IDs: AN######.

Compound Context

URL PatternDescription
/rest/compound/name/{NAME}/summarySearch compound by name
/rest/compound/pubchem_cid/{CID}/summarySearch by PubChem CID
/rest/compound/hmdb_id/{HMDB_ID}/summarySearch by HMDB ID
/rest/compound/kegg_id/{KEGG_ID}/summarySearch by KEGG ID
/rest/compound/inchi_key/{KEY}/summarySearch by InChI key
/rest/compound/regno/{REGNO}/classificationCompound classification
/rest/compound/regno/{REGNO}/molfileMOL file (structure)

RefMet (Standardized Nomenclature)

URL PatternDescription
/rest/refmet/name/{NAME}/allFull RefMet record
/rest/refmet/match/{NAME}/nameMatch name to standardized RefMet name

Gene / Protein Context

URL PatternDescription
/rest/gene/gene_symbol/{SYMBOL}/allGene info by symbol
/rest/gene/gene_id/{ID}/allGene info by Entrez ID
/rest/protein/uniprot_id/{ID}/allProtein by UniProt ID

Mass Search (MoverZ / ExactMass)

/rest/moverz/mz/{MZ_VALUE}/tol/{TOLERANCE}/mode/{pos|neg}
/rest/exactmass/mass/{MASS_VALUE}/tol/{TOLERANCE}

Example Calls

# Study summary
https://www.metabolomicsworkbench.org/rest/study/study_id/ST000001/summary

# Metabolites in a study
https://www.metabolomicsworkbench.org/rest/study/study_id/ST000001/metabolites

# Search studies by title
https://www.metabolomicsworkbench.org/rest/study/study_title/diabetes/summary

# Compound by name
https://www.metabolomicsworkbench.org/rest/compound/name/glucose/summary

# Compound by PubChem CID
https://www.metabolomicsworkbench.org/rest/compound/pubchem_cid/5793/summary

# RefMet standardized name match
https://www.metabolomicsworkbench.org/rest/refmet/match/alpha-D-Glucose/name

# m/z search in positive mode
https://www.metabolomicsworkbench.org/rest/moverz/mz/175.0354/tol/0.005/mode/pos

# Exact mass search
https://www.metabolomicsworkbench.org/rest/exactmass/mass/174.0282/tol/0.005

Response Format

Default is JSON. mwtab output returns MWTab text. molfile returns MOL/SDF text. No pagination — full results returned.

Rate Limits

No published limits. Be reasonable. Add 0.5-1s delay for batch calls.