# FastX402 Log Pattern Parser

> FastX402 Log Pattern Parser is a paid API for AI agents from fastx402.tools, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-29).

Parses nginx, Apache, or syslog log entries and returns structured fields plus aggregate statistics per status code and error type.

## Facts

- Endpoint: GET https://fastx402.tools/log-pattern-parser?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastx402-log-pattern-parser-bb86d854
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zFpp4cXQ74cdQFwKu8b7F

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 fastx402-log-pattern-parser-bb86d854
```

Example prompt: Parse these nginx access log lines for me and give me the breakdown of status codes — here are the entries: '192.168.1.1 - - [18/Oct/2026:10:15:32 +0000] "GET /api/users HTTP/1.1" 200 1234 "-" "Mozilla/5.0"\n192.168.1.2 - - [18/Oct/2026:10:15:33 +0000] "POST /api/login HTTP/1.1" 401 89 "-" "curl/7.68.0"'

## When to prefer this

Choose this endpoint when you need to convert raw nginx, Apache, or syslog text into structured JSON without standing up a log aggregation pipeline or obtaining API keys — particularly useful for on-demand, pay-per-call log parsing in agent workflows where log volumes are moderate (under 50KB per call).

## Known failure modes

- Unsupported format value (not nginx/apache/syslog) causes parsing failure or empty results
- Log lines exceeding 50KB limit are truncated or rejected
- Malformed or non-standard log lines appear in failed_lines count without structured output
- Mismatched format parameter (e.g. nginx format passed with syslog lines) results in high failed_lines and sparse parsed output
- Empty logs query parameter returns empty parsed array

## How this service works

200 pay-per-call tools for AI agents, from $0.001 per request in USDC on Base or Solana with x402. No account, no API key.

## Output

A JSON object with two top-level keys: 'parsed' (an array of objects, each with fields: remote_addr, time, method, path, protocol, status, bytes, user_agent) and 'statistics' (an object with total_lines, parsed_lines, failed_lines, status_counts broken down by HTTP status code, and error_counts).

## 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",
     "required": [
      "format",
      "logs"
     ],
     "properties": {
      "logs": {
       "type": "string",
       "description": "Newline-separated log entries to parse (max 50KB)"
      },
      "format": {
       "type": "string",
       "description": "Log format: \"nginx\", \"apache\", or \"syslog\""
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "parsed": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "path": {
          "type": "string"
         },
         "time": {
          "type": "string"
         },
         "bytes": {
          "type": "integer"
         },
         "method": {
          "type": "string"
         },
         "status": {
          "type": "integer"
         },
         "protocol": {
          "type": "string"
         },
         "user_agent": {
          "type": "string"
         },
         "remote_addr": {
          "type": "string"
         }
        }
       }
      },
      "statistics": {
       "type": "object",
       "properties": {
        "total_lines": {
         "type": "integer"
        },
        "error_counts": {
         "type": "object",
         "properties": {}
        },
        "failed_lines": {
         "type": "integer"
        },
        "parsed_lines": {
         "type": "integer"
        },
        "status_counts": {
         "type": "object",
         "properties": {
          "200": {
           "type": "integer"
          },
          "401": {
           "type": "integer"
          },
          "500": {
           "type": "integer"
          }
         }
        }
       }
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "parsed": [
   {
    "path": "/api/users",
    "time": "18/Oct/2026:10:15:32 +0000",
    "bytes": 1234,
    "method": "GET",
    "status": 200,
    "protocol": "HTTP/1.1",
    "user_agent": "Mozilla/5.0",
    "remote_addr": "192.168.1.1"
   },
   {
    "path": "/api/login",
    "time": "18/Oct/2026:10:15:33 +0000",
    "bytes": 89,
    "method": "POST",
    "status": 401,
    "protocol": "HTTP/1.1",
    "user_agent": "curl/7.68.0",
    "remote_addr": "192.168.1.2"
   },
   {
    "path": "/api/data",
    "time": "18/Oct/2026:10:15:34 +0000",
    "bytes": 456,
    "method": "GET",
    "status": 500,
    "protocol": "HTTP/1.1",
    "user_agent": "Mozilla/5.0",
    "remote_addr": "192.168.1.1"
   }
  ],
  "statistics": {
   "total_lines": 3,
   "error_counts": {},
   "failed_lines": 0,
   "parsed_lines": 3,
   "status_counts": {
    "200": 1,
    "401": 1,
    "500": 1
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastx402-log-pattern-parser-bb86d854/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fastx402.tools](https://www.zero.xyz/host/fastx402.tools/llms.txt)
