PHPackages                             lukeyouell/craft-fetch - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. lukeyouell/craft-fetch

AbandonedArchivedCraft-plugin[HTTP &amp; Networking](/categories/http)

lukeyouell/craft-fetch
======================

Utilise the Guzzle HTTP client from within your Craft templates.

1.3.0(6y ago)2311.6k12MITPHP

Since Jan 15Pushed 3w ago1 watchersCompare

[ Source](https://github.com/lukeyouell/craft-fetch)[ Packagist](https://packagist.org/packages/lukeyouell/craft-fetch)[ Fund](https://www.paypal.me/jalenconner)[ GitHub Sponsors](https://github.com/jalendport)[ RSS](/packages/lukeyouell-craft-fetch/feed)WikiDiscussions develop Synced 1w ago

READMEChangelog (8)Dependencies (1)Versions (13)Used By (0)

Warning

This plugin has been abandoned.

---

[![icon](src/icon.svg)](src/icon.svg)

Fetch plugin for Craft CMS
==========================

[](#fetch-plugin-for-craft-cms)

Why this plugin is retired
--------------------------

[](#why-this-plugin-is-retired)

Fetch made synchronous, uncached HTTP requests during Twig rendering. That was a convenient shortcut in 2018, but it's now a well-documented performance anti-pattern: every page render blocks on the external API, and if that API slows down or goes down, so does your site. Craft can also now do everything this plugin did natively, with no plugin installed.

Migrating away from Fetch
-------------------------

[](#migrating-away-from-fetch)

### Option 1: Native Twig (direct replacement)

[](#option-1-native-twig-direct-replacement)

Guzzle ships with Craft, and Craft's `create()` Twig function can instantiate it — no plugin required. This is a drop-in replacement for what Fetch did:

```
{% set client = create('GuzzleHttp\\Client') %}

{% set response = client.request('GET', 'https://api.example.com/endpoint', {
    timeout: 5,
    http_errors: false,
}) %}

{% if response.getStatusCode() == 200 %}
    {% set data = response.getBody().getContents() | json_decode %}
{% endif %}

```

Note that this has the same drawback Fetch had: it blocks the render. If you use it, wrap the output in a [`{% cache %}` tag](https://craftcms.com/docs/5.x/reference/twig/tags.html#cache) at minimum.

### Option 2: Do it properly (recommended for production)

[](#option-2-do-it-properly-recommended-for-production)

- **Server-side data:** fetch in a [custom module/service](https://craftcms.com/docs/5.x/extend/services.html) and cache the result, keeping HTTP out of the render path entirely.
- **Async partials:** use [Sprig](https://putyourlightson.com/plugins/sprig) or htmx to load API-driven fragments after first paint.
- **Non-critical or personalized data:** fetch client-side in JavaScript.

### Option 3: Maintained plugin alternatives

[](#option-3-maintained-plugin-alternatives)

- [**Consume** by Verbb](https://plugins.craftcms.com/consume) — commercial; built-in caching, OAuth/credential management in the control panel, JSON/XML/CSV/HTML parsing.
- [**Simple Guzzle**](https://plugins.craftcms.com/simple-guzzle) — free; template-level requests with caching.

Thanks
------

[](#thanks)

Thanks to [Luke Youell](https://github.com/lukeyouell) for creating this plugin, and to everyone who used and contributed to it over the years.

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance62

Regular maintenance activity

Popularity33

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 78.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~218 days

Recently: every ~470 days

Total

10

Last Release

1166d ago

Major Versions

1.3.0 → 2.0.0-beta.12023-06-08

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/24975058?v=4)[Luke](/maintainers/lukeyouell)[@lukeyouell](https://github.com/lukeyouell)

---

Top Contributors

[![lukeyouell](https://avatars.githubusercontent.com/u/24975058?v=4)](https://github.com/lukeyouell "lukeyouell (26 commits)")[![jalendport](https://avatars.githubusercontent.com/u/6537823?v=4)](https://github.com/jalendport "jalendport (6 commits)")[![jhagel](https://avatars.githubusercontent.com/u/11066431?v=4)](https://github.com/jhagel "jhagel (1 commits)")

---

Tags

GuzzlecmsCraftcraftcmscraft-pluginfetch

### Embed Badge

![Health badge](/badges/lukeyouell-craft-fetch/health.svg)

```
[![Health](https://phpackages.com/badges/lukeyouell-craft-fetch/health.svg)](https://phpackages.com/packages/lukeyouell-craft-fetch)
```

###  Alternatives

[verbb/formie

The most user-friendly forms plugin for Craft.

101400.6k78](/packages/verbb-formie)[verbb/hyper

A user-friendly links field for Craft.

24153.5k14](/packages/verbb-hyper)[verbb/vizy

A flexible visual editor field for Craft.

4251.5k1](/packages/verbb-vizy)[verbb/events

A full-featured plugin for event management and ticketing.

2312.1k](/packages/verbb-events)[verbb/icon-picker

A slick field to pick icons from. Supports SVGs, Sprites, Webfonts, Font Awesome and more.

16172.7k7](/packages/verbb-icon-picker)[verbb/postie

Get shipping rates, tracking status and print labels with Australia Post, UPS, USPS, FedEx, DHL Express, and more.

1219.4k](/packages/verbb-postie)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
