PHPackages                             tcgdex/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. tcgdex/sdk

ActiveLibrary[API Development](/categories/api)

tcgdex/sdk
==========

PHP SDK to communicate with the TCGdex API

2.2.0(1y ago)123.9k↓19%2[1 PRs](https://github.com/tcgdex/php-sdk/pulls)MITPHPPHP &gt;=8.1CI passing

Since Jun 22Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/tcgdex/php-sdk)[ Packagist](https://packagist.org/packages/tcgdex/sdk)[ GitHub Sponsors](https://github.com/sponsors/tcgdex)[ RSS](/packages/tcgdex-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (14)Used By (0)

 [ ![TCGdex Main Image](https://camo.githubusercontent.com/96110c88cfc285cc39cde58a79f5ef96122f46793a84813ea8732e1b882f2731/68747470733a2f2f7777772e7463676465782e6e65742f6173736574732f6f672e706e67) ](https://www.tcgdex.net)

 [ ![Packagist Version](https://camo.githubusercontent.com/cde6b161ea9cb4b369206cb81010f460a3416e34b16634a5822414e033c4bac6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f7463676465782f7068702d73646b3f696e636c7564655f70726572656c6561736573267374796c653d666c61742d737175617265) ](https://packagist.org/packages/tcgdex/sdk) [ ![NPM Downloads](https://camo.githubusercontent.com/f4dd0f9bf18d18360ca7fb667ab8398d8ae224ba1d8dd47023ec00ee9918a067/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f7463676465782f73646b3f7374796c653d666c61742d737175617265) ](https://packagist.org/packages/tcgdex/sdk) [ ![npm version](https://camo.githubusercontent.com/98f6e5275482b64e723fcadead73d224bf25347c8d332c73b2b22d0a712e4867/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f7463676465782f7068702d73646b3f7374796c653d666c61742d73717561726526746f6b656e3d4d43454e47424443584e) ](https://app.codecov.io/gh/tcgdex/php-sdk/) [ ![the TCGdex PHP SDK is released under the MIT license.](https://camo.githubusercontent.com/f3b347548bc531f0564b8f5f8806e9e6c2ad30deccc146533fbfa27944f4b54f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7463676465782f7068702d73646b3f7374796c653d666c61742d737175617265) ](https://github.com/tcgdex/php-sdk/blob/master/LICENSE.md) [ ![the TCGdex PHP SDK's automated builds.](https://camo.githubusercontent.com/3c77f49ba8f3433e7d673646d361873d28b545dfe0a36af0543d0aca4ef4e079/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7463676465782f7068702d73646b2f6275696c642d746573742e796d6c3f7374796c653d666c61742d737175617265) ](https://github.com/tcgdex/php-sdk/actions/workflows/build-test.yml) [ ![Discord Link](https://camo.githubusercontent.com/b991b2ccc5342a8ce7d8bf98d37556dcdb3d593f04f295f685276291ff9e06d9/68747470733a2f2f696d672e736869656c64732e696f2f646973636f72642f3835373233313034313236313037363439313f636f6c6f723d253233353836354632266c6162656c3d446973636f7264267374796c653d666c61742d737175617265) ](https://discord.gg/NehYTAhsZE)

TCGdex PHP SDK
==============

[](#tcgdex-php-sdk)

This is the SDK used to communicate with the Open source [TCGdex API](https://www.github.com/tcgdex/cards-database) using PHP

[Full API/SDK documentation in progress here](https://tcgdex.dev/sdks/php?ref=sdk_php_readme)

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

[](#getting-started)

install the SDK using:

```
composer require tcgdex/sdk
# if you have no PSR 16/17/18 implementations add the following packages
composer require symfony/cache nyholm/psr7 kriswallsmith/buzz
# they will be automaticly setup for the project
# symfony/cache      === PSR16
# nyholm/psr7        === PSR17
# kriswallsmith/buzz === PSR18
```

Quick usage
-----------

[](#quick-usage)

```
use TCGdex\TCGdex;

// Is you are using your own PSRs implementations add theses before loading the class
TCGdex::$cache = /* PSR16 CacheInterface */;
TCGdex::$requestFactory = /* PSR17 RequestFactoryInterface */;
TCGdex::$responseFactory = /* PSR17 ResponseFactoryInterface */;
TCGdex::$client = /* PSR18 ClientInterface */;

// initialize the SDK with the language
$tcgdex = new TCGdex("en");

// Fetch the cards !
$card = $tcgdex->fetchCard('1', 'Sword & Shield');
```

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance57

Moderate activity, may be stable

Popularity32

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 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 ~144 days

Recently: every ~51 days

Total

10

Last Release

489d ago

PHP version history (3 changes)2.0.0-BETAPHP &gt;=7.3

2.1.0PHP &gt;=7.4

2.1.1PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/701fa54873574bbf4d50a0fa5cb864c4a4d59e15b9e474385de6d649aea5008b?d=identicon)[Avior](/maintainers/Avior)

---

Top Contributors

[![Aviortheking](https://avatars.githubusercontent.com/u/15822031?v=4)](https://github.com/Aviortheking "Aviortheking (29 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (29 commits)")[![clussiana](https://avatars.githubusercontent.com/u/75131459?v=4)](https://github.com/clussiana "clussiana (2 commits)")

---

Tags

cardphppokemonsdktcgtcgdextradingsdkcardtradingtcgpokemontcgdex

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[openai-php/client

OpenAI PHP is a supercharged PHP API client that allows you to interact with the Open AI API

5.8k22.6M232](/packages/openai-php-client)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

963.1M35](/packages/getbrevo-brevo-php)[mozex/anthropic-php

Anthropic PHP is a supercharged community-maintained PHP API client that allows you to interact with Anthropic API.

46365.1k13](/packages/mozex-anthropic-php)[yoti/yoti-php-sdk

Yoti SDK for quickly integrating your PHP backend with Yoti

27539.9k1](/packages/yoti-yoti-php-sdk)[pokemon-tcg/pokemon-tcg-sdk-php

This is the Pokémon TCG SDK PHP implementation. It is a wrapper around the Pokémon TCG API of pokemontcg.io.

2410.1k](/packages/pokemon-tcg-pokemon-tcg-sdk-php)[webit/w-firma-api

wFirma.pl API

1820.2k](/packages/webit-w-firma-api)

PHPackages © 2026

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