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

oapiex

v0.3.11

Published

CLI and TypeScript toolkit for turning documentation pages into usable developer artifacts.

Downloads

417

Readme

OAPIEX

NPM Downloads npm version @oapiex/sdk-kit npm version License codecov Publish Package Deploy Docs Run Tests

OAPIE is a CLI and TypeScript library for extracting API operation data from documentation sites and converting it into raw extracted payloads or OpenAPI-like documents.

It currently focuses on ReadMe-powered API docs and saved HTML pages, with room to expand to additional documentation platforms.

  • npm: https://www.npmjs.com/package/oapiex
  • docs: https://toneflix.github.io/oapiex
  • repository: https://github.com/toneflix/oapiex

Features

  • parse remote documentation URLs or saved local HTML files
  • extract methods, URLs, parameters, request examples, and response examples
  • crawl linked sidebar pages for multi-endpoint references
  • transform extracted operations into an OpenAPI-like document
  • use the tool as a CLI or as a programmatic package
  • choose among axios, happy-dom, jsdom, and puppeteer loaders

Installation

CLI

Install globally if you want the oapiex command available everywhere:

pnpm add -g oapiex
npm i -g oapiex
yarn global add oapiex

Library

Install locally if you want to use OAPIEX from your own scripts or tooling:

pnpm add oapiex
npm i oapiex
yarn add oapiex

CLI Quick Start

Extract a single page into an OpenAPI-like JSON document:

oapie parse https://maplerad.dev/reference/create-a-customer \
  --shape=openapi \
  --output=json

Crawl a sidebar section and write a JavaScript module:

oapie parse https://maplerad.dev/reference/create-a-customer \
  --shape=openapi \
  --output=js \
  --crawl

Generate a config file:

oapie init

Programmatic Usage

Extract a single operation:

import { Application, extractReadmeOperationFromHtml } from 'oapiex';

const app = new Application({
  browser: 'puppeteer',
});

const html = await app.loadHtmlSource(
  'https://maplerad.dev/reference/create-a-customer',
  true,
);

const operation = extractReadmeOperationFromHtml(html);

console.log(operation.method);
console.log(operation.url);

Convert extracted data into an OpenAPI-like document:

import {
  Application,
  transformer,
  extractReadmeOperationFromHtml,
} from 'oapiex';

const app = new Application({ browser: 'puppeteer' });
const html = await app.loadHtmlSource(
  'https://maplerad.dev/reference/create-a-customer',
  true,
);
const operation = extractReadmeOperationFromHtml(html);

const document = transformer.createDocument(
  [operation],
  'Extracted API',
  '0.0.0',
);

console.log(document.paths);

Configuration

OAPIEX looks for one of these files in the current working directory:

  • oapiex.config.ts
  • oapiex.config.js
  • oapiex.config.cjs

Example:

import { defineConfig } from 'oapiex';

export default defineConfig({
  outputFormat: 'json',
  outputShape: 'openapi',
  browser: 'puppeteer',
  requestTimeout: 50000,
});

Supported Loaders

  • axios
  • happy-dom
  • jsdom
  • puppeteer

The default browser is puppeteer.

Output

CLI parse results are written to the local output/ directory.

Available output shapes:

  • raw
  • openapi

Available output formats:

  • pretty
  • json
  • js

Documentation

Full documentation is available at https://toneflix.github.io/oapiex.

Useful sections:

  • Getting started: https://toneflix.github.io/oapiex/guide/getting-started
  • CLI reference: https://toneflix.github.io/oapiex/reference/cli
  • Programmatic usage: https://toneflix.github.io/oapiex/reference/programmatic-usage
  • Configuration: https://toneflix.github.io/oapiex/reference/configuration
  • Roadmap: https://toneflix.github.io/oapiex/project/roadmap

Roadmap Highlights

Current future-looking areas include:

  • improved ReadMe extraction coverage
  • stronger schema and example inference
  • broader programmatic API helpers
  • support for Apidog documentation pages
  • support for Postman documentation pages

See the full roadmap at https://toneflix.github.io/oapiex/project/roadmap.

Development

Install dependencies:

pnpm install

Common commands:

pnpm test
pnpm build
pnpm docs:dev
pnpm docs:build

License

MIT