
Axiom Has a Free API: Here's How to Query and Analyze Your Logs Programmatically
What is Axiom? Axiom is a modern log management and analytics platform that handles petabytes of data with zero configuration. Unlike traditional logging tools, Axiom stores everything and lets you query it in real-time. The free tier gives you 500 GB/month of ingest — and the API is fully open for programmatic access. Getting Started npm install @axiomhq/js Send Logs import { Axiom } from " @axiomhq/js " ; const axiom = new Axiom ({ token : process . env . AXIOM_TOKEN , orgId : process . env . AXIOM_ORG_ID , }); await axiom . ingest ( " my-app-logs " , [ { level : " info " , message : " User signed up " , userId : " usr_123 " , plan : " pro " , _time : new Date (). toISOString (), }, { level : " error " , message : " Payment failed " , userId : " usr_456 " , error : " card_declined " , _time : new Date (). toISOString (), }, ]); await axiom . flush (); Query with APL (Axiom Processing Language) const result = await axiom . query ( `["my-app-logs"] | where level == "error" | where _tim
Continue reading on Dev.to JavaScript
Opens in a new tab


