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 🙏

© 2026 – Pkg Stats / Ryan Hefner

job-ai-extractor

v1.0.0

Published

AI-powered job posting analyzer for extracting skills, domain, experience level, and required years

Readme

Job AI Extractor

A browser-compatible NPM package for extracting structured information from job postings using OpenAI's API.

Features

  • 🤖 AI-Powered: Uses OpenAI GPT models for intelligent extraction
  • 🌐 Browser Compatible: Works in Chrome extensions and web applications
  • 🔒 Secure: API keys stay in the browser, never sent to third-party servers
  • 📊 Structured Output: Returns typed, validated data using Zod schemas
  • Fast: Parallel processing for multiple extractions

Installation

npm install job-ai-extractor openai

Usage

Basic Usage

import { createJobExtractor } from "job-ai-extractor";

// Create extractor with your OpenAI API key
const extractor = createJobExtractor("your-openai-api-key");

// Extract all information at once
const result = await extractor.extractAll(
  "Senior Full Stack Developer",
  "We are looking for a Senior Full Stack Developer with 5+ years of experience..."
);

console.log(result);
// {
//   skills: { skills: ['JavaScript', 'React', 'Node.js', ...] },
//   domain: { domain: 'Full Stack' },
//   years: { requestYears: 5 },
//   level: { level: 'Senior' }
// }

Individual Extractions

import { JobExtractor } from "job-ai-extractor";

const extractor = new JobExtractor({
  apiKey: "your-openai-api-key",
  model: "gpt-4", // Optional: defaults to gpt-3.5-turbo
  temperature: 0, // Optional: defaults to 0
});

// Extract skills
const skills = await extractor.extractSkills(jobDescription);

// Extract domain
const domain = await extractor.extractDomain(jobDescription);

// Extract experience years
const years = await extractor.extractYears(jobDescription);

// Extract seniority level
const level = await extractor.extractLevel(jobTitle);

Chrome Extension Usage

// In your Chrome extension content script
import { createJobExtractor } from "job-ai-extractor";

// Get API key from extension storage
const apiKey = await chrome.storage.sync.get(["openaiApiKey"]);
const extractor = createJobExtractor(apiKey.openaiApiKey);

// Extract job information
const jobData = await extractor.extractAll(jobTitle, jobDescription);

API Reference

JobExtractor

Main class for job data extraction.

Constructor

new JobExtractor({
  apiKey: string;      // Your OpenAI API key
  model?: string;      // OpenAI model (default: 'gpt-3.5-turbo')
  temperature?: number; // Temperature for AI responses (default: 0)
})

Methods

  • extractSkills(jobText: string): Promise<Skills> - Extract technical skills
  • extractDomain(jobText: string): Promise<Domain> - Extract job domain
  • extractYears(jobText: string): Promise<Years> - Extract experience years
  • extractLevel(jobTitle: string): Promise<Level> - Extract seniority level
  • extractAll(jobTitle: string, jobDescription: string): Promise<JobExtraction> - Extract all data

Types

type Skills = {
  skills: string[];
};

type Domain = {
  domain:
    | "Backend"
    | "Frontend"
    | "Full Stack"
    | "Mobile"
    | "DevOps"
    | "Embedded"
    | "ML"
    | "Data Science"
    | "QA"
    | "Security"
    | "Finance"
    | "E-commerce"
    | "Gaming"
    | "Hardware"
    | null;
};

type Years = {
  requestYears: number; // 0-20
};

type Level = {
  level:
    | "Intern"
    | "Entry"
    | "Junior"
    | "Mid"
    | "Senior"
    | "Lead"
    | "Manager"
    | "Director"
    | "Executive"
    | null;
};

Security

This package is designed with security in mind:

  • ✅ API keys are used directly in the browser
  • ✅ No data is sent to third-party servers
  • ✅ All communication is directly with OpenAI's API
  • ✅ Perfect for Chrome extensions and client-side applications

Error Handling

The package includes comprehensive error handling:

try {
  const result = await extractor.extractAll(title, description);
} catch (error) {
  if (error.message.includes("API key")) {
    console.error("Invalid API key");
  } else if (error.message.includes("parse")) {
    console.error("Failed to parse AI response");
  } else {
    console.error("Extraction failed:", error);
  }
}

Requirements

  • OpenAI API key
  • Modern browser or Node.js environment
  • Internet connection for API calls

License

MIT