PHPackages                             jacobknox/pokemon-tcg-sdk-php - 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. jacobknox/pokemon-tcg-sdk-php

ActiveLibrary[API Development](/categories/api)

jacobknox/pokemon-tcg-sdk-php
=============================

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

2.1.1(3y ago)182MITPHPPHP ^5.5 || ^5.6 || ^7.0 || ^7.3 || ^7.4 || ^8.0

Since Nov 8Pushed 3y agoCompare

[ Source](https://github.com/JacobKnox/pokemon-tcg-sdk-php)[ Packagist](https://packagist.org/packages/jacobknox/pokemon-tcg-sdk-php)[ RSS](/packages/jacobknox-pokemon-tcg-sdk-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Pokémon TCG SDK
===============

[](#pokémon-tcg-sdk)

[![pokemontcg-developers on discord](https://camo.githubusercontent.com/acb69688593b4b9550df356b6cd9caffba0d4ad6397773fcf3a3443c82e30bce/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646973636f72642d706f6b656d6f6e7463672d2d646576656c6f706572732d3733386264372e737667)](https://discord.gg/dpsTCvg)[![Build Status](https://camo.githubusercontent.com/dc7eef527bc01142c09f754d34106378eca1e328e35da0b0137a7070c434ec75/68747470733a2f2f7472617669732d63692e6f72672f506f6b656d6f6e5443472f706f6b656d6f6e2d7463672d73646b2d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/PokemonTCG/pokemon-tcg-sdk-php)[![Code Climate](https://camo.githubusercontent.com/f65ae48ba93d6bbcc5039989e232874f6b8b7b87068077dcedc086605e8da7d1/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f506f6b656d6f6e5443472f706f6b656d6f6e2d7463672d73646b2d7068702f6261646765732f6770612e737667)](https://codeclimate.com/github/PokemonTCG/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](http://pokemontcg.io/).

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

[](#installation)

```
composer require jacobknox/pokemon-tcg-sdk-php

```

Usage
-----

[](#usage)

Set ApiKey and options

[](#set-apikey-and-options)

[See the Guzzle 7 documentation for available options.](https://docs.guzzlephp.org/en/stable/request-options.html)

```
Pokemon::Options(['verify' => true]);
Pokemon::ApiKey('');

```

Find a Card by id

[](#find-a-card-by-id)

```
$card = Pokemon::Card()->find('xy1-1');

```

Filter Cards via query parameters

[](#filter-cards-via-query-parameters)

```
$cards = Pokemon::Card()->where(['set.name' => 'generations'])->where(['supertype' => 'pokemon'])->all();

$cards = Pokemon::Card()->where([
    'set.name' => 'roaring skies',
    'subtypes' => 'ex'
])->all();

```

Filter Cards via more complicated query parameters

[](#filter-cards-via-more-complicated-query-parameters)

```
$cards = Pokemon::Card()->where(['types' => ['OR', 'fire', 'water'])->where(['supertype' => 'pokemon'])->all();

$cards = Pokemon::Card()->where([
    'types' => ['OR', 'fire', 'water'],
    'subtypes' => 'ex'
])->all();

```

Order Cards

[](#order-cards)

There are four methods to order cards. You may use whichever one suits you. Please note that they will sorted first by the first array/list item then by the second and so on until the end of the array/list.

#### Specify attribute and whether to sort ascending or descending

[](#specify-attribute-and-whether-to-sort-ascending-or-descending)

```
$cards = Pokemon::Card()->orderBy(['name' => 1, 'number' => -1])->all();

```

Permitted values to represent ascending: 1, 'ascending', ''. Permitted values to represent descending: -1, 'descending', '-'.

#### Specify attributes with order indicator ('-' indicates descending, lack thereof indicates ascending)

[](#specify-attributes-with-order-indicator---indicates-descending-lack-thereof-indicates-ascending)

```
$cards = Pokemon::Card()->orderBy(['name', '-number'])->all();

```

#### Specify comma-separated list of attributes

[](#specify-comma-separated-list-of-attributes)

```
$cards = Pokemon::Card()->orderBy(['name,-number'])->all();

```

Get all Cards

[](#get-all-cards)

```
$cards = Pokemon::Card()->all();

```

Paginate Card queries

[](#paginate-card-queries)

```
$cards = Pokemon::Card()->where([
    'set.legalities.standard' => 'legal'
])->page(8)->pageSize(100)->all();

```

Get Card pagination information

[](#get-card-pagination-information)

```
$pagination = Pokemon::Card()->where([
    'set.legalities.standard' => 'legal'
])->pagination();

```

Find a Set by set code

[](#find-a-set-by-set-code)

```
$set = Pokemon::Set()->find('base1');

```

Filter Sets via query parameters

[](#filter-sets-via-query-parameters)

```
$set = Pokemon::Set()->where(['legalities.standard' => 'legal'])->all();

```

Paginate Set queries

[](#paginate-set-queries)

```
$set = Pokemon::Set()->page(2)->pageSize(10)->all();

```

Get Set pagination information

[](#get-set-pagination-information)

```
$pagination = Pokemon::Set()->pagination();

```

Get all Sets

[](#get-all-sets)

```
$sets = Pokemon::Set()->all();

```

Get all Types

[](#get-all-types)

```
$types = Pokemon::Type()->all();

```

Get all Subtypes

[](#get-all-subtypes)

```
$subtypes = Pokemon::Subtype()->all();

```

Get all Supertypes

[](#get-all-supertypes)

```
$supertypes = Pokemon::Supertype()->all();

```

Get all Rarities

[](#get-all-rarities)

```
$supertypes = Pokemon::Rarity()->all();

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60.9% 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

Unknown

Total

1

Last Release

1280d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2569ef7d61980cc5b6be29bb36ca4acef46f9f9342aeefe6a3b3ad3a54db08da?d=identicon)[JKnox203](/maintainers/JKnox203)

---

Top Contributors

[![mmonkey](https://avatars.githubusercontent.com/u/1395879?v=4)](https://github.com/mmonkey "mmonkey (39 commits)")[![JacobKnox](https://avatars.githubusercontent.com/u/22843779?v=4)](https://github.com/JacobKnox "JacobKnox (17 commits)")[![oliversarfas](https://avatars.githubusercontent.com/u/12659572?v=4)](https://github.com/oliversarfas "oliversarfas (4 commits)")[![DynamoGeek](https://avatars.githubusercontent.com/u/3771182?v=4)](https://github.com/DynamoGeek "DynamoGeek (3 commits)")[![adback03](https://avatars.githubusercontent.com/u/3609623?v=4)](https://github.com/adback03 "adback03 (1 commits)")

---

Tags

sdktcgpokemon

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jacobknox-pokemon-tcg-sdk-php/health.svg)

```
[![Health](https://phpackages.com/badges/jacobknox-pokemon-tcg-sdk-php/health.svg)](https://phpackages.com/packages/jacobknox-pokemon-tcg-sdk-php)
```

###  Alternatives

[openai-php/laravel

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

3.7k7.6M74](/packages/openai-php-laravel)[saloonphp/saloon

Build beautiful API integrations and SDKs with Saloon

2.4k9.6M468](/packages/saloonphp-saloon)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[php-opencloud/openstack

PHP SDK for OpenStack APIs. Supports BlockStorage, Compute, Identity, Images, Networking and Metric Gnocchi

2292.2M24](/packages/php-opencloud-openstack)[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)[mailchimp/transactional

458.9M16](/packages/mailchimp-transactional)

PHPackages © 2026

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