# Spraay Gateway Log Query

> Spraay Gateway Log Query is a paid API for AI agents from gateway.spraay.app, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Query and filter structured application logs by service name, log level, and time range

## Facts

- Endpoint: GET https://gateway.spraay.app/api/v1/logs/query
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/gateway-spraay-app-a93a87ba
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__kdMNpseyclP9D-AMOPVw

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability gateway-spraay-app-a93a87ba
```

Example prompt: Can you pull the last 100 error-level logs from the payment service since midnight today so I can debug what's going wrong?

## When to prefer this

Use this endpoint when you need to programmatically retrieve and filter structured application logs by service name, severity level, or time window — especially useful for debugging, incident investigation, or automated log analysis workflows within the Spraay gateway ecosystem.

## Known failure modes

- Invalid log level value returns 400 Bad Request
- Unrecognized service name may return empty results rather than an error
- Malformed 'since' timestamp format causes query failure
- Exceeding rate limits or payment failure (x402) blocks the request
- Very large limit values may be capped or cause timeout

## How this service works

Query structured logs by service, level, time.

## Output

An array of structured log entries matching the query filters, each containing at minimum the log level, service name, timestamp, and message content.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "level": "ERROR",
   "limit": "100",
   "since": "2024-01-01T00:00:00Z",
   "service": "payment-service"
  }
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "level": {
       "type": "string"
      },
      "limit": {
       "type": "string"
      },
      "since": {
       "type": "string"
      },
      "service": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "logs": {
       "type": "array"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gateway-spraay-app-a93a87ba/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gateway.spraay.app](https://www.zero.xyz/host/gateway.spraay.app/llms.txt)
