# @comunica/actor-http-fetch

> A fetch http actor

Latest version **5.4.0** (published 2026-09-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install @comunica/actor-http-fetch
pnpm add @comunica/actor-http-fetch
yarn add @comunica/actor-http-fetch
bun add @comunica/actor-http-fetch
```

## Health

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

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

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 5.4.0 |
| Published | 2026-09-14 |
| First published | 2022-02-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 9 |
| Unpacked size | 67.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 592 |
| Maintainers | joachimvh, rubensworks, rubenverborgh, dexagod, jeswr |
| Keywords | comunica, runner |

## Links

- npm: https://www.npmjs.com/package/@comunica/actor-http-fetch
- Repository: https://github.com/comunica/comunica
- Homepage: https://comunica.dev/
- Issues: https://github.com/comunica/comunica/issues
- Funding: https://opencollective.com/comunica-association
- npm.io page: https://npm.io/package/@comunica/actor-http-fetch

## Dependencies (9)

- [undici](https://npm.io/package/undici.md) ^8.0.0
- [@comunica/core](https://npm.io/package/@comunica/core.md) ^5.4.0
- [@comunica/types](https://npm.io/package/@comunica/types.md) ^5.4.0
- [@comunica/bus-http](https://npm.io/package/@comunica/bus-http.md) ^5.4.0
- [http-cache-semantics](https://npm.io/package/http-cache-semantics.md) ^4.2.0
- [@comunica/context-entries](https://npm.io/package/@comunica/context-entries.md) ^5.4.0
- [@comunica/mediatortype-time](https://npm.io/package/@comunica/mediatortype-time.md) ^5.4.0
- [@types/http-cache-semantics](https://npm.io/package/@types/http-cache-semantics.md) ^4.0.4
- [@comunica/bus-http-invalidate](https://npm.io/package/@comunica/bus-http-invalidate.md) ^5.4.0

## Recent versions

- 5.4.0 (latest) — 2026-09-14
- 4.4.2-alpha.49.0 (next) — 2025-10-22
- 5.3.0 — 2026-07-10
- 5.2.3 — 2026-05-26
- 5.2.2 — 2026-05-03
- 5.2.0 — 2026-04-14
- 5.1.3 — 2026-01-30
- 5.1.0 — 2026-01-16
- 5.0.3 — 2026-01-12
- 5.0.2 — 2026-01-12
- 5.0.0 — 2026-01-08
- 4.5.0 — 2025-11-18
- 4.4.1 — 2025-09-25
- 4.4.0 — 2025-09-17
- 4.2.0 — 2025-04-29
- … 73 more at https://npm.io/package/@comunica/actor-http-fetch/versions

## README

# Comunica Fetch HTTP Actor

[![npm version](https://badge.fury.io/js/%40comunica%2Factor-http-fetch.svg)](https://www.npmjs.com/package/@comunica/actor-http-fetch)

An [HTTP](https://github.com/comunica/comunica/tree/master/packages/bus-http) actor that
uses [fetch](https://fetch.spec.whatwg.org/) to perform HTTP requests.

When this actor is used in Node.js, a memory-based cache will be initialized.
This cache is only used when the `httpCache` context flag is enabled.

This module is part of the [Comunica framework](https://github.com/comunica/comunica),
and should only be used by [developers that want to build their own query engine](https://comunica.dev/docs/modify/).

When this actor is used, a custom fetch implementation may be provided via the context (`fetch`).
If none is provided, the global `fetch` implementation from the runtime or a polyfill is used.

[Click here if you just want to query with Comunica](https://comunica.dev/docs/query/).

## Install

```bash
$ yarn add @comunica/actor-http-fetch
```

## Configure

After installing, this package can be added to your engine's configuration as follows:
```json
{
  "@context": [
    "https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-http-fetch/^5.0.0/components/context.jsonld"
  ],
  "actors": [
    {
      "@id": "urn:comunica:default:http/actors#fetch",
      "@type": "ActorHttpFetch"
    }
  ]
}
```

### Config Parameters

* `cacheMaxSize`: Maximum size of the cache (in bytes). Defaults to `104857600` (100MB).
* `cacheMaxCount`: Maximum number of documents to store in the cache. Defaults to `1000`.
* `cacheMaxEntrySize`: Maximum size of an entry in the cache (in bytes). Defaults to `5242880` (5MB).
* `httpInvalidator`: A mediator over the [HTTP invalidate bus](https://github.com/comunica/comunica/tree/master/packages/bus-http-invalidate).
* `agentOptions`: The agent JSON options for the HTTP agent in Node.js environments. _(optional)_

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