npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

parserator-sdk

v1.0.0

Published

Official Node.js SDK for Parserator - Intelligent data parsing using the Architect-Extractor pattern

Readme

Parserator Node.js SDK

Intelligent data parsing using the revolutionary Architect-Extractor pattern

Transform any unstructured data into clean, structured JSON with AI-powered precision. The Parserator SDK implements a sophisticated two-stage LLM approach that maximizes accuracy while minimizing token costs.

npm version License Node.js

<� The Architect-Extractor Revolution

Parserator uses a groundbreaking two-LLM approach that outperforms traditional single-model parsing:

<� The Architect (LLM 1)

  • Job: Create a detailed parsing plan
  • Input: Your desired schema + small data sample (~1000 chars)
  • Output: Structured SearchPlan with precise extraction instructions
  • Benefit: Complex reasoning on minimal data = ultra-low token cost

� The Extractor (LLM 2)

  • Job: Execute the parsing plan
  • Input: Full data + the Architect's SearchPlan
  • Output: Final structured JSON, validated against the plan
  • Benefit: Direct execution with minimal "thinking" = maximum efficiency

Result: 70% reduction in token usage while achieving 95%+ accuracy rates.

=� Quick Start

Installation

npm install @parserator/node-sdk

Basic Usage

const { ParseratorClient } = require('@parserator/node-sdk');

const client = new ParseratorClient({
  apiKey: 'pk_live_your_api_key_here'
});

const result = await client.parse({
  inputData: `
    John Smith
    Senior Developer
    [email protected]
    (555) 123-4567
  `,
  outputSchema: {
    name: 'string',
    title: 'string', 
    email: 'email',
    phone: 'phone'
  }
});

console.log(result.parsedData);
// {
//   name: "John Smith",
//   title: "Senior Developer",
//   email: "[email protected]",
//   phone: "(555) 123-4567"
// }

Quick Parse Helper

const { quickParse } = require('@parserator/node-sdk');

const result = await quickParse(
  'pk_live_your_api_key_here',
  'Raw unstructured data here...',
  { name: 'string', email: 'email' },
  'Extract contact information'
);

=� Key Features

  • > Two-Stage AI Processing: Architect-Extractor pattern for maximum efficiency
  • =� Token Optimization: 70% reduction in token costs vs traditional parsing
  • <� High Accuracy: 95%+ parsing accuracy on structured and semi-structured data
  • � Batch Processing: Process multiple documents concurrently
  • =� Pre-built Presets: Optimized schemas for emails, invoices, contacts, logs
  • = TypeScript Ready: Full type definitions included
  • =� Error Handling: Comprehensive error types and retry logic
  • =� Usage Analytics: Track token usage and performance metrics

=� API Reference

ParseratorClient

const client = new ParseratorClient({
  apiKey: 'pk_live_...', // Required: Your API key
  baseUrl: 'https://api.parserator.com', // Optional: Custom API URL
  timeout: 30000, // Optional: Request timeout (ms)
  retries: 3, // Optional: Max retry attempts
  debug: false // Optional: Enable debug logging
});

parse(request)

const result = await client.parse({
  inputData: 'string', // The unstructured data to parse
  outputSchema: {}, // Desired JSON structure
  instructions: 'string', // Optional: Additional context
  options: {
    timeout: 45000, // Request timeout override
    validateOutput: true, // Validate against schema
    confidenceThreshold: 0.8 // Minimum confidence (0-1)
  }
});

batchParse(request, progressCallback?)

const result = await client.batchParse({
  items: [/* array of parse requests */],
  options: {
    concurrency: 3, // Parallel processing limit
    failFast: false, // Stop on first error
    preserveOrder: true // Keep input order
  }
}, (progress) => {
  console.log(`${progress.completed}/${progress.total} completed`);
});

=� Examples

Email Processing

const { EMAIL_PARSER } = require('@parserator/node-sdk');

const result = await client.parse({
  inputData: `
    From: [email protected]
    Subject: Q1 Review Meeting
    
    Hi team, let's schedule our Q1 review for Friday at 2 PM.
    Action items:
    - John: Prepare sales presentation
    - Sarah: Update financial forecasts
  `,
  outputSchema: EMAIL_PARSER.outputSchema,
  instructions: EMAIL_PARSER.instructions
});

console.log(result.parsedData.action_items);
// ["John: Prepare sales presentation", "Sarah: Update financial forecasts"]

Invoice Processing

const result = await client.parse({
  inputData: `
    INVOICE #INV-2024-001
    Date: January 15, 2024
    
    Bill To: Acme Corporation
    
    Web Development: 40 hrs @ $150/hr = $6,000
    Tax (8.5%): $510
    Total: $6,510
  `,
  outputSchema: {
    invoice_number: 'string',
    date: 'iso_date',
    client: 'string',
    line_items: 'object',
    subtotal: 'number',
    tax: 'number',
    total: 'number'
  }
});

Batch Processing

const documents = [
  { inputData: 'Contact 1...', outputSchema: contactSchema },
  { inputData: 'Invoice 1...', outputSchema: invoiceSchema },
  { inputData: 'Email 1...', outputSchema: emailSchema }
];

const batchResult = await client.batchParse({
  items: documents,
  options: { concurrency: 3 }
});

console.log(`Processed ${batchResult.summary.successful} items`);

=K

B Support


Built with d by the Parserator team - Transform your unstructured data into structured gold. (