PHPackages                             cdburgess/bggapi - 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. cdburgess/bggapi

ActiveLibrary[API Development](/categories/api)

cdburgess/bggapi
================

PHP Library - BoardGameGeek XML API2

v0.0.2(1y ago)05MITPHPPHP &gt;=8.3CI passing

Since Jan 20Pushed 1y ago1 watchersCompare

[ Source](https://github.com/cdburgess/bggapi)[ Packagist](https://packagist.org/packages/cdburgess/bggapi)[ RSS](/packages/cdburgess-bggapi/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

PHP - BGG API
=============

[](#php---bgg-api)

[![GitHub tag](https://camo.githubusercontent.com/14c3e488b4ee7ce7493faff2f9988562770fb6017807d267341cb19c9d3ad0b2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f6364627572676573732f6267676170692e737667)](https://github.com/cdburgess/bggapi/blob/master/tags)[![GitHub license](https://camo.githubusercontent.com/28685a49e3daff9df74258bc684b290296aa469bb8d3399811a9b533bc157f49/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6364627572676573732f6267676170692e737667)](https://github.com/cdburgess/bggapi/blob/main/LICENSE)[![build](https://github.com/cdburgess/bggapi/actions/workflows/php.yml/badge.svg?branch=master)](https://github.com/cdburgess/bggapi/actions/workflows/php.yml)[![Packagist Downloads](https://camo.githubusercontent.com/0adc65d202cd5eff4a2da194eb3027885f6de4b5caa3307496c2ae9336db1f01/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6364627572676573732f626767617069)](https://camo.githubusercontent.com/0adc65d202cd5eff4a2da194eb3027885f6de4b5caa3307496c2ae9336db1f01/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6364627572676573732f626767617069)

This project provides several request classes to interact with the BGG XML API2. Below are examples of how to run each type of request.

Requests
--------

[](#requests)

To submit a request to an endpoint on BoardGameGeek, simply create the request resource for the endpoint you desire. For example, if you want to request a specific board game, you create the `thing` request as follows:

```
$thing = new Thing();
```

Once you have the request object, you can set the various parameters for that request by referencing the method of the parameter name. For example, if you want to request the `Nemesis (2018)` board game, you set the id as follows:

```
$this->id(167355);
```

To send the request to the API, simply call send.

```
$data = $thing->send();
```

You can also combine this into a single request.

```
$thing = new Thing();
$data = $thing->id(167355)
    ->send();
```

There are a number of quests that accept multiple elements. This can be accomplished by passing these ids as an array.

```
$thing = new Thing();
$data = $thing->id([167355, 167356, 167357])
    ->send();
```

Data Formats
------------

[](#data-formats)

By default, the request will return a `SimpleXMLElement` file. There are two other supported formats: array and JSON. You can request these formats by calling their supported `to` methods.

```
$thing = new Thing();
$dataArray = $thing->id(167355)
    ->toArray()
    ->send();
```

```
$thing = new Thing();
$dataJson = $thing->id(167355)
    ->toJson()
    ->send();
```

### Request Options

[](#request-options)

```
$collection = new Collection();
$family = new Family();
$forumList = new ForumList();
$forum = new Forum();
$hot = new Hot();
$plays = new Plays();
$search = new Search();
$thing = new Thing();
$thread = new Thread();
$user = new User();
```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

528d ago

### Community

Maintainers

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

---

Top Contributors

[![cdburgess](https://avatars.githubusercontent.com/u/216284?v=4)](https://github.com/cdburgess "cdburgess (6 commits)")

###  Code Quality

TestsPest

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/cdburgess-bggapi/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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