# web-archive

> An utility that uses archive.is / archive.today to archive a webpage from a given url.

Latest version **2.0.2** (published 2025-05-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install web-archive
pnpm add web-archive
yarn add web-archive
bun add web-archive
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2025-05-20 |
| First published | 2018-02-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 38.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | https://github.com/Mad-Chemist |
| Maintainers | mad-chemist |
| Keywords | archive.is, wayback, web-archiving, archive, archival, promise, archiver, web archiver, archive website, snapshot, archiveis, archive.today, archive.vn, archive.md, wayback, archiving, preservation |

## Links

- npm: https://www.npmjs.com/package/web-archive
- npm.io page: https://npm.io/package/web-archive

## Dependencies (4)

- [puppeteer](https://npm.io/package/puppeteer.md) ^24.9.0
- [user-agents](https://npm.io/package/user-agents.md) ^1.1.545
- [puppeteer-extra](https://npm.io/package/puppeteer-extra.md) ^3.3.6
- [puppeteer-extra-plugin-stealth](https://npm.io/package/puppeteer-extra-plugin-stealth.md) ^2.11.2

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 2.0.2 (latest) — 2025-05-20
- 2.0.1 — 2025-05-20
- 2.0.0 — 2025-05-20
- 1.1.0 — 2019-01-04
- 1.0.5 — 2018-11-22
- 1.0.4 — 2018-05-31
- 1.0.3 — 2018-02-17
- 1.0.2 — 2018-02-17
- 1.0.1 — 2018-02-17
- 1.0.0 — 2018-02-17

## README

# web-archive
A NodeJS wrapper to generate an archive.is webpage archive, and return the archived URL to the requester.

### Usage example

```javascript
    const archive = require("web-archive");
    try {
        let url = await save('https://www.npmjs.com/package/web-archive');
        console.log(`Archived URL: ${url}`);
    }
    catch(error) {
        log(`Result page archive failed ${error}`);
    }
```

### Available Options

```javascript
    // All options are optional
    {
        "forceRefresh": Boolean,
        // Default: False
        // If set to true, will always create new archive of URL
        "userAgent":String,
        // Default: new UserAgent().toString()
        // Use to override default request user agent
        "archiveSite":String,
        // Default: http://archive.vn
        // Choose default archive.is domain variant to attempt
        "timeout": Number
        // Default: 60000
        // How long to wait in milliseconds for archived URL to return before timing out
    }
```

### Passing Options Into Save Function
```javascript
    const options = {forceRefresh:true}; // Use any of the above options as it fits your use case
    await save('https://www.npmjs.com/package/web-archive', options);
```

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