We have previously rolled out a number of web services integrating to ChemSpider (1,2,3). This was recently extended by unveiling the MassSpec API. Details are below.

  • GetCompoundDetails
    Return specified compound details.
  • GetDatabases
    Get the list of datasources in ChemSpider.
  • SearchByFormula
    Search ChemSpider compounds by molecular formula. Search within specified datasources (if given).
  • SearchByFormula2
    Search ChemSpider compounds by molecular formula.
  • SearchByMass
    Search ChemSpider compounds by mass +/- range. Search within specified datasources (if given).
  • SearchByMass2
    Search ChemSpider compounds by mass +/- range.
  • With these web services it is now feasible for mass spectrometrists to integrate their own software systems directly to ChemSpider for their own purposes. If anyone is interested in integrating via the MassSpecAPI please contact us at info|AT|chemspider.com

    Stumble it!

    8 Responses to “The Mass Spectrometry Web Services Interface to ChemSpider”

    1. Egon Willighagen says:

      One problem with the current response of GetCompoundDetails is that the fields are all wrapped in the same element… now I can assume that the SMILES is always the second element, but this is suboptimal.

    2. Egon Willighagen says:

      Actually… seems to apply to not just that service. This is the output for GetRecordDetails:

      1269250
      OORFINRYBCDBEN-IXJKMYCHCG
      InChI=1/C9H10O3/c1-12-6-7-2-4-8(5-3-7)9(10)11/h2-5H,6H2,1H3,(H,10,11)/p-1/fC9H9O3/q-1
      [O-]C(=O)c1ccc(cc1)COC

    3. Egon Willighagen says:

      <ArrayOfAnyType>
      <anyType xsi:type=”xsd:int”>1269250</anyType>
      <anyType xsi:type=”xsd:string”>OORFINRYBCDBEN-IXJKMYCHCG</anyType>
      <anyType xsi:type=”xsd:string”>InChI=1/C9H10O3/c1-12-6-7-2-4-8(5-3-7)9(10)11/h2-5H,6H2,1H3,(H,10,11)/p-1/fC9H9O3/q-1</anyType>
      <anyType xsi:type=”xsd:string”>[O-]C(=O)c1ccc(cc1)COC</anyType>
      </ArrayOfAnyType>

    4. Developer at ChemSpider says:

      Egon, this API may change, it was just the first version to let people try it and start getting feedback. How’d you change it?

    5. Egon Willighagen says:

      The above example, I’d do something like:

      <cid xsi:type=”xsd:int”>1269250</cid>
      <inchikey xsi:type=”xsd:int”>OORFINRYBCDBEN-IXJKMYCHCG</inchikey>

      Etc. Likewise for the metabolomics services:

      <GetCompoundDetailsResponse xmlns=”http://www.chemspider.com/”>
      <GetCompoundDetailsResult>
      <formula>C_{50}H_{70}O_{2}&lt/string>
      <smiles>O=C\2c1c(cccc1)C(=O)/C(=C/2)CC=C(C)CCC=C(C)CCC=C(C)CCC=C(C)CCC=C(C)CCC=C(C)CCC=C(C)CC\C=C(/C)C</smiles>
      <accurateMass>702.537581</accurateMass>

      etc.

    6. Mitch Chapman says:

      BTW what are the current meanings of the fields? Some are obvious, but others (esp. those which come back blank :) are not.

      C_{19}H_{19}NO_{2}S
      O=S(=O)(c3ccc(c2ccc(n2c1ccc(cc1)C)C)cc3)C
      InChI=1/C19H19NO2S/c1-14-4-9-17(10-5-14)20-15(2)6-13-19(20)16-7-11-18(12-8-16)23(3,21)22/h4-13H,1-3H3
      JULPDIIDMNHGEC-UHFFFAOYAA
      325.4247
      325.4247
      325.113649
      325

      4.8
      2-methyl-5-(4-methylsulfonylphenyl)-1-(p-tolyl)pyrrole

    7. Antony Williams says:

      Mitch… This web method:

      List GetCompoundDetails(string csid)

      Returns the following list of fields:

      MF,
      SMILES,
      InChI,
      InChIKey,
      Average_Mass,
      Molecular_Weight,
      Monoisotopic_Mass,
      Nominal_Mass,
      ALogP,
      XLogP,
      CommonName

      We will be changing the MassSpecAPI soon:

      The methods will accept a user token (UUID) to allow us to identify what users are performing what activities so we can help people and monitor usage appropriately

      Also, this will report errors back to us

      Also we will provide additional capabilities with this procedure.

      Are there any improvement requests?

    8. Mitch Chapman says:

      Thanks for the info.

      I don’t have any improvement requests of my own, but will second Egon’s suggestion to provide ‘self-documenting’ tags.

    Leave a Reply