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

@scanheroai/sdk

v1.0.0

Published

Official TypeScript/JavaScript SDK for the Scan Hero document conversion API

Downloads

135

Readme

@scanhero/sdk

Official TypeScript/JavaScript SDK for the Scan Hero document conversion API.

Convert PDF, Word, Excel, PowerPoint, images, audio, email, and 20+ other formats to Markdown (or DOCX, CSV, EPUB, and more) with full type safety.

The client is generated automatically from the live OpenAPI spec (/openapi.json) using openapi-typescript-codegen.

Install

npm install @scanhero/sdk

Node.js 18+ required (uses native fetch).

Quick start

import { ScanHero } from "@scanhero/sdk";

const sh = new ScanHero({ apiKey: "sh_..." });

// List recent tasks
const tasks = await sh.tasks.listTasksV1TasksGet();

// Get profile and credit balance
const me = await sh.users.getMeV1UsersMeGet();
console.log(me.credits);

For file uploads and downloads, use the generated request types on sh.tasks, sh.jobs, and sh.convert. See the API reference for multipart field names and options.

Authentication

Generate an API key at scanheroai.com/settings/api-keys.

const sh = new ScanHero({ apiKey: "sh_your_key_here" });

Or from the environment:

const sh = ScanHero.fromEnv();
// reads SCANHERO_API_KEY

Custom base URL (e.g. local backend):

const sh = new ScanHero({
  apiKey: "sh_test",
  baseUrl: "http://127.0.0.1:8080",
});

Regenerating from the OpenAPI spec

When the API changes, regenerate the typed client from production or a local server:

cd sdk/typescript
npm install
npm run generate   # default: https://api.scanheroai.com/openapi.json
npm run build

Against a local FastAPI instance:

OPENAPI_URL=http://127.0.0.1:8080/openapi.json npm run generate

Generated sources land in src/generated/. The thin wrapper in src/index.ts adds API-key auth and re-exports all models and services.

API surface

The ScanHero client exposes namespaced services matching the REST API:

| Property | Endpoints | |----------|-----------| | tasks | Upload, list, adjust, download conversions | | jobs | Batch uploads (up to 50 files) | | webhooks | Register push notification URLs | | templates | Saved processing configurations | | users | Profile and credit balance | | convert | Direct format conversions (PDF→DjVu, etc.) | | feedback | Quality ratings and cashback | | health | Liveness probe |

All request/response types (e.g. TaskResponse, ProcessingOptions) are exported from the package root.

API reference

Full reference: scanheroai.com/docs
Interactive (OpenAPI): scanheroai.com/docs/reference

Related SDKs

| Language | Package | Source | |----------|---------|--------| | Python | pip install scanhero | sdk/python/ — handcrafted helpers | | TypeScript / JavaScript | npm install @scanhero/sdk | This package — generated from /openapi.json |

Both SDKs are documented together at scanheroai.com/docs#sdk.

License

MIT