/v1/random
A random poem
Probeer het live
10 gratis calls per dag — geen registratie, geen API-key. Loopt via de oanor-gateway.
Het werkt. Haal een API-key op en gebruik hem in je project.
Verkrijg een API-sleutelCodefragmenten
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_..."}
)
Voorbeeldrespons
Een echte respons van dit endpoint, vastgelegd bij de laatste 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
}