# metascraper-media-provider

> Metascraper media provider that resolves video URLs via youtube-dl compatible extractors.

Latest version **5.58.1** (published 2026-09-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install metascraper-media-provider
pnpm add metascraper-media-provider
yarn add metascraper-media-provider
bun add metascraper-media-provider
```

## Health

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

Positive: has types; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 5.58.1 |
| Published | 2026-09-17 |
| First published | 2018-09-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >= 22 |
| Dependencies | 9 |
| Unpacked size | 12.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2737 |
| Author | microlink.io |
| Maintainers | kikobeats |
| Keywords | download, extract, html, media, metascraper, provider, stream, video, youtube-dl, yt-dlp |

## Links

- npm: https://www.npmjs.com/package/metascraper-media-provider
- Repository: https://github.com/microlinkhq/metascraper.git#master
- Homepage: https://github.com/microlinkhq/metascraper/packages/metascraper-media-provider
- Issues: https://github.com/microlinkhq/metascraper/issues
- npm.io page: https://npm.io/package/metascraper-media-provider

## Dependencies (9)

- [lodash](https://npm.io/package/lodash.md) ~4.18.1
- [p-retry](https://npm.io/package/p-retry.md) ~8.0.0
- [p-reflect](https://npm.io/package/p-reflect.md) ~3.1.0
- [p-timeout](https://npm.io/package/p-timeout.md) ~7.0.1
- [debug-logfmt](https://npm.io/package/debug-logfmt.md) ~1.4.12
- [serialize-error](https://npm.io/package/serialize-error.md) ~13.0.1
- [youtube-dl-exec](https://npm.io/package/youtube-dl-exec.md) ~3.1.7
- [async-memoize-one](https://npm.io/package/async-memoize-one.md) ~1.2.1
- [@metascraper/helpers](https://npm.io/package/@metascraper/helpers.md) 5.56.2

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 5.58.1 (latest) — 2026-09-17
- 5.56.2 — 2026-08-17
- 5.55.2 — 2026-08-13
- 5.55.0 — 2026-08-09
- 5.54.1 — 2026-08-07
- 5.54.0 — 2026-08-07
- 5.53.0 — 2026-07-30
- 5.52.0 — 2026-07-29
- 5.51.1 — 2026-06-19
- 5.50.6 — 2026-06-09
- 5.50.5 — 2026-06-09
- 5.50.3 — 2026-05-11
- 5.50.1 — 2026-04-14
- 5.50.0 — 2026-03-20
- 5.49.25 — 2026-03-07
- … 354 more at https://npm.io/package/metascraper-media-provider/versions

## README

<div align="center">
  <br>
  <img style="width: 500px; margin:3rem 0 1.5rem;" src="https://metascraper.js.org/static/logo-banner.png" alt="metascraper">
  <br>
  <br>
  <p align="center"><strong>metascraper-media-provider</strong>: Get specific video provider url (Facebook/Twitter/Vimeo/etc).</p>
  <p align="center">See our <a href="https://metascraper.js.org" target='_blank' rel='noopener noreferrer'>website</a> for more information.</p>
  <br>
</div>

## Install

```bash
$ npm install metascraper-media-provider --save
```

## API

### metascraper-media-provider([options])

#### options

##### cacheDir

Type: `string`

It specifies cache based on file system to be used by [youtube-dl](youtube-dl).


##### retry

Type: `number`<br>
Default: `5`

The maximum number of retries allowed to perform.

##### timeout

Type: `number`<br>
Default: `30000`

The maximum time allowed to wait until considering the request as timed out.

##### args

Type: `function`<br>
Default: `({ url, flags }) => ({ url, flags })`

It defines a function that will determine the arguments to be passed to [youtube-dl](youtube-dl):

```js
const args = ({ flags, url, retryCount }) => {
  flags.addHeader = [`referer:${url}`]
  return { url, flags }
}
```

## License

**metascraper-media-provider** © [Microlink](https://microlink.io), released under the [MIT](https://github.com/microlinkhq/metascraper/blob/master/LICENSE.md) License.<br>
Authored and maintained by [Microlink](https://microlink.io) with help from [contributors](https://github.com/microlinkhq/metascraper/contributors).

> [microlink.io](https://microlink.io) · GitHub [microlinkhq](https://github.com/microlinkhq) · X [@microlinkhq](https://x.com/microlinkhq)

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