Ir al contenido
GET /v1/nap

Nap planner

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/sleep-api

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

Obtener una clave API

Fragmentos de código

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

Respuesta de ejemplo

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

{
    "data": {
        "naps": [
            {
                "type": "power nap",
                "effect": "Quick alertness boost; stays in light sleep, so little grogginess.",
                "wake_at": {
                    "time_12h": "2:35 PM",
                    "time_24h": "14:35",
                    "minute_of_day": 875
                },
                "nap_minutes": 20,
                "total_from_start": "0h 35m"
            },
            {
                "type": "short nap",
                "effect": "Refreshing, but may cause brief grogginess on waking.",
                "wake_at": {
                    "time_12h": "2:45 PM",
                    "time_24h": "14:45",
                    "minute_of_day": 885
                },
                "nap_minutes": 30,
                "total_from_start": "0h 45m"
            },
            {
                "type": "slow-wave nap",
                "effect": "Aids memory and recall; expect noticeable grogginess (sleep inertia).",
                "wake_at": {
                    "time_12h": "3:15 PM",
                    "time_24h": "15:15",
                    "minute_of_day": 915
                },
                "nap_minutes": 60,
                "total_from_start": "1h 15m"
            },
            {
                "type": "full-cycle nap",
                "effect": "A complete sleep cycle including REM; usually wake with no grogginess.",
                "wake_at": {
                    "time_12h": "3:45 PM",
                    "time_24h": "15:45",
                    "minute_of_day": 945
                },
                "nap_minutes": 90,
                "total_from_start": "1h 45m"
            }
        ],
        "advice": "For an alertness boost without grogginess, keep naps to ~20 minutes or do a full 90-minute cycle.",
        "start_at": {
            "time_12h": "2:00 PM",
            "time_24h": "14:00",
            "minute_of_day": 840
        },
        "asleep_at": {
            "time_12h": "2:15 PM",
            "time_24h": "14:15",
            "minute_of_day": 855
        },
        "disclaimer": "Informational only — sleep needs vary by individual; not medical advice.",
        "fall_asleep_minutes": 15
    },
    "meta": {
        "timestamp": "2026-06-03T17:42:01.860Z",
        "request_id": "fa4b1232-da5f-4c6c-9a8f-5dae3e4b9835"
    },
    "status": "ok",
    "message": "Nap planner",
    "success": true
}