PHPackages                             helgesverre/brandfetch-sdk - 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. helgesverre/brandfetch-sdk

ActiveLibrary[API Development](/categories/api)

helgesverre/brandfetch-sdk
==========================

Laravel SDK for Brandfetch

v2.0.0(2mo ago)91.3k1MITPHPPHP ^8.2CI passing

Since Oct 21Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/HelgeSverre/brandfetch-sdk)[ Packagist](https://packagist.org/packages/helgesverre/brandfetch-sdk)[ Docs](https://github.com/helgesverre/brandfetch-sdk)[ RSS](/packages/helgesverre-brandfetch-sdk/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (5)Dependencies (30)Versions (7)Used By (0)

[![Brandfetch SDK](art/header.png)](art/header.png)

Laravel SDK for Brandfetch
==========================

[](#laravel-sdk-for-brandfetch)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9b3dd4736c6b75a40991f9803b493f79ce8fc60aacbcd6fa29b3308582d15c40/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68656c67657376657272652f6272616e6466657463682d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/helgesverre/brandfetch-sdk)[![GitHub Tests Action Status](https://camo.githubusercontent.com/3317f97a355d8b0fc6dc31276d24b487b9366653098f653bec039e8142f4b2a1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f68656c67657376657272652f6272616e6466657463682d73646b2f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/helgesverre/brandfetch-sdk/actions?query=workflow%3Arun-tests+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/3b1eae8b4cbb7237e1e09e1a8556e7b8da7e8c2754e0c4078e74a1d83c16016c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f68656c67657376657272652f6272616e6466657463682d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/helgesverre/brandfetch-sdk)

Laravel SDK for interacting with the [Brandfetch API](https://docs.brandfetch.com/reference/get-started), get your API key from the [developer portal](https://developers.brandfetch.com/).

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

[](#installation)

You can install the package via composer:

```
composer require helgesverre/brandfetch-sdk
```

Then add your API key to your `.env` file.

```
BRANDFETCH_API_KEY="your-api-key"

```

You can publish the config file with:

```
php artisan vendor:publish --tag="brandfetch-sdk-config"
```

This is the contents of the published config file:

```
return [
    "brandfetch_api_key" => env("BRANDFETCH_API_KEY")
];
```

Usage
-----

[](#usage)

### Retrieve a brand

[](#retrieve-a-brand)

```
// Create your own instance
$brandfetch = new HelgeSverre\Brandfetch(apiKey: "your-api-key");

// Or use the facade
use HelgeSverre\Brandfetch\Facades\Brandfetch;

$brand = Brandfetch::retrieveBrand("brandfetch.com")->json()
```

### Retrieve a brand as a DTO

[](#retrieve-a-brand-as-a-dto)

You can alternatively use the `->dto()` method to retireve a Spatie/Data DTO Object, which provides better auto-complete support etc.

```
$brand = Brandfetch::retrieveBrand("brandfetch.com")->dto()
```

#### Response DTO

[](#response-dto)

The `retrieveBrand()->dto()` method returns a `Brand` DTO with the following properties:

- `name`: ?string - The name of the brand.
- `domain`: string - The domain associated with the brand.
- `claimed`: bool - Whether the brand has been claimed.
- `description`: ?string - A short description of the brand.
- `longDescription`: ?string - A longer description of the brand.
- `links`: ?DataCollection of `Link` - A collection of links related to the brand, each containing:
    - `name`: string - The name of the link.
    - `url`: string - The URL of the link.
- `logos`: ?DataCollection of `Logo` - A collection of logos associated with the brand, each containing:
    - `theme`: ?string - The theme of the logo.
    - `formats`: DataCollection of `Format` - The available formats of the logo, each containing:
        - `src`: string - The source URL of the format.
        - `background`: ?string - The background color of the format.
        - `format`: string - The format type (e.g., 'png', 'svg').
        - `size`: ?int - The size of the format.
        - `height`: ?int - The height of the format.
        - `width`: ?int - The width of the format.
    - `tags`: array - Tags associated with the logo.
    - `type`: string - The type of the logo.
- `colors`: ?DataCollection of `Color` - A collection of colors used by the brand, each containing:
    - `hex`: string - The HEX code of the color.
    - `type`: string - The type of the color (e.g., 'primary', 'secondary').
    - `brightness`: int - The brightness of the color.
- `fonts`: ?DataCollection of `Font` - A collection of fonts used by the brand, each containing:
    - `name`: ?string - The name of the font.
    - `type`: ?string - The type of the font.
    - `origin`: ?string - The origin of the font.
    - `originId`: ?string - The origin ID of the font.
- `images`: ?DataCollection of `Image` - A collection of images associated with the brand, each containing:
    - `formats`: DataCollection of `Format` - The available formats of the image, each containing:
        - `src`: string - The source URL of the format.
        - `background`: ?string - The background color of the format.
        - `format`: string - The format type (e.g., 'png', 'svg').
        - `size`: ?int - The size of the format.
        - `height`: ?int - The height of the format.
        - `width`: ?int - The width of the format.
    - `tags`: array - Tags associated with the image.
    - `type`: string - The type of the image.

### Search for a Brand

[](#search-for-a-brand)

```
$brand = Brandfetch::searchBrand("brandfetch.com")->dto()
```

#### Response DTO

[](#response-dto-1)

The `searchBrand()->dto()` method returns a collection of `SearchResult` DTOs:

- `name`: ?string - The name of the brand.
- `domain`: string - The domain associated with the brand.
- `claimed`: bool - Whether the brand has been claimed.
- `icon`: ?string - The icon of the brand.

You can take a look at the DTOs [here](./src/Data/Brand.php)

Testing
-------

[](#testing)

```
composer test
```

Credits
-------

[](#credits)

- [Helge Sverre](https://github.com/HelgeSverre)

License
-------

[](#license)

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

Disclaimer
----------

[](#disclaimer)

**NOTE: This is not an official product from Brandfetch.**

All logos, brands, and trademarks mentioned herein belong to their respective owners. The "Brandfetch" name, logo, and brand are trademarks of "Brandfetch SA". This project and its creator are not affiliated with, endorsed by, sponsored by, or associated with "Brandfetch SA" or any other entities mentioned in this documentation. All rights reserved to the respective trademark owners. Use of these names, logos, and brands does not imply endorsement and is purely illustrative.

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance84

Actively maintained with recent releases

Popularity27

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 92.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

Every ~223 days

Total

5

Last Release

84d ago

Major Versions

v1.1.0 → v2.0.02026-04-01

### Community

Maintainers

![](https://www.gravatar.com/avatar/68f3958f40262d577ddc0596e4ba78b42c0409ebc7de948bab47edee392d5f68?d=identicon)[HelgeSverre](/maintainers/HelgeSverre)

---

Top Contributors

[![HelgeSverre](https://avatars.githubusercontent.com/u/1089652?v=4)](https://github.com/HelgeSverre "HelgeSverre (13 commits)")[![dircm](https://avatars.githubusercontent.com/u/18188561?v=4)](https://github.com/dircm "dircm (1 commits)")

---

Tags

laravelhelgesverrebrandfetch-sdk

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/helgesverre-brandfetch-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/helgesverre-brandfetch-sdk/health.svg)](https://phpackages.com/packages/helgesverre-brandfetch-sdk)
```

###  Alternatives

[codebar-ag/laravel-docuware

DocuWare integration with Laravel

1122.7k](/packages/codebar-ag-laravel-docuware)[codebar-ag/laravel-zammad

Zammad integration with Laravel

106.7k](/packages/codebar-ag-laravel-zammad)[danestves/laravel-polar

A package to easily integrate your Laravel application with Polar.sh

8118.0k](/packages/danestves-laravel-polar)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3913.7k](/packages/rawilk-profile-filament-plugin)[lettermint/lettermint-laravel

Official Lettermint driver for Laravel

1152.3k1](/packages/lettermint-lettermint-laravel)

PHPackages © 2026

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