PHPackages                             tda/laravel-google-search-console - 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. tda/laravel-google-search-console

ActiveLibrary[API Development](/categories/api)

tda/laravel-google-search-console
=================================

Google Analytics Admin integration with oAuh2

4932PHP

Since Aug 14Pushed 2y ago1 watchersCompare

[ Source](https://github.com/thedigitalarchitects/laravel-search-console)[ Packagist](https://packagist.org/packages/tda/laravel-google-search-console)[ RSS](/packages/tda-laravel-google-search-console/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Search Console
======================

[](#laravel-search-console)

Based on schulzefelix/laravel-search-console and modified to Laravel 8

Using this package you can easily retrieve data from Google Search Console API.

Here are a few examples of the provided methods:

Install
-------

[](#install)

This package can be installed through Composer.

```
$ composer require tda/laravel-search-console
```

Usage
-----

[](#usage)

Here are two basic example to retrieve all sites and an export for search analytics data.

### List Sites

[](#list-sites)

```
use Tda\GoogleSearchConsole\SearchConsole;
$searchConsole = new SearchConsole();
$sites = $searchConsole->setAccessToken($this->token)->listSites();

//get site details (permissionLevel) for specific site
$site = $searchConsole->setAccessToken($token)->getSite('http://blog.example.com/');
```

### Search Analytics

[](#search-analytics)

```
use Tda\GoogleSearchConsole\SearchConsole;
use Tda\SearchConsole\Period;

    $searchConsole = new SearchConsole();
    $data = $searchConsole->setAccessToken($this->token)->setQuotaUser('uniqueQuotaUserString')
        ->searchAnalyticsQuery(
            'https://www.example.com/',
            Period::create(Carbon::now()->subDays(30), Carbon::now()->subDays(2)),
            ['query', 'page', 'country', 'device', 'date'],
            [['dimension' => 'query', 'operator' => 'notContains', 'expression' => 'cheesecake']],
            1000,
            'web',
            'all',
            'auto'
        );
```

Provided methos
---------------

[](#provided-methos)

### Retrieve One Site

[](#retrieve-one-site)

```
public function public function getSite(string $siteUrl): array
```

### Retrieve All Sites

[](#retrieve-all-sites)

```
public function public function listSites(): Collection
```

### Retrieve Search Analytics Data

[](#retrieve-search-analytics-data)

```
public function searchAnalyticsQuery(string $siteUrl, Period $period, array $dimensions = [], array $filters = [], int $rows = 1000, string $searchType = 'web', string $dataState = 'final', string $aggregationType = 'auto'): Collection
```

### Check Access Token

[](#check-access-token)

```
public function public function isAccessTokenExpired(): Bool
```

Provided fluent configuration
-----------------------------

[](#provided-fluent-configuration)

### Set Quota User

[](#set-quota-user)

To avoid to the API limits, you can provide a unique string for the authenticated account.

More information:

```
$sites = SearchConsole::setAccessToken($token)->setQuotaUser('uniqueQuotaUserString')->listSites();
```

Get Underlying Service
----------------------

[](#get-underlying-service)

You can get access to the underlying `Google_Service_Webmasters` object:

```
SearchConsole::getWebmastersService();
```

Change log
----------

[](#change-log)

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

Testing
-------

[](#testing)

```
$ vendor/bin/phpunit
```

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

[](#contributing)

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

Credits
-------

[](#credits)

- [Davi Leichs](https://github.com/davileichs)
- [Felix Schulze](https://github.com/schulzefelix/laravel-search-console)

License
-------

[](#license)

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

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity21

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0ae273774a20c2eefc3335bbcdb95f7df8e7f6d76019b102f0303eaa619e07fc?d=identicon)[thedigitalarchitects](/maintainers/thedigitalarchitects)

---

Top Contributors

[![davileichs](https://avatars.githubusercontent.com/u/7110375?v=4)](https://github.com/davileichs "davileichs (8 commits)")

### Embed Badge

![Health badge](/badges/tda-laravel-google-search-console/health.svg)

```
[![Health](https://phpackages.com/badges/tda-laravel-google-search-console/health.svg)](https://phpackages.com/packages/tda-laravel-google-search-console)
```

###  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)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

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

PHP wrapper for the Meilisearch API

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

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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