PHPackages                             m1guelpf/ghost-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. m1guelpf/ghost-api

ActiveLibrary[API Development](/categories/api)

m1guelpf/ghost-api
==================

PHP Client for the Ghost Content API

v1.1.1(5y ago)94732[1 issues](https://github.com/m1guelpf/php-ghost-api/issues)[1 PRs](https://github.com/m1guelpf/php-ghost-api/pulls)MITPHPPHP ^5.5|^7.0

Since Jan 10Pushed 5y agoCompare

[ Source](https://github.com/m1guelpf/php-ghost-api)[ Packagist](https://packagist.org/packages/m1guelpf/ghost-api)[ Docs](https://github.com/m1guelpf/php-ghost-api)[ RSS](/packages/m1guelpf-ghost-api/feed)WikiDiscussions master Synced 2d ago

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

PHP Ghost API Client
====================

[](#php-ghost-api-client)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0de7e808d35c68f54597f9aedc6d5d11c559337266f633201d4c4f6c9f52826a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d316775656c70662f67686f73742d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/m1guelpf/ghost-api)[![Software License](https://camo.githubusercontent.com/97aec189cb6917479e115b032b5f64a49cf91435db68ee072145dfaaf842dec2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d316775656c70662f7068702d67686f73742d6170692e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/d602f097ef481f4fa02a41fec10852daba09ab84f418e627ef236093af048d10/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6d316775656c70662f7068702d67686f73742d6170692f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/m1guelpf/php-ghost-api)[![Total Downloads](https://camo.githubusercontent.com/278b0eed903f42196db514bf771892e36bfab05262b21e3d9b820d34c54d729e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d316775656c70662f67686f73742d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/m1guelpf/ghost-api)

This package makes it easy to interact with [the Ghost Content API](https://docs.ghost.org/api/content/).

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

[](#requirements)

This package requires PHP &gt;= 5.5.

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

[](#installation)

You can install the package via composer:

```
composer require m1guelpf/ghost-api
```

Usage
-----

[](#usage)

You must pass a Guzzle client and the API token to the constructor of `M1guelpf\GhostAPI\Ghost`.

```
$ghost = new \M1guelpf\GhostAPI\Ghost('YOUR_API_TOKEN');
```

or you can skip the token and use the `connect()` method later

```
$ghost = new \M1guelpf\GhostAPI\Ghost();

$ghost->connect('YOUR_GHOST_API_TOKEN');
```

### Posts

[](#posts)

```
$ghost->getPosts($include, $fields, $filter, $limit, $page, $order, $format);

$ghost->getPost($id);

$ghost->getPostBySlug($slug);
```

### Pages

[](#pages)

```
$ghost->getPages($include, $fields, $filter, $limit, $page, $order, $format);

$ghost->getPage($id);

$ghost->getPageBySlug($slug);
```

### Authors

[](#authors)

```
$ghost->getAuthors($include, $fields, $filter, $limit, $page, $order);

$ghost->getAuthor($id);

$ghost->getAuthorBySlug($slug);
```

### Tags

[](#tags)

```
$ghost->getTags($include, $fields, $filter, $limit, $page, $order);

$ghost->getTag($id);

$ghost->getTagBySlug($slug);
```

### Get the Guzzle Client

[](#get-the-guzzle-client)

```
$ghost->getClient();
```

### Set the Guzzle Client

[](#set-the-guzzle-client)

```
$client = new \GuzzleHttp\Client(); // Example Guzzle client
$ghost->setClient($client);
```

where $client is an instance of `\GuzzleHttp\Client`.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Miguel Piedrafita](https://github.com/m1guelpf)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License. Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Total

3

Last Release

1915d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23558090?v=4)[Miguel Piedrafita](/maintainers/m1guelpf)[@m1guelpf](https://github.com/m1guelpf)

---

Top Contributors

[![m1guelpf](https://avatars.githubusercontent.com/u/23558090?v=4)](https://github.com/m1guelpf "m1guelpf (2 commits)")

---

Tags

m1guelpfGhostghost-apighost-content-api

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/m1guelpf-ghost-api/health.svg)

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

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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