Ir al contenido
GET /v1/search

Search titles, authors and lines

Pruébalo en vivo

10 llamadas gratis al día — sin registro, sin clave API. Pasa por el gateway de oanor.

Encabezados personalizados (opcional)
api.oanor.com/poetry-api

Funciona. Consigue una clave API y úsala en tu proyecto.

Obtener una clave API

Fragmentos de código

curl "https://api.oanor.com/poetry-api/v1/search" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/poetry-api/v1/search", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/poetry-api/v1/search");
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/search",
    headers={"x-oanor-key": "oanor_test_..."}
)

Respuesta de ejemplo

Una respuesta real de este endpoint, capturada en la última comprobación de estado.

{
    "data": {
        "count": 20,
        "limit": 20,
        "query": "love",
        "total": 1165,
        "author": null,
        "offset": 0,
        "results": [
            {
                "id": 3,
                "title": "I Have A Rendezvous With Death",
                "author": "Alan Seeger",
                "linecount": 24
            },
            {
                "id": 4,
                "title": "Ode in Memory of the American Volunteers Fallen for France",
                "author": "Alan Seeger",
                "linecount": 104
            },
            {
                "id": 5,
                "title": "Juvenilia, An Ode to Natural Beauty",
                "author": "Alan Seeger",
                "linecount": 175
            },
            {
                "id": 6,
                "title": "The Deserted Garden",
                "author": "Alan Seeger",
                "linecount": 400
            },
            {
                "id": 7,
                "title": "Paris",
                "author": "Alan Seeger",
                "linecount": 174
            },
            {
                "id": 8,
                "title": "Fragments",
                "author": "Alan Seeger",
                "linecount": 83
            },
            {
                "id": 13,
                "title": "Autumn.",
                "author": "Alexander Pope",
                "linecount": 102
            },
            {
                "id": 14,
                "title": "The Rape of the Lock:",
                "author": "Alexander Pope",
                "linecount": 804
            },
            {
                "id": 15,
                "title": "Epitaph. on General Henry Withers, in Westminster Abbey, 1729.",
                "author": "Alexander Pope",
                "linecount": 12
            },
            {
                "id": 16,
                "title": "Epitaph. on Two Lovers Struck Dead by Lightning.",
                "author": "Alexander Pope",
                "linecount": 24
            },
            {
                "id": 17,
                "title": "Book IV. Ode I. to Venus.",
                "author": "Alexander Pope",
                "linecount": 48
            },
            {
                "id": 18,
                "title": "Winter.",
                "author": "Alexander Pope",
                "linecount": 100
            },
            {
                "id": 20,
                "title": "Ode on St Cecilia's Day,",
                "author": "Alexander Pope",
                "linecount": 134
            },
            {
                "id": 21,
                "title": "An Essay on Criticism.",
                "author": "Alexander Pope",
                "linecount": 747
            },
            {
                "id": 22,
                "title": "Epistle to Robert Earl of Oxford and Earl Mortimer.",
                "author": "Alexander Pope",
                "linecount": 40
            },
            {
      
…