Skip to content

GNPS API Overview

GNPS Library Spectra

All Public Library Spectra at GNPS

https://gnps-external.ucsd.edu/gnpslibraryjson

All Public Library Specta at GNPS with Peaks and Annotation History

https://gnps-external.ucsd.edu/gnpslibrary/ALL_GNPS.json

Example JSON Format
[
    {
        "spectrum_id": "CCMSLIB00000579358",
        "source_file": "Training_001.mgf",
        "task": "03c206430208430c887ca025ea6c3641",
        "scan": "1",
        "ms_level": "2",
        "library_membership": "CASMI",
        "spectrum_status": "1",
        "peaks_json": "[[164.033997,32294.500000],[179.057495,129907.101562]]",
        "splash": "null-null-null-null",
        "submit_user": "lfnothias",
        "Compound_Name": "Theophyllin",
        "Ion_Source": "LC-ESI",
        "Compound_Source": "Commercial",
        "Instrument": "Orbitrap",
        "PI": "CASMI",
        "Data_Collector": "CASMI2016",
        "Adduct": "M-H",
        "Scan": "-1",
        "Precursor_MZ": "179.057",
        "ExactMass": "0.0",
        "Charge": "1",
        "CAS_Number": "N/A",
        "Pubmed_ID": "33919",
        "Smiles": "CN1C2=C(NC=N2)C(=O)N(C)C1=O",
        "INCHI": "\"InChI=1S/C7H8N4O2/c1-10-5-4(8-3-9-5)6(12)11(2)7(10)13/h3H,1-2H3,(H,8,9)\"",
        "INCHI_AUX": "N/A",
        "Library_Class": "1",
        "SpectrumID": "CCMSLIB00000579358",
        "Ion_Mode": " Negative",
        "create_time": "2016-05-24 18:27:20.0",
        "task_id": "03c206430208430c887ca025ea6c3641",
        "user_id": "null",
        "InChIKey_smiles": "ZFXYFBGIUFBOJW-UHFFFAOYSA-N",
        "InChIKey_inchi": "None",
        "Formula_smiles": "C7H8N4O2",
        "Formula_inchi": "",
        "url": "https://gnps.ucsd.edu/ProteoSAFe/gnpslibraryspectrum.jsp?SpectrumID=CCMSLIB00000579358",
        "annotation_history": [
            {
                "Compound_Name": "Theophyllin",
                "Ion_Source": "LC-ESI",
                "Compound_Source": "Commercial",
                "Instrument": "Orbitrap",
                "PI": "CASMI",
                "Data_Collector": "CASMI2016",
                "Adduct": "M-H",
                "Scan": "-1",
                "Precursor_MZ": "179.057",
                "ExactMass": "0.0",
                "Charge": "1",
                "CAS_Number": "N/A",
                "Pubmed_ID": "33919",
                "Smiles": "CN1C2=C(NC=N2)C(=O)N(C)C1=O",
                "INCHI": "\"InChI=1S/C7H8N4O2/c1-10-5-4(8-3-9-5)6(12)11(2)7(10)13/h3H,1-2H3,(H,8,9)\"",
                "INCHI_AUX": "N/A",
                "Library_Class": "1",
                "SpectrumID": "CCMSLIB00000579358",
                "Ion_Mode": " Negative",
                "create_time": "2016-05-24 18:27:20.0",
                "task_id": "03c206430208430c887ca025ea6c3641",
                "user_id": "lfnothias"
            }
        ]
    }
]

As MGF

https://gnps-external.ucsd.edu/gnpslibrary/ALL_GNPS.mgf

Example MGF Format
BEGIN IONS
PEPMASS=407.186
CHARGE=1
MSLEVEL=2
SOURCE_INSTRUMENT=LC-ESI-qTof
FILENAME=Plate1_1_20_GG1_01_16488.mzXML
SEQ=*..*
IONMODE=Positive
ORGANISM=GNPS-SELLECKCHEM-FDA-PART2
NAME=Bortezomib (Velcade) [M+Na]
PI=Dorrestein
DATACOLLECTOR=Garg_Neha
SMILES=C1=CN=CC(=N1)C(N[C@H](C(N[C@H](B(O)O)CC(C)C)=O)CC2=CC=CC=C2)=O
INCHI=N/A
INCHIAUX=N/A
PUBMED=N/A
SUBMITUSER=negarg
LIBRARYQUALITY=1
SPECTRUMID=CCMSLIB00000077995
SCANS=1211
95.886879   236.0
131.058121  188.0
144.823196  204.0
...
1402.281494 144.0
END IONS

As MSP

https://gnps-external.ucsd.edu/gnpslibrary/ALL_GNPS.msp

Single Library Spectrum

https://gnps.ucsd.edu/ProteoSAFe/SpectrumCommentServlet?SpectrumID=<Library Accession>

Example

GNPS Jobs

Job Results API

GNPS job results page in JSON format:

https://gnps.ucsd.edu/ProteoSAFe/result_json.jsp?task=<task id>&view=<view name>

Example

Structure Conversion

Conversion to Smiles

https://gnps-structure.ucsd.edu/smiles?inchi=<inchi string>

Example

Conversion to InChI

https://gnps-structure.ucsd.edu/inchi?smiles=<smiles string>

Example

Conversion to InChIKey

https://gnps-structure.ucsd.edu/inchikey?smiles=<smiles string>

Example

Conversion to exact mass

https://gnps-structure.ucsd.edu/structuremass?smiles=<smiles string>

Example

Conversion to formula

https://gnps-structure.ucsd.edu/formula?smiles=<smiles string>

Example

Structure Classyfire

If you have Smiles

https://gnps-structure.ucsd.edu/classyfire?smiles=<smiles string>

Example

If you have InChI

https://gnps-structure.ucsd.edu/classyfire?inchi=<InChI string>

Example

If you have InChI Key

https://gnps-classyfire.ucsd.edu/entities/<InChI Key>.json

Example

Additionally, in case the inchikey is not classified, you can provide smiles or inchi arguments for us to push to the Wishart servers to classify.

ClassyFire

ClassyFire is tool from the Wishart Lab - check it out here. Here is the recommended citation: Feunang, Yannick Djoumbou, Roman Eisner, Craig Knox, Leonid Chepelev, Janna Hastings, Gareth Owen, Eoin Fahy et al. "ClassyFire: automated chemical classification with a comprehensive, computable taxonomy." Journal of cheminformatics 8, no. 1 (2016): 61.

Structure Image

https://gnps-structure.ucsd.edu/structureimg?smiles=<smiles string>

Example

ReDU

Per File Sample Information Query

https://redu.ucsd.edu/filename?query=<File full path in MassIVE>

Example

Page Contributions

Ming Wang


Last update: July 7, 2020 21:48:03