PHPackages                             cloudflare/sdk - 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. [API Development](/categories/api)
4. /
5. cloudflare/sdk

ActiveLibrary[API Development](/categories/api)

cloudflare/sdk
==============

PHP binding for v4 of the Cloudflare Client API.

2.0.0(2w ago)6697.5M↓26.8%270[46 issues](https://github.com/cloudflare/cloudflare-php/issues)[44 PRs](https://github.com/cloudflare/cloudflare-php/pulls)20BSD-3-ClausePHPPHP &gt;=8.1CI passing

Since Aug 29Pushed 2w ago24 watchersCompare

[ Source](https://github.com/cloudflare/cloudflare-php)[ Packagist](https://packagist.org/packages/cloudflare/sdk)[ RSS](/packages/cloudflare-sdk/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (10)Versions (29)Used By (20)

Cloudflare SDK (v4 API Binding for PHP)
=======================================

[](#cloudflare-sdk-v4-api-binding-for-php)

> **Note:** This is a community-maintained PHP SDK covering a subset of the Cloudflare API. A comprehensive, auto-generated PHP SDK is planned for the future. In the meantime, for full API coverage consider using the [Cloudflare API](https://developers.cloudflare.com/api/) directly.

Requirements
------------

[](#requirements)

- PHP 8.1 or later

Installation
------------

[](#installation)

Install via Composer ([cloudflare/sdk](https://packagist.org/packages/cloudflare/sdk)):

```
composer require cloudflare/sdk

```

Cloudflare API version 4
------------------------

[](#cloudflare-api-version-4)

The Cloudflare API can be found [here](https://developers.cloudflare.com/api/). Each API call is provided via a similarly named function within various classes in the **Cloudflare\\API\\Endpoints** namespace:

- [DNS Records](https://www.cloudflare.com/dns/)
- DNS Analytics
- Zones
- User Administration (partial)
- [Cloudflare IPs](https://www.cloudflare.com/ips/)
- Page Rules
- [Web Application Firewall (WAF)](https://www.cloudflare.com/waf/)
- Virtual DNS Management
- Custom hostnames
- Manage TLS settings
- Zone Lockdown and User-Agent Block rules
- Organization Administration
- [Railgun](https://www.cloudflare.com/railgun/) administration
- [Keyless SSL](https://blog.cloudflare.com/keyless-ssl-the-nitty-gritty-technical-details/)
- [Origin CA](https://blog.cloudflare.com/universal-ssl-encryption-all-the-way-to-the-origin-for-free/)
- Crypto
- Load Balancers
- Firewall Settings

Getting Started
---------------

[](#getting-started)

```
$key     = new Cloudflare\API\Auth\APIKey('user@example.com', 'apiKey');
$adapter = new Cloudflare\API\Adapter\Guzzle($key);
$user    = new Cloudflare\API\Endpoints\User($adapter);

echo $user->getUserID();
```

Contributions
-------------

[](#contributions)

We welcome community contribution to this repository. [CONTRIBUTING.md](CONTRIBUTING.md) will help you start contributing.

Licensing
---------

[](#licensing)

Licensed under the 3-clause BSD license. See the [LICENSE](LICENSE) file for details.

###  Health Score

77

—

ExcellentBetter than 100% of packages

Maintenance95

Actively maintained with recent releases

Popularity69

Solid adoption and visibility

Community52

Growing community involvement

Maturity82

Battle-tested with a long release history

 Bus Factor4

4 contributors hold 50%+ of commits

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 ~146 days

Recently: every ~461 days

Total

23

Last Release

14d ago

Major Versions

0.9.1 → 1.0.02017-09-20

1.4.0 → 2.0.02026-06-18

PHP version history (3 changes)0.9.1PHP &gt;=7.0.0

1.1.7PHP &gt;=7.2.5

2.0.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/c79189ba99de1d27fea43e4ad20d52415c60f8f037a2c0f2be9629bbc9bde9cc?d=identicon)[nkcmr](/maintainers/nkcmr)

![](https://www.gravatar.com/avatar/01289422019b1d7d0535cd69eee056677475c666cf434288021e770926aa69cc?d=identicon)[ssicard](/maintainers/ssicard)

![](https://www.gravatar.com/avatar/2ad3d3a12c69cfac3994d32cb2206fc478f683117dc74dc9cbbfe156fcf1fa25?d=identicon)[mgirouard](/maintainers/mgirouard)

![](https://www.gravatar.com/avatar/9a318980aea834c7abd65d9105002810a85e6fa98db10b9858d5068b84b1b928?d=identicon)[vaishakpdinesh](/maintainers/vaishakpdinesh)

![](https://www.gravatar.com/avatar/ab923961a094a3fe7cb70ac0d2c0a818e1f1081eee510789af58697db4e82050?d=identicon)[rotem-cloud](/maintainers/rotem-cloud)

![](https://www.gravatar.com/avatar/6169b061358dfed423afd8d627a9fa2382ab5fe3d66ae37cc80513a9895a825e?d=identicon)[musa-cf](/maintainers/musa-cf)

---

Top Contributors

[![IcyApril](https://avatars.githubusercontent.com/u/2026099?v=4)](https://github.com/IcyApril "IcyApril (74 commits)")[![phily245](https://avatars.githubusercontent.com/u/645738?v=4)](https://github.com/phily245 "phily245 (35 commits)")[![exportsmedia](https://avatars.githubusercontent.com/u/5817656?v=4)](https://github.com/exportsmedia "exportsmedia (19 commits)")[![kleisauke](https://avatars.githubusercontent.com/u/12746591?v=4)](https://github.com/kleisauke "kleisauke (18 commits)")[![levidurfee](https://avatars.githubusercontent.com/u/10798199?v=4)](https://github.com/levidurfee "levidurfee (14 commits)")[![benedict-erwin](https://avatars.githubusercontent.com/u/3462264?v=4)](https://github.com/benedict-erwin "benedict-erwin (13 commits)")[![kanasite](https://avatars.githubusercontent.com/u/985129?v=4)](https://github.com/kanasite "kanasite (12 commits)")[![ssicard](https://avatars.githubusercontent.com/u/18204584?v=4)](https://github.com/ssicard "ssicard (11 commits)")[![anthonysterling](https://avatars.githubusercontent.com/u/159960?v=4)](https://github.com/anthonysterling "anthonysterling (11 commits)")[![pauladams8](https://avatars.githubusercontent.com/u/37362614?v=4)](https://github.com/pauladams8 "pauladams8 (10 commits)")[![jacobbednarz](https://avatars.githubusercontent.com/u/283234?v=4)](https://github.com/jacobbednarz "jacobbednarz (8 commits)")[![legacybetadev](https://avatars.githubusercontent.com/u/52174826?v=4)](https://github.com/legacybetadev "legacybetadev (8 commits)")[![davidbarratt](https://avatars.githubusercontent.com/u/868364?v=4)](https://github.com/davidbarratt "davidbarratt (5 commits)")[![beltofte](https://avatars.githubusercontent.com/u/108249?v=4)](https://github.com/beltofte "beltofte (4 commits)")[![HemeraOne](https://avatars.githubusercontent.com/u/13874964?v=4)](https://github.com/HemeraOne "HemeraOne (3 commits)")[![darinrandal](https://avatars.githubusercontent.com/u/28626802?v=4)](https://github.com/darinrandal "darinrandal (3 commits)")[![thellimist](https://avatars.githubusercontent.com/u/6690196?v=4)](https://github.com/thellimist "thellimist (3 commits)")[![zaherg](https://avatars.githubusercontent.com/u/27624?v=4)](https://github.com/zaherg "zaherg (2 commits)")[![axelabhay](https://avatars.githubusercontent.com/u/53849656?v=4)](https://github.com/axelabhay "axelabhay (2 commits)")[![czPechy](https://avatars.githubusercontent.com/u/8396185?v=4)](https://github.com/czPechy "czPechy (2 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/cloudflare-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/cloudflare-sdk/health.svg)](https://phpackages.com/packages/cloudflare-sdk)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M736](/packages/sylius-sylius)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)

PHPackages © 2026

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