EELS Data Base API v1

Read-only JSON API for the spectra in the EELS Data Base. No key is needed. Used by exSpy's exspy.data.eelsdb(). Responses have Access-Control-Allow-Origin: *. Errors return a JSON object with message and documentation_url.

The full description is an OpenAPI file. Base address: https://api.eelsdb.eu.

New scripts should use API v2: typed values with units in the field names, where each acquisition value came from, total counts and paging links. v1 stays as it is for exSpy and older scripts.

From Python

import exspy
spectra = exspy.data.eelsdb(spectrum_type="coreloss", element="Fe")

Examples

GET/spectra/

List spectra. Published spectra matching all given filters. /spectra (no trailing slash) works the same. An unknown query parameter returns 400. Without per_page, 50 spectra are returned; there is no total count.

ParameterValuesMeaning
typecoreloss, lowloss, zeroloss, xrayabsSpectrum type.
phasesolid, liquid, gassolid, liquid or gas. New: gas-phase spectra are listed only when phase=gas is given, so older queries return what they always did.
titlestringWords to find in the title or description. Every word must match.
authorstringComma-separated parts of contributor names or profile names. Matches any of them.
elementstringAn element symbol. Use element[] more than once to require several elements (all must be present).
formulastringText the chemical formula contains.
edgeK, L1, L2,3, M2,3, M4,5, N2,3, N4,5, O2,3, O4,5An edge name, matched whole: K matches C_K but not K_L2,3.
min_energynumberCompare the start of the energy range (eV), rounded to whole eV, with this value.
min_energy_comparegt, ge, eq, ltgt or ge: greater than or equal. eq: equal. Anything else, or missing: less than or equal.
max_energynumberCompare the end of the energy range (eV), rounded to whole eV, with this value.
max_energy_comparegt, ge, eq, ltAs min_energy_compare.
resolutionnumberCompare the energy resolution (eV), truncated to whole eV, with this value.
resolution_comparegt, ge, eq, ltAs min_energy_compare.
monochromated1, 01: monochromated spectra only. 0: non-monochromated spectra only. Other values: no filter.
per_pageintegerSpectra per page. -1 returns all.
pageintegerPage number, from 1. A page past the end returns 404.
orderstringSort key: title, author, date, or a field key such as spectrumFormula, spectrumMin, spectrumMax, beamenergy, resolution, spectrumType, microscope. Default: spectrumFormula.
order_directionASC, DESCSort direction.

GET/spectra/{slug}/

One spectrum.

GET/news/

List news posts. The news archive. It no longer changes.

GET/{post_slug}/

One news post.

GET/registered-users/

List contributors. People who contributed published spectra. No personal contact details are included.

GET/author/{user}/

One contributor.