← back

API

NMR Solvent Peaks provides a web API for parsing searches. If you wish to integrate the data that NMR Solvent Peaks provides, you can submit a properly formatted search query and receive data corresponding to likely peak identities.

Updates to the API are anticipated, so each version will have specific requriements for query formatting and may return data with different structures. Every attempt will be made to retain backwards-compatibility; if you write a script or app against a particular version of the API, I will try not to break it.

If you plan to heavily use the API for an application at scale, please contact me.


API Demo

Want to try the web API? Paste the following block of code into a terminal window:

curl --header "Content-Type: application/json" --request POST --data '{"api_version":"1.0", "identifier":"web_test", "mode":"1H", "multiplicity":"q", "solvent":"cdcl3", "ppm":"3.6"}' NMRpeaks.com/api

You should see something like this as a response:

{"results":[{"name":"diethyl ether","ppms":["3.48","1.21"],"integrations":["2","3"],"multiplicities":["q","t"]},{"name":"ethanol","ppms":["3.72","1.32","1.25"],"integrations":["2","1","3"],"multiplicities":["q","s","t"]}],"top_result":"diethyl ether","number_of_results":"2"}

Try playing around with the values in mode, multiplicity, solvent, and ppm! Be careful though, an invalid or poorly formatted query will result in an error message.


API Version History

Version 1.0

Query specifications:

Queries must be submitted as properly-formatted JSON with the following keys:

All letters are lowercase (except mode), and all numbers are "normal" (no subscripts). The parser will try to fix issues with case, but no promises.


Return specifications:

Return values will be JSON with the following keys. All values are formatted as strings.

Return values for incomplete or improperly formatted queries will be JSON with the key "error" and value corresponding to the error type.


Query JSON example:

{"api_version":"1.0", "identifier":"your_app_name", "mode":"1H", "multiplicity":"q", "solvent":"cdcl3", "ppm":"3.6"}

Return JSON example:

{"results":[{"name":"diethyl ether","ppms":["3.48","1.21"],"integrations":["2","3"],"multiplicities":["q","t"]},{"name":"ethanol","ppms":["3.72","1.32","1.25"],"integrations":["2","1","3"],"multiplicities":["q","s","t"]}],"top_result":"diethyl ether","number_of_results":"2"}





home | about | privacy | API | iOS App