PHPackages                             elbot/majestic-seo-laravel-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. elbot/majestic-seo-laravel-api

ActiveLibrary[API Development](/categories/api)

elbot/majestic-seo-laravel-api
==============================

A Laravel package for integrating with the Majestic SEO API, allowing you to easily retrieve and analyze SEO metrics and data for your websites.

1.1.1(2y ago)02.7k↓33.3%MITPHPPHP ^7.4 | ^8.0 | ^8.1

Since Aug 5Pushed 2y ago1 watchersCompare

[ Source](https://github.com/elbotha18/majestic-seo-laravel-api)[ Packagist](https://packagist.org/packages/elbot/majestic-seo-laravel-api)[ RSS](/packages/elbot-majestic-seo-laravel-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (7)Used By (0)

Laravel Majestic API Connector
==============================

[](#laravel-majestic-api-connector)

This package provides a convenient way to interact with the Majestic SEO API in your Laravel applications.

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

[](#installation)

You can install the package via Composer:

```
composer require elbot/majestic-seo-laravel-api
```

Usage
-----

[](#usage)

First, make sure you have configured your Majestic API key in your Laravel configuration file (`config/services.php`):

```
'majestic' => [
    'api_key' => env('MAJESTIC_API_KEY'),
]
```

Create an instance of MajesticService with your API key, then prepare the parameters required for command and the call the command: (Note, the "app\_api\_key" and "cmd" will be added)

```
use Elbot\Majestic\ApiService;

private function getIndexItemInfo() {
    $apiKey = config('services.majestic.api_key');
    $majesticService = new ApiService($apiKey); // live
    // $majesticService = new ApiService($apiKey, $sandbox = true); // dev

    $string_urls = "example.com, example2.com, example3.com"; // string format urls
    $parameters = $this->prepareItemsParameter($string_urls); // gets items count and structures each item
    $parameters["DesiredTopics"] = 5; // add any custom parameters you would like to set

    $response = $majesticService->executeCommand("GetIndexItemInfo", $parameters); // execute command

    if ($response->isOK()) {
        $output = $this->processResponse($response);
    } else {
        $error = $response->getErrorMessage();
        // Handle the error
    }
}
```

Helper Functions
================

[](#helper-functions)

You can utilize the following helper functions within your controller:

prepareItemsParameter($itemsToQuery): Prepares the items parameter for the API request. processResponse($response): Processes the API response to extract the data. Here's an example implementation of these helper functions:

```
private function prepareItemsParameter($itemsToQuery) {
    $items = preg_split("/, /", $itemsToQuery, -1);

    $parameters = [];
    for ($i = 0; $i < count($items); $i++) {
        $parameters["item" . $i] = $items[$i];
    }

    $parameters["items"] = count($items);
    $parameters["datasource"] = "fresh";

    return $parameters;
}

private function processResponse($response) {
    $results = $response->getTableForName('Results');
    $output = [];

    foreach ($results->getTableRows() as $row) {
        $item = $row['Item'];
        $itemInfo = [];

        $keys = array_keys($row);
        sort($keys);
        foreach ($keys as $key) {
            if ($key != "Item") {
                $value = $row[$key];
                $itemInfo[$key] = $value;
            }
        }

        $output[$item] = $itemInfo;
    }

    return $output;
}
```

License
=======

[](#license)

This package is open-source software licensed under the MIT license.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

6

Last Release

1015d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/54080908?v=4)[Ettienne Botha](/maintainers/elbotha18)[@elbotha18](https://github.com/elbotha18)

---

Top Contributors

[![elbotha18](https://avatars.githubusercontent.com/u/54080908?v=4)](https://github.com/elbotha18 "elbotha18 (12 commits)")

### Embed Badge

![Health badge](/badges/elbot-majestic-seo-laravel-api/health.svg)

```
[![Health](https://phpackages.com/badges/elbot-majestic-seo-laravel-api/health.svg)](https://phpackages.com/packages/elbot-majestic-seo-laravel-api)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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