Accessing Reaction DataSets through the API
Current usage
The URL for API requests is
/reactions/api/
Requests are made using the GET protocol; an API key must be provided as the argument to the key parameter.
There are two main methods for retrieving data:
(1) if the dataset IDs are known (these are the values preceded by D in the web-based view of the QuantemolDB data), they can be passed as a comma-separated sequence of values to the dataset parameter. For example,
/reactions/api/?key=XXXX-XXXX-XXXX-XXXX&datasets=7,9,2789,346
(where XXXX-XXXX-XXXX-XXXX should be replaced by a valid API key).
(2) To search for all datasets relating to all reactions involving a specified set of species and only those species, provide a comma-separated sequence of "Qsymbol" species identifiers to the qsymbols parameter. There is no need to explicitly include the electron in the list:
/reactions/api/?key=XXXX-XXXX-XXXX-XXXX&qsymbols=AR,AR^,H,AR2^
Output, by default is to the Q-VT compatible format given in the example below:
AR + AR^ > AR + AR^ : 5.6600e-10 ; 0.50 & 0.00 ] 0.0 [ 1 ! QDB-API
The fields are separated by the characters :, ;, &, ], [, and ! and are:
- "Qstring" representation of the reaction
- Arrhenius $A$ parameter (or 0 if the dataset is a cross section)
- Temperature exponent, $n$ (or 0 if the dataset is a cross section)
- Arrhenius activation energy, E (or 0 if the dataset is a cross section)
- [This field is always
0.0] - For cross sections, the HPEM identifying "magic number"; for Arrhenius parameter data sets this entry is
1for heavy-particle collisions and-1for processes involving electron collisions - The string "QDB-API".
Alternative output formats
To return a zip archive of data in the above format along with the actual cross section data files, specify the format in the GET request as follows:
xsec_format=xsec: nativexsec(space-delimited, text) formatxsec_format=csv: comma-separated formatxsec_format=lxcat: LXCat-compatible format (beta version; under development)
Additionally, Arrhenius parameter data may be returned in CHEMKIN compatible format (beta version; under development) by specifying:
arrhenius_format=chemkin
Further notes:
- The specification
format=comsolmay be used as a shortcut forxsec_format=lxcat&arrhenius_format=chemkin.
Reaction search results JSON
The website reaction search table uses an unauthenticated JSON endpoint:
/reactions/search/results/
Search species are supplied as repeated query parameters. Use r for reactants, p for products, and a for either side of the reaction. Values are tokens of the form formula:O2 for all states of an chemical formula or rp:123 for one specific reactant/product state record.
For example:
/reactions/search/results/?a=formula:O2
By default this endpoint returns the full reaction-search row payload for backwards compatibility. For table views or other clients that only need display and filtering fields, add compact=1:
/reactions/search/results/?a=formula:O2&compact=1
The compact response keeps the same top-level JSON shape, with tokens, rows, and total. Each compact row includes id, qualified_id, url, html, process fields, compact reactant/product display lists, reactant/product formula and id lists, and cross-section/rate-data availability flags. It omits heavier compatibility fields such as latex and detailed nested reactant/product metadata.
Future improvements
In the near future the QDB-API will support:
- Output of data in alternative file formats for compatibility with other plasma modelling software.
- Searching for data by identifying species through an expressive mini-language characterising atoms, molecules, ions and their quantum states.
- Output of multiple datasets for each reaction, or (optionally) only the output of the Quantemol "recommended" dataset in each case.
Chemistry API
Chemistry reactions in Q-VT compatible format: pass the ID of a Chemistry to the chemistry_id parameter, for example:
/reactions/api/?key=XXXX-XXXX-XXXX-XXXX&chemistry_id=4
(where XXXX-XXXX-XXXX-XXXX should be replaced by a valid API key).
By default, where a reaction has a cross section dataset, this is returned in preference to the set of Arrhenius parameters fitted to it. To return only Arrhenius parameters, use the no_xsecs=true option. To return all datasets associated with a Chemistry, use all_datasets=true.