GET/v1/hash
MD5, SHA-1, SHA-256, SHA-384 or SHA-512 of a string
The text is hashed as UTF-8 and never stored. For files, hash locally — this is for short strings and checksums.
PARAMETERS
- textquery · stringREQUIRED
- Text to hash (UTF-8)e.g. hello
- algoquery · enum
- Algorithmone of: md5, sha1, sha256, sha384, sha512
- encodingquery · enum
- Output encodingone of: hex, base64
REQUEST
curl "https://api.apialmanac.com/v1/hash?text=hello" \ -H "X-API-Key: YOUR_KEY"
import requests
r = requests.get("https://api.apialmanac.com/v1/hash?text=hello", headers={"X-API-Key": "YOUR_KEY"})
print(r.status_code, r.headers.get("X-Gw-Remaining"))
print(r.json())
const r = await fetch("https://api.apialmanac.com/v1/hash?text=hello", {
headers: { "X-API-Key": "YOUR_KEY" }
});
console.log(r.status, r.headers.get("X-Gw-Remaining"));
console.log(await r.json());
RESPONSE
200OK
{
"algo": "sha256",
"encoding": "hex",
"length": 5,
"hash": "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824"
}