# @types/website-scraper

> TypeScript definitions for website-scraper

Latest version **1.2.11** (published 2025-10-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/website-scraper
pnpm add @types/website-scraper
yarn add @types/website-scraper
bun add @types/website-scraper
```

## Health

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

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 1.2.11 |
| Published | 2025-10-24 |
| First published | 2016-11-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51445 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/website-scraper
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/website-scraper
- npm.io page: https://npm.io/package/@types/website-scraper

## Dependencies (1)

- [@types/request](https://npm.io/package/@types/request.md) *

## Recent versions

- 1.2.11 (latest) — 2025-10-24
- 1.2.10 (ts5.1) — 2023-11-21
- 1.2.6 (ts3.8) — 2021-07-02
- 1.2.5 (ts3.3) — 2019-11-06
- 1.2.2 (ts2.0) — 2017-05-03
- 1.2.9 — 2023-11-07
- 1.2.8 — 2023-10-18
- 1.2.7 — 2023-09-25
- 1.2.4 — 2018-06-20
- 1.2.3 — 2017-11-09
- 1.2.1 — 2016-11-01

## README

# Installation
> `npm install --save @types/website-scraper`

# Summary
This package contains type definitions for website-scraper (https://github.com/s0ph1e/node-website-scraper).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/website-scraper.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/website-scraper/index.d.ts)
````ts
/// <reference types="request" />

import request = require("request");

declare namespace websiteScraper {
    interface Url {
        url: string;
        filename: string;
    }

    interface SubDirectory {
        directory: string;
        extensions: string[];
    }

    interface Source {
        selector: string;
        attr?: string | undefined;
    }

    interface RequestOptions {
        headers: request.Headers;
    }

    interface Options {
        urls: Array<string | Url>;
        directory: string;
        urlFilter?: ((url: string) => boolean) | undefined;
        filenameGenerator?: string | undefined;
        defaultFilename?: string | undefined;
        prettifyUrls?: boolean | undefined;
        sources?: Source[] | undefined;
        subdirectories?: SubDirectory[] | null | undefined;
        request?: RequestOptions | undefined;
        recursive?: boolean | undefined;
        maxDepth?: number | undefined;
        ignoreErrors?: boolean | undefined;
        maxRecursiveDepth?: number | undefined;
        requestConcurrency?: number | undefined;
        plugins?: object[] | undefined;
    }

    interface Resource {
        url: string;
        filename: string;
        assets: Resource[];
    }

    interface Callback {
        (error: any | null, result: Resource[] | null): void;
    }

    interface Scrape {
        (options: Options, callback: Callback): void;
        (options: Options): Promise<Resource[]>;
    }
}

declare const websiteScraper: websiteScraper.Scrape;

export = websiteScraper;

````

### Additional Details
 * Last updated: Fri, 24 Oct 2025 04:02:41 GMT
 * Dependencies: [@types/request](https://npmjs.com/package/@types/request)

# Credits
These definitions were written by [Christian Rackerseder](https://github.com/screendriver).

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