/v1/spacing
d-spacing from angle
Try it live
10 free calls per day — no sign-up, no API key. Goes through the oanor gateway.
It works. Grab an API key and use it in your project.
Get an API keyCode snippets
curl "https://api.oanor.com/bragg-api/v1/spacing" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/bragg-api/v1/spacing", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/bragg-api/v1/spacing");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/bragg-api/v1/spacing",
headers={"x-oanor-key": "oanor_test_..."}
)
Example response
A real response from this endpoint, captured by the latest health check.
{
"data": {
"note": "Inter-planar spacing d = n·λ/(2·sinθ). This is how a crystal's lattice spacing is read off an XRD peak.",
"inputs": {
"order": 1,
"theta_deg": 22.655,
"wavelength_nm": 0.15406
},
"spacing_nm": 0.19998371,
"spacing_angstrom": 1.999837
},
"meta": {
"timestamp": "2026-06-05T19:50:23.819Z",
"request_id": "36c08afd-efaf-4aef-8304-2ec7eef4eef5"
},
"status": "ok",
"message": "d-spacing",
"success": true
}