EELS Data Base API v2

Read-only JSON API with typed values: numbers are numbers, units are in the field names, and acquisition values say where they came from. No key is needed. Responses have Access-Control-Allow-Origin: *. Errors return {"error": {"code", "message"}}. Field names follow HyperSpy's metadata where they can (beam energy in kV, angles in mrad).

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

From Python

import requests
page = requests.get("https://api.eelsdb.eu/v2/spectra", params={"element": "Fe", "covers_ev": 708}).json()
for s in page["results"]:
    print(s["title"], s["acquisition"]["beam_energy"], s["download_url"])

Examples

GET/spectra

List spectra. Published spectra matching all given filters, with a total count and links to the next and previous pages. An unknown query parameter returns 400. Gas-phase spectra are included only when phase=gas is given.

ParameterValuesMeaning
typecoreloss, lowloss, zeroloss, xrayabsSpectrum type.
techniqueeels, xasMeasurement technique.
phasesolid, liquid, gasSpecimen phase.
elementstringElement symbol; repeat to require several (all must be present).
edgestringEdge, matched whole: L2,3 (any element) or Fe_L2,3. Repeat to require several.
formulastringText the formula contains.
qstringText in the title or description.
authorstringPart of the contributor's name, or their profile name.
completetruetrue: only spectra whose beam energy and both angles are known.
monochromatedtrue, falseMonochromated or not.
min_energy_evnumberSpectra starting at or above this energy (eV).
max_energy_evnumberSpectra ending at or below this energy (eV).
covers_evnumberSpectra whose energy range includes this energy (eV).
beam_energy_kvnumberBeam energy (kV).
sortformula, title, published_at, min_energy_ev, max_energy_ev, beam_energy_kv, resolution_ev, idSort key; missing values sort last.
orderasc, descSort direction.
pageintegerPage number, from 1.
per_pageintegerSpectra per page, at most 500.

GET/spectra/{id}

One spectrum. By numeric id or by slug.