Reaction Guides

API

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:

  1. "Qstring" representation of the reaction
  2. Arrhenius $A$ parameter (or 0 if the dataset is a cross section)
  3. Temperature exponent, $n$ (or 0 if the dataset is a cross section)
  4. Arrhenius activation energy, E (or 0 if the dataset is a cross section)
  5. [This field is always 0.0]
  6. For cross sections, the HPEM identifying "magic number"; for Arrhenius parameter data sets this entry is 1 for heavy-particle collisions and -1 for processes involving electron collisions
  7. 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: native xsec (space-delimited, text) format
  • xsec_format=csv: comma-separated format
  • xsec_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=comsol may be used as a shortcut for xsec_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:

  1. Output of data in alternative file formats for compatibility with other plasma modelling software.
  2. Searching for data by identifying species through an expressive mini-language characterising atoms, molecules, ions and their quantum states.
  3. 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.