# @speedyshot/capture

> A JavaScript libary to easily use SpeedyShot's capture service

Latest version **1.2.1** (published 2024-10-07) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @speedyshot/capture
pnpm add @speedyshot/capture
yarn add @speedyshot/capture
bun add @speedyshot/capture
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2024-10-07 |
| First published | 2022-01-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 16 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | SpeedyShot by CreateMyTech |
| Maintainers | kevinvr |
| Keywords | speedyshot, screenshots, snapshot, pdf, html, crawling, crawler |

## Links

- npm: https://www.npmjs.com/package/@speedyshot/capture
- Repository: https://github.com/SpeedyShot/capture
- Homepage: https://github.com/SpeedyShot/capture#readme
- Issues: https://github.com/SpeedyShot/capture/issues
- npm.io page: https://npm.io/package/@speedyshot/capture

## Dependencies (2)

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

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 1.2.1 (latest) — 2024-10-07
- 1.2.0 — 2024-04-30
- 1.1.0 — 2024-04-28
- 1.0.0 — 2024-02-21
- 0.2.9 — 2024-02-20
- 0.2.8 — 2022-02-05
- 0.2.7 — 2022-02-05
- 0.2.6 — 2022-01-29
- 0.2.5 — 2022-01-24
- 0.2.4 — 2022-01-23
- 0.2.3 — 2022-01-23
- 0.2.2 — 2022-01-23
- 0.2.1 — 2022-01-23
- 0.2.0 — 2022-01-23
- 0.1.0 — 2022-01-22

## README

![@speedyshot/capture on NPM](https://img.shields.io/npm/v/@speedyshot/capture)

# @SpeedyShot/Capture

A TypeScript Library for using the SpeedyShot Service.

## Features

This library provides an interface to the SpeedyShot service, clearly describing the expected parameters using
TypeScript.

Furthermore, it also automatically throttles your requests to avoid hitting the max rate limit.

## Installation

`npm install @speedyshot/capture`

## Usage

### Single requests
```javascript
import { SpeedyShotCapture } from '@speedyshot/capture';

// Replace your api key in the constructor
// You can get an api key at https://speedyshot.com for free
const speedyShotCapture = new SpeedyShotCapture('YOUR-API-KEY');

// For single requests
const result = await speedyShotCapture.captureSingle({
    // Adjust to your desired capture parameters
    url: 'https://speedyshot.com',
    output: 'jpeg'
});
```

### Multiple requests
```javascript
import { SpeedyShotCapture } from '@speedyshot/capture';

// Replace your api key in the constructor
// You can get an api key at https://speedyshot.com for free
const speedyShotCapture = new SpeedyShotCapture('YOUR-API-KEY');

// For multiple requests
const parameters = {
    // Adjust to your desired capture parameters
    url: 'https://speedyshot.com',
    output: 'jpeg'
};

// In a real scenario, you would be using different parameters for each request
const results = await speedyShotCapture.captureMultiple([parameters, parameters]);
```

### With custom options
```javascript
import { SpeedyShotCapture } from '@speedyshot/capture';

// Replace your api key in the constructor
// You can get an api key at https://speedyshot.com for free
const customOptions = {
    // Max. concurrent requests.
    // Default is 50, min is 1, max is 100
    maxConcurrency: 75,
     
    // Include the raw axios response?
    // The result object will contain a 'raw' field with the AxiosResponse object
    includeRawResponse: true
};
const speedyShotCapture = new SpeedyShotCapture('YOUR-API-KEY', customOptions);

// For single requests
const result = await speedyShotCapture.captureSingle({
    // Adjust to your desired capture parameters
    url: 'https://speedyshot.com',
    output: 'jpeg'
});
```

# Changelog
## 1.2.1 - 07/10/2024
- Maintenance update

## 1.2.0 - 01/05/2024
- Added support for `storageRegion`, `storageEndpoint` parameters so S3-Compatible storage can be used, for example Wasabi.

## 1.1.0 - 28/04/2024
- Added support for `hideAds`, `hideCookieBanners`, and `useSpeedyProxy` features.
- Upgraded dependencies

## 1.0.0 - 21/02/2024
- Methods slightly refactored for readability with async instead of plain promises.
- CaptureBulk method added

## License
[MIT](https://choosealicense.com/licenses/mit/)

## Author
*@speedyshot/capture* is made by [SpeedyShot by CreateMyTech](https://speedyshot.com).

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