# idanalyzer2

> ID Analyzer API V2 client library, scan and verify global passport, driver license and identification card.

Latest version **1.3.0** (published 2026-06-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install idanalyzer2
pnpm add idanalyzer2
yarn add idanalyzer2
bun add idanalyzer2
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2026-06-18 |
| First published | 2023-12-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18 |
| Dependencies | 1 |
| Unpacked size | 122.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 5 |
| Author | ID Analyzer |
| Maintainers | evith_mark, aznxfrost |
| Keywords | id, analyzer, passport, driver, license, id, card, identification, card, identity, verification, mrz, pdf417, aamva, pep, aml |

## Links

- npm: https://www.npmjs.com/package/idanalyzer2
- Repository: https://github.com/idanalyzer/id-analyzer-v2-nodejs
- Homepage: https://www.idanalyzer.com
- Issues: https://github.com/idanalyzer/id-analyzer-v2-nodejs/issues
- npm.io page: https://npm.io/package/idanalyzer2

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^1.7.7

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.3.0 (latest) — 2026-06-18
- 1.2.0 — 2026-06-18
- 1.1.2 — 2026-06-03
- 1.1.1 — 2026-06-03
- 1.1.0 — 2026-06-03
- 1.0.2 — 2023-12-04
- 1.0.1 — 2023-12-04

## README

# ID Analyzer Node.js SDK — Identity Verification, KYC, Document & Biometric API

[![npm version](https://img.shields.io/npm/v/idanalyzer2.svg)](https://www.npmjs.com/package/idanalyzer2)
[![npm downloads](https://img.shields.io/npm/dm/idanalyzer2.svg)](https://www.npmjs.com/package/idanalyzer2)
[![license](https://img.shields.io/npm/l/idanalyzer2.svg)](LICENSE)

Official Node.js / TypeScript client library for the **[ID Analyzer](https://www.idanalyzer.com) API v2** — automate identity document verification, KYC onboarding and biometric checks in minutes.

Scan and authenticate **passports, driver's licenses, ID cards, visas and residence permits from 190+ countries**, run **1:1 face match and liveness detection**, screen against **AML / PEP / sanctions** watchlists, and onboard users remotely with **DocuPass** hosted verification & e-signature.

- 🌐 **Website:** [www.idanalyzer.com](https://www.idanalyzer.com)
- 📚 **Developer docs & API reference:** [developer.idanalyzer.com](https://developer.idanalyzer.com/help)
- 📖 **Full SDK class reference (auto-generated):** [https://idanalyzer.github.io/id-analyzer-v2-nodejs/](https://idanalyzer.github.io/id-analyzer-v2-nodejs/)
- 🔑 **Get your API key:** [portal2.idanalyzer.com](https://portal2.idanalyzer.com)
- 💬 **Support:** support@idanalyzer.com

## Features

- **Document OCR & authentication** — passport, driver's license, ID card, visa & residence-permit recognition from 190+ countries, including MRZ and PDF417 / AAMVA barcode parsing.
- **Biometric verification** — 1:1 face match and liveness / presentation-attack detection.
- **AML screening** — PEP, sanctions, watchlist and adverse-media checks.
- **DocuPass** — hosted, no-code remote identity verification, KYC/AML onboarding and legally-binding e-signature.
- **KYC profiles, transaction vault, contract generation and webhooks.**
- **US & EU data-residency regions.**
- Bundled **TypeScript** type definitions.

> ⚠️ Never embed your API key in client-side apps (mobile, browser JS). Call the API from your server.

## Installation

```bash
npm install idanalyzer2
```

TypeScript definitions are bundled (`index.d.ts`) — no `@types` package needed.

## Authentication & region

Pass your API key to each client, or set the `IDANALYZER_KEY` environment variable. The SDK targets the US endpoint (`https://api2.idanalyzer.com`) by default; set `IDANALYZER_REGION=eu` for the EU endpoint (`https://api2-eu.idanalyzer.com`). An unrecognized region throws `InvalidArgumentException`. For on-premise [ID Fort](https://www.idanalyzer.com) deployments, call `SetEndpoint('https://your-host/')`.

## Quick start

```javascript
import IdAnalyzer from "idanalyzer2"
const { Profile, Scanner, APIError, InvalidArgumentException } = IdAnalyzer

const scanner = new Scanner("YOUR_API_KEY")
scanner.throwApiException(true)
scanner.setProfile(new Profile(Profile.SECURITY_MEDIUM))

// Scan a document + selfie for biometric verification
const result = await scanner.scan("id_front.jpg", "", "selfie.jpg")
console.log(result.decision)   // accept / review / reject
```

## Examples

```javascript
// AML / PEP / sanctions screening
const { AML } = IdAnalyzer
const aml = new AML("YOUR_API_KEY")
await aml.search("John Smith", "", 0, "US")      // POST /aml
await aml.searchV3("John Smith", "", 10, 1)      // POST /amlv3

// KYB — business verification
// Verify a business from its registration/incorporation document. A document is
// required; an optional profile selects the KYC profile. The service extracts
// details, checks official company registries, screens against sanctions/PEP,
// and returns directors/owners to verify.
const { KYB } = IdAnalyzer
const kyb = new KYB("YOUR_API_KEY")
await kyb.verify("registration.jpg")                     // document required
await kyb.verify("registration.jpg", "security_medium")  // optional profile

// DocuPass — hosted remote verification link
const { Docupass } = IdAnalyzer
const docupass = new Docupass("YOUR_API_KEY")
const link = await docupass.createDocupass("YOUR_PROFILE_ID")
console.log(link.url)
```

More demos in the [`/demo`](demo) folder.

## API coverage

The SDK wraps the complete ID Analyzer API v2 surface:

| Class | Methods |
|---|---|
| `Scanner` | `scan`, `quickScan`, `veryQuickScan` |
| `Biometric` | `verifyFace`, `verifyLiveness` |
| `AML` | `search` (`/aml`), `searchV3` (`/amlv3`) |
| `KYB` | `verify` (`/kyb`) |
| `Contract` | `generate` + template CRUD |
| `Transaction` | `getTransaction`, `listTransaction`, `updateTransaction`, `deleteTransaction`, `exportTransaction`, `saveImage`, `saveFile` |
| `Docupass` | `createDocupass`, `listDocupass`, `getDocupass`, `deleteDocupass` |
| `ProfileAPI` | KYC profile create / list / get / update / delete / export |
| `Webhook` | `listWebhook`, `resendWebhook`, `deleteWebhook` |
| `Account` | `getAccount` |
| `Profile` | client-side KYC profile-override builder |

## Resources

- [ID Analyzer website](https://www.idanalyzer.com)
- [Developer documentation & API reference](https://developer.idanalyzer.com/help)
- [Node.js SDK guide](https://developer.idanalyzer.com/help/nodejs)
- [Dashboard — get your API key](https://portal2.idanalyzer.com)

## Other ID Analyzer SDKs

[PHP](https://github.com/idanalyzer/id-analyzer-v2-php) · [Python](https://github.com/idanalyzer/id-analyzer-v2-python) · [Node.js](https://github.com/idanalyzer/id-analyzer-v2-nodejs) · [.NET](https://github.com/idanalyzer/id-analyzer-v2-dotnet) · [Java](https://github.com/idanalyzer/id-analyzer-v2-java) · [Go](https://github.com/idanalyzer/id-analyzer-v2-go)

## License

MIT © [ID Analyzer](https://www.idanalyzer.com) — see [LICENSE](LICENSE).

---
_Source: https://npm.io/package/idanalyzer2 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
