← 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":"H", "multiplicity":"q", "solvent":"cdcl3", "ppm":"3.6"}' NMRpeaks.com/api/

You should see something like this as a response:

{"number_of_results":2,"top_result":"diethyl ether","results":[{"name":"diethyl ether","peaks":[{"integration":"2","multiplet":"q","ppm":"3.48"},{"integration":"3","multiplet":"t","ppm":"1.21"}]},{"name":"ethanol","peaks":[{"integration":"2","multiplet":"q","ppm":"3.72"},{"integration":"1","multiplet":"s","ppm":"1.32"},{"integration":"3","multiplet":"t","ppm":"1.25"}]}]}

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 "errors" and key-value pairs for input parameters and whether or not each was valid.


Query JSON example:

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

Return JSON example:

{"number_of_results":2,"top_result":"diethyl ether","results":[{"name":"diethyl ether","peaks":[{"integration":"2","multiplet":"q","ppm":"3.48"},{"integration":"3","multiplet":"t","ppm":"1.21"}]},{"name":"ethanol","peaks":[{"integration":"2","multiplet":"q","ppm":"3.72"},{"integration":"1","multiplet":"s","ppm":"1.32"},{"integration":"3","multiplet":"t","ppm":"1.25"}]}]}





home | about | privacy | API | iOS and Mac Apps | Android App