PHPackages                             grzgajda/comicvine-api - 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. grzgajda/comicvine-api

AbandonedArchivedLibrary[API Development](/categories/api)

grzgajda/comicvine-api
======================

PHP class wrapper providing a simple and flexible methods to using ComicVine API.

v1.1.5(10y ago)7562MITPHP

Since Nov 10Pushed 10y agoCompare

[ Source](https://github.com/grz-gajda/comicvine-api)[ Packagist](https://packagist.org/packages/grzgajda/comicvine-api)[ RSS](/packages/grzgajda-comicvine-api/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (4)Used By (0)

ComicVine API
=============

[](#comicvine-api)

[![Scrutinizer](https://camo.githubusercontent.com/ff434fcfeb4df30def1886a928519390d746e6783fa9ef43e3f085cea1830150/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f67727a2d67616a64612f636f6d696376696e652d6170692e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/grz-gajda/comicvine-api/)[![Build Status](https://camo.githubusercontent.com/b55e1ad490692495c77b75b99c91dade8bb22b9ebcbd9d8650b83784db935752/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f67727a2d67616a64612f636f6d696376696e652d6170692e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/grz-gajda/comicvine-api)[![Coveralls](https://camo.githubusercontent.com/cbcee3c22a86bff91d9ad85d2fbe0d89a995ef616b33746160fd3469cddb04d7/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f67727a2d67616a64612f636f6d696376696e652d6170692e7376673f7374796c653d666c61742d737175617265)](https://coveralls.io/github/grz-gajda/comicvine-api)[![Packagist](https://camo.githubusercontent.com/74835cfa9556966dfbd8c4935cb6b262c3603fb9945ecc4f388f3ba86f753a80/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67727a67616a64612f636f6d696376696e652d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/grzgajda/comicvine-api)[![Packagist](https://camo.githubusercontent.com/7f4037834f8c89190cb0c9f40a00832e45842b9e44a8ef83f54ef6657456d520/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f67727a67616a64612f636f6d696376696e652d6170692e7376673f7374796c653d666c61742d737175617265)](https://opensource.org/licenses/MIT)

**Author**: Grzegorz Gajda **

### Update v1.1.1

[](#update-v111)

Arguments for filters etc. didn't work when string has space character. With version 1.1.1, it is fixed. Also 98% of code has coverage (directory `tests`).

### Update v1.1.0

[](#update-v110)

If you don't want to use `CURLConnection` class, I added built-in integration with [guzzlehttp/guzzle](https://github.com/guzzle/guzzle) package. Since version 1.1.0, default provider for HTTP connection is `GuzzleConnection` class.

### Basic usage

[](#basic-usage)

First, we need to create instance of `RegisterKey` object to verify our key. We can use `ComicVine` static class to make that object.

```
$apiKey = ComicVine::makeApiKey('YOUR_KEY');
```

Next, we need register key and connection to `ComicVine` class. By default, method `register` use built-in `CURLConnection` class to make connections. Then, you haven't to write second argument.

```
ComicVine::register($instanceOfRegisterKey, $instanceOfConnection = null)
```

After registering, we can creating query to ComicVine API. But by default, response will be in XML format. We can change response format by creating instance of `ResponseFormat` class.

```
$responseFormat = ComicVine::createFormat('json');
```

and then using query (we want to find url to Batman):

```
$response = ComicVine::getCharacters()
    ->setFormat($responseFormat)
    ->setFilters(['name' => 'Batman']
    ->setLimit(1)
    ->setFieldList(['api_detail_url'])
    ->getResponse();
```

Now, variable `$response` keep our JSON response from ComicVine API.

### Requests

[](#requests)

List of implemented resources:

URLmethodimplemented?/characternonefalse/charactersgetCharacterstrue/chatnonefalse/chatsgetChatstrue/conceptnonefalse/conceptsgetConceptstrue/episodenonefalse/episodesgetEpisodestrue/issuenonefalse/issuesgetIssuestrue/locationnonefalse/locationsgetLocationstrue/movienonefalse/moviesgetMoviestrue/objectnonefalse/objectsgetObjectstrue/originnonefalse/originsgetOriginstrue/personnonefalse/peoplegetPeopletrue/powernonefalse/powersgetPowerstrue/promononefalse/promosgetPromostrue/publishernonefalse/publishersgetPublisherstrue/seriesnonefalse/series\_listgetSeriesListtrue/searchgetSearchfalse/story\_arcnonefalse/story\_arcsgetStoryArcstrue/teamnonefalse/teamsgetTeamstrue/videononefalse/videosgetVideosfalse/video\_typenonefalse/video\_typesgetVideoTypestrue/volumenonefalse/volumesgetVolumestrueCalling each one of `get` method creating a new instance of `ControllerQuery` class. `ControllerQuery` class allows us to:

```
/*
 * Argument for setFieldList is array containing
 * only names of fields which we want.
 */
$response->setFieldList(['api_detail_url', 'aliases'])
/*
 * Set filters to find resource you want. It needs key => value
 * schema and allows for many filters.
 */
    ->setFilters(['name' => 'Batman', 'aliases' => 'Fatherless'])
/*
 * Allows to sort response. Key is name of field, value is asc or desc
 * only.
 */
    ->setSort(['date_added' => 'asc'])
/*
 * Set how much elements do you want to get. Maximum limit is 100
 * (API restrictions).
 */
    ->setLimit(100)
/*
 * From which position we would want to start getting elements.
 */
    ->setOffset(50)
/*
 * After setting request query (set methods), times to get
 * response. Get response return XML object or JSON string.
 */
    ->getResponse()
```

### Extending

[](#extending)

Looking on current state of package, you can write your own `Connection` class (must implement `interface Connection`) and `ResponseFormat` (must implement `interface ResponseFormat`). We can use new `Connection` class in `ComicVine::register()` method and new `ResponseFormat` class in `setFormat` method.

### License

[](#license)

The package is open-sourced software licensed under the MIT license

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

 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

3

Last Release

3890d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/71a5bfe88b11354a719a8dec5b352db1d01e574de65980fffd95f0be2bf66304?d=identicon)[grz-gajda](/maintainers/grz-gajda)

---

Top Contributors

[![grz-gajda](https://avatars.githubusercontent.com/u/9571240?v=4)](https://github.com/grz-gajda "grz-gajda (30 commits)")

---

Tags

comicscomicvine-apipackagistcomicscomicbookscomicvinecomicvine-apigrzegorz gajda

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/grzgajda-comicvine-api/health.svg)

```
[![Health](https://phpackages.com/badges/grzgajda-comicvine-api/health.svg)](https://phpackages.com/packages/grzgajda-comicvine-api)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M992](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k39](/packages/neuron-core-neuron-ai)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

273.0k](/packages/eslazarev-wildberries-sdk)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.5M7](/packages/avalara-avataxclient)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)

PHPackages © 2026

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