# @11ty/eleventy-fetch

> Fetch and locally cache remote API calls and assets.

Latest version **5.1.3** (published 2026-06-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install @11ty/eleventy-fetch
pnpm add @11ty/eleventy-fetch
yarn add @11ty/eleventy-fetch
bun add @11ty/eleventy-fetch
```

## Health

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

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

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

## Facts

| | |
|---|---|
| Version | 5.1.3 |
| Published | 2026-06-30 |
| First published | 2022-02-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=18 |
| Dependencies | 5 |
| Unpacked size | 26.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 166 |
| Author | Zach Leatherman |
| Maintainers | zachleat, fortawesome-admin |
| Keywords | eleventy, eleventy-utility |

## Links

- npm: https://www.npmjs.com/package/@11ty/eleventy-fetch
- Repository: https://github.com/11ty/fetch
- Homepage: https://github.com/11ty/fetch#readme
- Issues: https://github.com/11ty/fetch/issues
- Funding: https://opencollective.com/11ty
- npm.io page: https://npm.io/package/@11ty/eleventy-fetch

## Dependencies (5)

- [debug](https://npm.io/package/debug.md) ^4.4.3
- [flatted](https://npm.io/package/flatted.md) ^3.4.2
- [p-queue](https://npm.io/package/p-queue.md) 6.6.2
- [@rgrove/parse-xml](https://npm.io/package/@rgrove/parse-xml.md) ^4.2.1
- [@11ty/eleventy-utils](https://npm.io/package/@11ty/eleventy-utils.md) ^2.0.7

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 5.1.3 (latest) — 2026-06-30
- 5.1.0-beta.3 (beta) — 2025-04-23
- 5.1.2 — 2026-03-18
- 5.1.1 — 2025-12-02
- 5.1.0 — 2025-05-08
- 5.1.0-beta.2 — 2025-03-20
- 5.1.0-beta.1 — 2025-03-17
- 5.0.2 — 2025-01-07
- 5.0.2-beta.2 — 2025-01-04
- 5.0.2-beta.1 — 2024-12-19
- 5.0.1 — 2024-11-16
- 5.0.1-beta.1 — 2024-11-16
- 5.0.0 — 2024-11-16
- 5.0.0-beta.7 — 2024-11-12
- 5.0.0-beta.6 — 2024-11-12
- … 7 more at https://npm.io/package/@11ty/eleventy-fetch/versions

## README

<p align="center"><img src="https://www.11ty.dev/img/logo-github.svg" width="200" height="200" alt="eleventy Logo"></p>

# eleventy-fetch

_Requires Node 18+_

Formerly known as [`@11ty/eleventy-cache-assets`](https://www.npmjs.com/package/@11ty/eleventy-cache-assets).

Fetch network resources and cache them so you don’t bombard your API (or other resources). Do this at configurable intervals—not with every build! Once per minute, or once per hour, once per day, or however often you like!

With the added benefit that if one successful request completes, you can now work offline!

This plugin can save any kind of asset—JSON, HTML, images, videos, etc.

## [The full `eleventy-fetch` documentation is on 11ty.dev](https://www.11ty.dev/docs/plugins/cache/).

- _This is a plugin for the [Eleventy static site generator](https://www.11ty.dev/)._
- Find more [Eleventy plugins](https://www.11ty.dev/docs/plugins/).
- Please star [Eleventy on GitHub](https://github.com/11ty/eleventy/), follow [@eleven_ty](https://twitter.com/eleven_ty) on Twitter, and support [11ty on Open Collective](https://opencollective.com/11ty)

[![npm Version](https://img.shields.io/npm/v/@11ty/eleventy-fetch.svg?style=for-the-badge)](https://www.npmjs.com/package/@11ty/eleventy-fetch) [![GitHub issues](https://img.shields.io/github/issues/11ty/eleventy-fetch.svg?style=for-the-badge)](https://github.com/11ty/eleventy/issues)

## Installation

```
npm install @11ty/eleventy-fetch
```

_[The full `eleventy-fetch` documentation is on 11ty.dev](https://www.11ty.dev/docs/plugins/cache/)._

## Tests

```
npm run test
```

- We use the [ava JavaScript test runner](https://github.com/avajs/ava) ([Assertions documentation](https://github.com/avajs/ava/blob/master/docs/03-assertions.md))
- ℹ️ To keep tests fast, thou shalt try to avoid writing files in tests.

<!--
## Roadmap

* Add support for tiered asset requests, e.g. CSS requests background-images and web fonts, for example.

## Open Questions

* `flat-cache` save method seems to be synchronous, is there a better async one?
* Our cache stores raw buffers internally, which are pretty bloated compared to the original. Surely there is a more efficient way to do this. Maybe store the files in their original format.
-->

## Community Roadmap

- [Top Feature Requests](https://github.com/11ty/fetch/issues?q=label%3Aneeds-votes+sort%3Areactions-%2B1-desc+label%3Aenhancement) (Add your own votes using the 👍 reaction)
- [Top Bugs 😱](https://github.com/11ty/fetch/issues?q=is%3Aissue+is%3Aopen+label%3Abug+sort%3Areactions-%2B1-desc) (Add your own votes using the 👍 reaction)
- [Newest Bugs 🙀](https://github.com/11ty/fetch/issues?q=is%3Aopen+is%3Aissue+label%3Abug)

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