3

I'm trying to write a python script that retrieves boiling points, melting points, molecular weight, chemical structure, and density for chemical compounds I input.

I was looking through databases and found chemspipy and PubChemPy, but neither have the ability to retrieve all of the properties I need.

I have part of a script that uses chemspipy written, that works fine:

from chemspipy import ChemSpider
import urllib


cs = ChemSpider('my_token')

def getImage(compound):
    c = cs.search(compound)[0]
    imgUrl = c.image_url
    urllib.request.urlretrieve(imgUrl, c.common_name + '.png')

def getWeight(compound):
    c = cs.search(compound)[0]
    return(c.molecular_weight)

But I still need to find a way to retrieve boiling / melting points.

(This is my first question on here, so apologies if it's in the wrong place!)

Alex L
  • 367
  • 2
  • 14

2 Answers2

1

I don't know anything at all about chemistry, but a quick google search got me this:

https://materialsproject.org/docs/api

This is not really a python question though, you might want to edit your tags.

//edit In general, googling "chemistry information API" got me lots of results, I'm sure there's one in there that fits your needs.

N. Walter
  • 99
  • 3
0

The CAS Registry is probably the canonical place to look: https://www.cas.org/content/chemical-substances. The last I tried (about 3years ago, 2014), it didn't appear that they have a clean public API. They do sell a tool called SciFinder to explore their data.

dbn
  • 13,144
  • 3
  • 60
  • 86