Draw a random word
GEThttps://api.lexema.fyi/v1/random
One random headword.
Query parameters
posstring
Only this part of speech: verb, noun, adj, ...
Responses
- 200
resultsholds one headword, or none when the release has none ofpos.
Request
curl -G -H "X-API-Key: lx_…" \
--data-urlencode "pos=noun" \
"https://api.lexema.fyi/v1/random"const params = new URLSearchParams({ "pos": "noun" });
const response = await fetch(`https://api.lexema.fyi/v1/random?${params}`, {
headers: { "X-API-Key": "lx_…" },
});
const data = await response.json();import requests
response = requests.get(
"https://api.lexema.fyi/v1/random",
params={ "pos": "noun" },
headers={ "X-API-Key": "lx_…" },
)
data = response.json()Response
200{
"release_id": "it-0c432803",
"results": [
{
"id": "it-0c432803:1",
"word": "casa",
"pos": "noun",
"pos_title": "Sostantivo",
"attribution": {
"licence": "CC BY-SA 4.0",
"licence_url": "https://creativecommons.org/licenses/by-sa/4.0/",
"source": "Wikizionario",
"source_url": "https://it.wiktionary.org/wiki/casa"
}
}
]
}