# Proton affinities in machine readable format?

Short: How to get proton affinities for a large list of chemicals? A database? A programming API?

Longer:

I have ca. 2000 chemicals (downloaded from MCM, mostly organics that occur in the atmosphere and their reaction products). I would like to try to get proton affinities for as many of the 2000 chemicals as possible.

I know how to look up the proton affinity for a chemical in the NIST Chemistry WebBook (for example isoprene). But I would prefer to get a machine readable database, or a Python API (or any programming language), to get these nicely in a program code.

What options do I have?

(I am not going to get 2000 values by hand, so my last option would be to write a small web scraper to make these 2000 web queries)

To my knowledge, a (Python) API for the NIST chemistry WebBook does not exist.

Rather than filling out the Search for Species Data by CAS Registry Number by hand, you might want to use mechanize.

But since you're only interested in Gas phase ion energetics data anyway, you might want to construct the relevant URLs directly.

Isoprene:

• What is mechanize? – Sampo Smolander Sep 17 '14 at 13:44
• @SampoSmolander Mechanize is a Python module to emulate a browser and fill out forms, even the cgi stuff on the NISTwebBook sites. But you're probably better off to construct the URLs based on the CAS numbers, use urllib2 or requests to pull the data and process it with BeautifulSoup. A decent API would make our lives much easier! – Klaus-Dieter Warzecha Sep 17 '14 at 13:47