PHPackages                             a2zwebltd/brandgeo-laravel-client - 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. a2zwebltd/brandgeo-laravel-client

ActiveLibrary

a2zwebltd/brandgeo-laravel-client
=================================

Official Laravel client (SDK) for the BrandGEO public API — brands, AI visibility audits and monitoring data with typed DTOs.

v1.0.0(yesterday)07↑2900%1MITPHP ^8.2

Since Jul 22Compare

[ Source](https://github.com/a2zwebltd/brandgeo-laravel-client)[ Packagist](https://packagist.org/packages/a2zwebltd/brandgeo-laravel-client)[ Docs](https://github.com/a2zwebltd/brandgeo-laravel-client)[ RSS](/packages/a2zwebltd-brandgeo-laravel-client/feed)WikiDiscussions Synced today

READMEChangelog (1)Dependencies (6)Versions (2)Used By (1)

BrandGEO Laravel Client
=======================

[](#brandgeo-laravel-client)

[![Packagist Version](https://camo.githubusercontent.com/4b853d04e059dd3cb4da233375603828538b473bf241798156488d3164874f3f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61327a7765626c74642f6272616e6467656f2d6c61726176656c2d636c69656e742e737667)](https://packagist.org/packages/a2zwebltd/brandgeo-laravel-client)[![Downloads](https://camo.githubusercontent.com/32c22c2698bc6ed3ffd27368a600cef8f6bb08a05fd357b5dee7d0f8787f9ea0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61327a7765626c74642f6272616e6467656f2d6c61726176656c2d636c69656e742e737667)](https://packagist.org/packages/a2zwebltd/brandgeo-laravel-client)[![PHP](https://camo.githubusercontent.com/b5d4f7901c58ad1ddfff679966f426cc25a9354bab763846b9a7276c2feab4e0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e322d626c7565)](https://camo.githubusercontent.com/b5d4f7901c58ad1ddfff679966f426cc25a9354bab763846b9a7276c2feab4e0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e322d626c7565)[![Laravel](https://camo.githubusercontent.com/10e97e515dc22be3660c357cbb7b33a51a586f88f0095412c7ec2f635c7b704c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d3131253230253743253230313225323025374325323031332d626c7565)](https://camo.githubusercontent.com/10e97e515dc22be3660c357cbb7b33a51a586f88f0095412c7ec2f635c7b704c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d3131253230253743253230313225323025374325323031332d626c7565)

Official Laravel SDK for the [BrandGEO](https://brandgeo.co) public API — your brands, AI visibility audits and monitoring data as typed, readonly DTOs.

Features
--------

[](#features)

- **Typed everything** — readonly DTOs and string-backed enums for every resource; dates as `CarbonImmutable`.
- **Full API surface** — account &amp; subscription, brands, audits with per-engine reports (six visibility dimensions, findings, GEO action plan), monitors with competitors, prompt runs, snapshots, share of voice and trends.
- **Pagination that scales** — page &amp; cursor paginators with `nextPage()` and `lazy()` auto-pagination via `LazyCollection`.
- **Typed errors** — one exception class per API error (401/402/404/422/429/5xx) with rate-limit metadata on 429s.
- **Multi-account ready** — immutable `withApiKey()` clones for agency apps managing many BrandGEO accounts.
- **Test-friendly** — routes through Laravel's HTTP factory, so `Http::fake()` just works.

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

[](#requirements)

- PHP 8.2+
- Laravel 11 / 12 / 13

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

[](#installation)

```
composer require a2zwebltd/brandgeo-laravel-client
```

Generate an API key at [Settings → API](https://brandgeo.co/settings/api) in your BrandGEO dashboard, then add it to `.env`:

```
BRANDGEO_API_KEY=1|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```

Optionally publish the config (`base_url`, timeout, retries, TLS verify):

```
php artisan vendor:publish --tag=brandgeo-client-config
```

Quick start
-----------

[](#quick-start)

```
use A2ZWeb\BrandGeoClient\Facades\BrandGeo;

$account = BrandGeo::account()->get();

$account->subscription->status;   // SubscriptionStatus::Trial|Active|Free|Expired
$account->quota->auditsPerMonth;  // null = unlimited
$account->usage->auditsRemaining;
```

Prefer dependency injection? Type-hint `A2ZWeb\BrandGeoClient\BrandGeoClient` — it's a container singleton.

Usage
-----

[](#usage)

### Brands

[](#brands)

```
$page = BrandGeo::brands()->list(perPage: 50);

foreach ($page as $brand) {
    $brand->name;
    $brand->latestAudit?->overallScore;   // 0–100
    $brand->monitor?->status;             // MonitorStatus enum
}

$brand = BrandGeo::brands()->get($uuid);
```

### Audits

[](#audits)

```
use A2ZWeb\BrandGeoClient\Enums\AuditStatus;

$audits = BrandGeo::audits()->list(brand: $brandUuid, status: AuditStatus::Done);

$audit = BrandGeo::audits()->get($uuid);   // embeds reports + recommendations

foreach ($audit->reports as $report) {
    if ($report->isLocked()) {
        // Trial paywall: only uuid/provider/mode/status are available.
        continue;
    }

    $report->provider;          // Provider enum
    $report->normalizedScore;   // 0–100
    $report->grade;             // A–F
    $report->result;            // per-section scoring + analysis (array)
}
```

Poll a running audit cheaply:

```
do {
    sleep(5);
    $reports = BrandGeo::audits()->reports($uuid);
    $pending = collect($reports)->filter(
        fn ($r) => in_array($r->status->value, ['queued', 'processing'])
    );
} while ($pending->isNotEmpty());
```

Recommendations are gated by plan — trial accounts get a preview:

```
$rec = $audit->recommendations;

if ($rec?->isPreview()) {
    $rec->actionPlan;      // top ~25% of the plan (min 3 items)
    $rec->lockedActions;   // how many more are behind the paywall
} else {
    $rec?->raw;            // the full GEO document (citation gates, JSON-LD, roadmap…)
}
```

### Monitors

[](#monitors)

```
use A2ZWeb\BrandGeoClient\Enums\Provider;
use A2ZWeb\BrandGeoClient\Resources\MonitorsResource;

$monitor = BrandGeo::monitors()->get($uuid);
$monitor->latestSnapshot?->visibilityScore;

BrandGeo::monitors()->competitors($uuid);
BrandGeo::monitors()->promptTemplates($uuid, isActive: true);

BrandGeo::monitors()->runs(
    $uuid,
    provider: Provider::Gemini,
    brandMentioned: true,
    from: now()->subWeek(),
);

// Snapshots default to the overall (cross-engine) rows — provider === null.
BrandGeo::monitors()->snapshots($uuid);
BrandGeo::monitors()->snapshots($uuid, provider: Provider::Openai);
BrandGeo::monitors()->snapshots($uuid, provider: MonitorsResource::PROVIDER_ALL);

$trend = BrandGeo::monitors()->trend($uuid, days: 90);
$trend->daysApplied;   // clamped to your plan's trend-history window
foreach ($trend as $point) {
    [$point->date, $point->visibilityScore];
}
```

Pagination
----------

[](#pagination)

`foreach ($page)` iterates the fetched page only. `nextPage()` fetches the next one; `lazy()` auto-paginates:

```
$page = BrandGeo::brands()->list();

while ($page !== null) {
    foreach ($page as $brand) { /* … */ }
    $page = $page->nextPage();
}

// Or let LazyCollection walk every page for you:
BrandGeo::audits()->list()->lazy()->each(fn ($audit) => /* … */);
BrandGeo::monitors()->runs($uuid)->lazy()->take(500)->filter(fn ($r) => $r->brandMentioned);
```

Multiple accounts (agencies)
----------------------------

[](#multiple-accounts-agencies)

`withApiKey()` returns an immutable clone — the configured singleton is never mutated:

```
foreach ($customers as $customer) {
    $client = BrandGeo::withApiKey($customer->brandgeo_api_key);
    $client->brands()->list();
}
```

Error handling
--------------

[](#error-handling)

All API errors extend `A2ZWeb\BrandGeoClient\Exceptions\BrandGeoException` (`$status`, `$body`):

ExceptionStatusNotes`MissingApiKeyException`—no key configured`AuthenticationException`401invalid or revoked key`SubscriptionRequiredException`402trial expired — detail endpoints paywalled; `/account` + lists still work`NotFoundException`404missing **or owned by another account** (indistinguishable by design)`ValidationException`422invalid query params — see `$errors``RateLimitException`429see `$retryAfter`, `$limit`, `$remaining``ApiException`other5xx / unexpected```
use A2ZWeb\BrandGeoClient\Exceptions\RateLimitException;

try {
    $audit = BrandGeo::audits()->get($uuid);
} catch (RateLimitException $e) {
    sleep($e->retryAfter ?? 60);
    // retry…
}
```

Connection failures throw Laravel's `Illuminate\Http\Client\ConnectionException` (enable retries via `BRANDGEO_RETRY_TIMES`).

Testing
-------

[](#testing)

The client routes through Laravel's HTTP factory, so `Http::fake()` just works:

```
use Illuminate\Support\Facades\Http;

Http::fake([
    'brandgeo.co/api/v1/account' => Http::response(['data' => [/* … */]]),
    'brandgeo.co/api/v1/brands*' => Http::response(['data' => [], 'links' => [], 'meta' => []]),
]);
```

Run the package's own suite with `composer test` (Pest + Testbench, fully `Http::fake()`d).

BrandGEO API resources
----------------------

[](#brandgeo-api-resources)

- [BrandGEO](https://brandgeo.co) — AI brand visibility audits &amp; monitoring
- [API documentation](https://brandgeo.co/developers) — endpoints, auth, plan access, FAQ
- [Interactive API playground](https://brandgeo.co/developers/playground) — try every endpoint in the browser
- [OpenAPI 3.1 spec (YAML)](https://brandgeo.co/developers/openapi.yaml) — machine-readable contract (a copy ships in [`docs/api.openapi.yaml`](docs/api.openapi.yaml))
- [Get your API key](https://brandgeo.co/settings/api) — Settings → API in your dashboard
- [`a2zwebltd/brandgeo-laravel-nova`](https://github.com/a2zwebltd/brandgeo-laravel-nova) — BrandGEO dashboard inside Laravel Nova, built on this SDK

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

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

License
-------

[](#license)

MIT. See [LICENSE](LICENSE.md).

Credits
-------

[](#credits)

Developed and maintained by the **A2Z WEB** crew:

- [Dawid Makowski](https://github.com/makowskid)
- Website:
- GitHub:

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance100

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

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

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2b500dd3d9b470b50b1ed911cd24a6fdcce51dd97dceb4f97879f727a14495a8?d=identicon)[dawid-makowski](/maintainers/dawid-makowski)

---

Tags

laravelsdkapi clientgeoai visibilitybrand monitoringbrandgeo

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/a2zwebltd-brandgeo-laravel-client/health.svg)

```
[![Health](https://phpackages.com/badges/a2zwebltd-brandgeo-laravel-client/health.svg)](https://phpackages.com/packages/a2zwebltd-brandgeo-laravel-client)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M1.0k](/packages/statamic-cms)[backpack/crud

Quickly build admin interfaces using Laravel, Bootstrap and JavaScript.

3.4k3.7M223](/packages/backpack-crud)[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[leantime/leantime

Open source project management system for non-project managers. Simple like Trello, powerful like Jira. Built with neurodiversity in mind.

10.2k4.0k](/packages/leantime-leantime)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

293.1k](/packages/eslazarev-wildberries-sdk)[firefly-iii/data-importer

Firefly III Data Import Tool.

8055.8k](/packages/firefly-iii-data-importer)

PHPackages © 2026

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