/v1/random
A random poem
Provalo dal vivo
10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.
Funziona. Prendi una chiave API e usala nel tuo progetto.
Ottieni una chiave APIFrammenti di codice
curl "https://api.oanor.com/poetry-api/v1/random" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/poetry-api/v1/random", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/poetry-api/v1/random");
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/poetry-api/v1/random",
headers={"x-oanor-key": "oanor_test_..."}
)
Risposta di esempio
Una risposta reale di questo endpoint, acquisita dall'ultimo health check.
{
"data": {
"id": 1448,
"lines": [
"On this thy natal day permit a friend -",
"A brother - with thy joys his own to blend:",
"In all gladness he would wish to share",
"As willing in thy griefs a part to bear.",
"",
"Meekly attend the ways of higher heav'n!",
"Is much deny'd? Yet much my dear is giv'n.",
"Thy health, thy reason unimpaired remain",
"And while as new fal'n snows thy spotless fame",
"The partner of thy life, attentive - kind -",
"And blending e'en the interests of the mind.",
"",
"What bliss is thine when fore thy glistring eye",
"Thy lovely infant train pass jocund by!",
"The ruddy cheek, the smiling morning face",
"Denote a healthy undegenerate race:",
"In them renew'd, you'll live and live again,",
"And children's children's children lisp thy name.",
"Bright be the skies where'er my sister goes",
"Nor scowling tempests injure her repose -",
"The field of life with roses thick be strow'd",
"Nor one sharp thorn lie lurking in the road.",
"Thy ev'ry path be still a path of peace",
"And each revolving year thy joys increase;",
"Till hours and years of time itself be o'er",
"And one eternal day around thee pour."
],
"title": "On my Sister Joanna's Entrance into Her 33rd Year",
"author": "Major Henry Livingston, Jr.",
"linecount": 24
},
"meta": {
"timestamp": "2026-05-31T05:48:00.558Z",
"request_id": "e7693b87-8a78-4eaa-804d-95186aeb4857"
},
"status": "ok",
"message": "Random poem retrieved",
"success": true
}