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
- Fe spectra that include 708 eV:
/v2/spectra?element=Fe&covers_ev=708 - Spectra with beam energy and angles known, newest first:
/v2/spectra?complete=true&sort=published_at&order=desc - One spectrum:
/v2/spectra/21751
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.
| Parameter | Values | Meaning |
|---|---|---|
type | coreloss, lowloss, zeroloss, xrayabs | Spectrum type. |
technique | eels, xas | Measurement technique. |
phase | solid, liquid, gas | Specimen phase. |
element | string | Element symbol; repeat to require several (all must be present). |
edge | string | Edge, matched whole: L2,3 (any element) or Fe_L2,3. Repeat to require several. |
formula | string | Text the formula contains. |
q | string | Text in the title or description. |
author | string | Part of the contributor's name, or their profile name. |
complete | true | true: only spectra whose beam energy and both angles are known. |
monochromated | true, false | Monochromated or not. |
min_energy_ev | number | Spectra starting at or above this energy (eV). |
max_energy_ev | number | Spectra ending at or below this energy (eV). |
covers_ev | number | Spectra whose energy range includes this energy (eV). |
beam_energy_kv | number | Beam energy (kV). |
sort | formula, title, published_at, min_energy_ev, max_energy_ev, beam_energy_kv, resolution_ev, id | Sort key; missing values sort last. |
order | asc, desc | Sort direction. |
page | integer | Page number, from 1. |
per_page | integer | Spectra per page, at most 500. |
GET/spectra/{id}
One spectrum. By numeric id or by slug.