{"uid":"cap_zFpp4cXQ74cdQFwKu8b7F","slug":"fastx402-log-pattern-parser-bb86d854","name":"FastX402 Log Pattern Parser","description":"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.","url":"https://fastx402.tools/log-pattern-parser?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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"}}}}}}}}}}},"responseSchema":{"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}}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_CbqKH-w2KgaHtVFFXm6FJ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Parses nginx, Apache, or syslog log entries and returns structured fields plus aggregate statistics per status code and error type.","exampleAgentPrompt":"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\"'","exampleUseCases":[{"title":"Triage 500 errors from production logs","prompt":"I've got a chunk of nginx access logs from our production server and I need to pull out all the 500 errors with their paths and timestamps — here are the raw lines, can you parse them and summarize the error counts?"},{"title":"Audit failed logins from Apache logs","prompt":"Parse these Apache access log entries and show me all the 401 responses — I want to see which IPs are hitting the login endpoint and failing."},{"title":"Structure syslog for downstream analysis","prompt":"I have a batch of syslog entries from our backend servers that I need converted into structured JSON fields so I can feed them into a database — can you parse them in syslog format and return the parsed records plus total line statistics?"}],"resultDescription":"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).","failureModes":["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"],"whenToPreferThis":"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).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T06:43:46.154Z","isFirstParty":false,"canonicalSlug":"fastx402-log-pattern-parser-bb86d854"}