Logyak

Docs

Read API

Search your logs from your own code, scripts and dashboards, with the same language as the search bar. Every route only reads.

Authentication

Create a key under Settings → API keys and send it as a bearer token. A key belongs to one workspace, reads every source in it, and is shown once. The read API is part of every paid plan; each workspace may make 300 requests a minute.

Header
Authorization: Bearer gl_live_xxxxxxxxxxxxxxxxxxxxxxxx

Base URL: https://logyak.com. Sending logs is different: it uses a source's ingest token, see the HTTP API guide.

GET

/api/v1/logs

Lines that match a search, newest first.

FieldTypeDescription
qstringA search, as in the search bar (see Search syntax). Empty returns every line in the range.
rangestring15m, 1h, 6h, 24h (default), 3d, 7d, 14d, 30d or 90d.
from, toISO 8601An exact window instead of range.
sourcestringOnly this source, by name.
limitnumber1 to 500, default 100.
beforestringThe paging cursor from next_before.
Request
curl "https://logyak.com/api/v1/logs?q=status:5xx%20service:api&range=6h&limit=50" \
  -H "Authorization: Bearer $LOGYAK_API_KEY"
Response
{
  "statusCode": 200,
  "success": true,
  "message": "Logs.",
  "data": {
    "logs": [
      { "id": "918273", "source": "shop-api", "ts": "2026-11-14T03:12:08.113Z", "level": "ERROR", "kind": "HTTP",
        "service": "api", "host": "api.example.com", "message": "POST /api/orders 504 30012ms",
        "http_method": "POST", "http_path": "/api/orders", "http_status": 504, "duration_ms": 30012,
        "request_id": "r_8f2k1", "attrs": { "edge_region": "asia-southeast1" } }
    ],
    "next_before": "2026-11-14T03:12:08.113Z|918273",
    "range": { "from": "2026-11-13T21:12:08.000Z", "to": "2026-11-14T03:12:08.000Z" }
  }
}

To page back, send before with the next_before of the last answer until it is null.

GET

/api/v1/me

The workspace the key belongs to, its plan, how many sources it has, the key's name, prefix and expiry, and the rate limit. Never the key itself.

Request
curl "https://logyak.com/api/v1/me" -H "Authorization: Bearer $LOGYAK_API_KEY"

Errors

FieldTypeDescription
400Bad requestAn unknown field, range or cursor. The body names it.
401UnauthorizedThe key is missing, wrong, revoked or expired.
402Payment requiredThe workspace's plan does not include the read API.
404Not foundNo source with that name in the key's workspace.
429Too many requestsRate limit reached. Wait a minute and retry.