# epub-metadata

> Reads metadata from epub files

Latest version **0.3.1** (published 2026-05-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install epub-metadata
pnpm add epub-metadata
yarn add epub-metadata
bun add epub-metadata
```

Provides the command `epub-metadata`.

## Health

**Score 60/100 (C)** — status: stable.

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

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.3.1 |
| Published | 2026-05-12 |
| First published | 2015-10-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18 |
| Dependencies | 2 |
| Unpacked size | 17.1 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Adrian Sieber |
| Maintainers | adius |
| Keywords | epub, metadata, ebook |

## Links

- npm: https://www.npmjs.com/package/epub-metadata
- Repository: https://github.com/adius/epub-metadata
- Homepage: https://github.com/adius/epub-metadata#readme
- Issues: https://github.com/adius/epub-metadata/issues
- npm.io page: https://npm.io/package/epub-metadata

## Dependencies (2)

- [jszip](https://npm.io/package/jszip.md) ^3.10.1
- [fast-xml-parser](https://npm.io/package/fast-xml-parser.md) ^4.5.0

## Recent versions

- 0.3.1 (latest) — 2026-05-12
- 0.3.0 — 2026-04-29
- 0.2.0 — 2015-10-15
- 0.1.0 — 2015-10-13

## README

# Epub Metadata

Reads metadata from an epub file.

Written in modern TypeScript with native ES modules. Requires Node.js 18+.


## Installation

```sh
npm install epub-metadata
```


## Usage

```ts
import { readEpubMetadata } from "epub-metadata"

const metadata = await readEpubMetadata("path/to/a/book.epub")
console.log(metadata)
```

A default export is also available:

```ts
import readEpubMetadata from "epub-metadata"
```

Example output:

```js
{
  title: 'Der Hundertjährige, der aus dem Fenster stieg und verschwand',
  creator: {
    'file-as': 'Jonas Jonasson',
    role: 'aut',
    text: 'Jonas Jonasson',
  },
  language: 'de',
  publisher: 'E-Books der Verlagsgruppe Random House GmbH',
  contributor: {
    role: 'bkp',
    text: 'calibre (0.9.13) [http://calibre-ebook.com]',
  },
  date: '2015-10-13',
  uuid: 'urn:uuid:3839f3f2-c31f-430e-a78f-b69b03cd5188',
  'mobi-asin': 'B005IVZVT6',
  isbn: '9783641056681',
  coverPath: 'images/cover.jpg',
}
```


## CLI

```sh
npx epub-metadata path/to/a/book.epub
```


## Development

```sh
npm install
npm run build       # compile TypeScript to dist/
npm run typecheck   # type-check without emitting
```

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