PHPackages                             akpagni5547/filament-gemini-search - 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. [Search &amp; Filtering](/categories/search)
4. /
5. akpagni5547/filament-gemini-search

ActiveLibrary[Search &amp; Filtering](/categories/search)

akpagni5547/filament-gemini-search
==================================

Filament plugin for Gemini API search with Google Search Grounding

1.0.0(2mo ago)58↓50%1MITBladePHP ^8.1

Since Mar 4Pushed 2mo agoCompare

[ Source](https://github.com/Akpagni5547/filament-gemini-search)[ Packagist](https://packagist.org/packages/akpagni5547/filament-gemini-search)[ RSS](/packages/akpagni5547-filament-gemini-search/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Filament Gemini Search
======================

[](#filament-gemini-search)

A Filament v4/v5 plugin that integrates **Google Gemini API** with **Google Search Grounding** to perform real-time web searches directly from your admin panel.

Gemini doesn't just generate text — it **performs real Google searches**, analyzes the results, and returns structured responses with **verifiable sources**.

Features
--------

[](#features)

- Real-time web search via Gemini + Google Search Grounding
- Dedicated search page with Markdown result rendering
- Compact dashboard widget
- Clickable sources and links to found websites
- Search history stored in database
- Multi-language support (EN/FR)
- Full dark mode support
- Compatible with Filament v4 and v5

---

Getting a Gemini API Key
------------------------

[](#getting-a-gemini-api-key)

### Step 1: Create a Google AI Studio Account

[](#step-1-create-a-google-ai-studio-account)

1. Go to **[Google AI Studio](https://aistudio.google.com/)**
2. Sign in with your Google account

### Step 2: Generate an API Key

[](#step-2-generate-an-api-key)

1. Click **"Get API Key"** in the left menu
2. Click **"Create API Key"**
3. Select a Google Cloud project (or create one)
4. Copy the generated key (format: `AIzaSy...`)

### Step 3: Free vs Paid Plan

[](#step-3-free-vs-paid-plan)

**Free Plan****Paid Plan (Pay-as-you-go)****Requests/minute**152,000**Requests/day**1,500Unlimited**Grounding Search**IncludedIncluded**Cost**$0~$0.001-0.01 / request> **Tip**: The free plan is more than enough for development and moderate production use. To enable billing, visit [Google Cloud Console &gt; Billing](https://console.cloud.google.com/billing).

### Step 4: Enable the API

[](#step-4-enable-the-api)

If you encounter 403 errors, enable the API manually:

1. Go to [Google Cloud Console &gt; APIs](https://console.cloud.google.com/apis/library)
2. Search for **"Generative Language API"**
3. Click **"Enable"**

---

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

[](#installation)

```
composer require akpagni5547/filament-gemini-search
```

Add your key to `.env`:

```
GEMINI_API_KEY=AIzaSy...your-key-here
GEMINI_MODEL=gemini-2.5-flash
```

Publish the configuration and run migrations:

```
php artisan vendor:publish --tag=gemini-search-config
php artisan migrate
```

Register the plugin in your `PanelProvider`:

```
use SelfProject\FilamentGeminiSearch\FilamentGeminiSearchPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        // ...
        ->plugin(FilamentGeminiSearchPlugin::make());
}
```

---

Configuration
-------------

[](#configuration)

```
// config/gemini-search.php

return [
    'api_key' => env('GEMINI_API_KEY'),
    'model' => env('GEMINI_MODEL', 'gemini-2.5-flash'),
    'grounding' => [
        'enabled' => true, // Enable Google Search Grounding
    ],
    'history' => [
        'enabled' => true,  // Save searches in DB
        'max_records' => 500,
    ],
    'navigation' => [
        'group' => null,         // Filament navigation group
        'icon' => 'heroicon-o-magnifying-glass',
        'sort' => 100,
    ],
];
```

### Disable page or widget

[](#disable-page-or-widget)

```
FilamentGeminiSearchPlugin::make()
    ->disablePage()    // Keep only the widget
    ->disableWidget()  // Keep only the page
```

---

Use Cases
---------

[](#use-cases)

### 1. Price Monitoring / Comparison

[](#1-price-monitoring--comparison)

Search for product prices across different e-commerce sites. Gemini performs the Google search and returns prices with links to stores.

```
"iPhone 16 Pro price comparison 2026"

```

**Result**: Price list with links to Amazon, Best Buy, etc.

### 2. Competitive Intelligence

[](#2-competitive-intelligence)

Monitor what your competitors are doing, their offers, and latest news.

```
"Latest AWS pricing changes cloud computing March 2026"

```

**Result**: Summary of current offers with official sources.

### 3. Supplier Research

[](#3-supplier-research)

Find suppliers for your business needs directly from your back-office.

```
"Best wholesale office supplies distributors with delivery"

```

**Result**: List of suppliers with contacts and websites.

### 4. Enhanced Customer Support

[](#4-enhanced-customer-support)

Your support agents can search for product information in real-time to assist customers.

```
"Samsung Galaxy A15 full technical specifications"

```

**Result**: Detailed specifications with reliable sources.

### 5. Regulatory / Legal Research

[](#5-regulatory--legal-research)

Find information about current regulations.

```
"GDPR compliance requirements for SaaS companies 2026"

```

**Result**: Steps and required documents with official links.

### 6. Tech Watch

[](#6-tech-watch)

Stay informed about the latest tech trends from your admin dashboard.

```
"Laravel 12 new features and improvements"

```

**Result**: Summary of new features with links to official docs.

---

How It Works (Under the Hood)
-----------------------------

[](#how-it-works-under-the-hood)

```
+--------------+     +--------------+     +--------------+
| Filament UI  |---->| Gemini API   |---->| Google Search|
| (your app)   |     | (LLM)        |     | (grounding)  |
+--------------+     +------+-------+     +--------------+
                            |
                    +-------v-------+
                    | Response with |
                    | - AI text     |
                    | - Web sources |
                    | - Queries     |
                    +---------------+

```

The key is the `tools: [{ google_search: {} }]` parameter in the API call. This tells Gemini: "Before answering, perform a real Google search and base your response on the results."

---

Available Gemini Models
-----------------------

[](#available-gemini-models)

ModelSpeedQualityGrounding`gemini-2.5-flash`FastVery goodYes`gemini-2.5-pro`SlowerExcellentYes`gemini-2.0-flash`Very fastGoodYes`gemini-2.0-flash-lite`Ultra fastDecentYes> **Recommended**: `gemini-2.5-flash` — best speed/quality ratio.

---

Testing
-------

[](#testing)

### Quick Test (without Laravel)

[](#quick-test-without-laravel)

```
curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent" \
  -H "x-goog-api-key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -X POST \
  -d '{
    "contents": [{"parts": [{"text": "Latest Laravel features"}]}],
    "tools": [{"google_search": {}}]
  }'
```

### Test in Laravel (Tinker)

[](#test-in-laravel-tinker)

```
php artisan tinker
```

```
$service = app(\SelfProject\FilamentGeminiSearch\Services\GeminiSearchService::class);
$result = $service->search('Latest Laravel 12 features');

echo $result->text;           // Formatted response
dump($result->sources);       // Sources with URLs
dump($result->searchQueries); // Google queries performed
```

---

License
-------

[](#license)

MIT

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance86

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

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

Unknown

Total

1

Last Release

69d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/788d2f6e197ee23e5c6d5bd2474c587ceb48b8d32c9c1384b158fb7d92e492c2?d=identicon)[Akpagni5547](/maintainers/Akpagni5547)

---

Top Contributors

[![Augustin47](https://avatars.githubusercontent.com/u/127188158?v=4)](https://github.com/Augustin47 "Augustin47 (5 commits)")

---

Tags

searchlaravelgooglefilamentGeminigrounding

### Embed Badge

![Health badge](/badges/akpagni5547-filament-gemini-search/health.svg)

```
[![Health](https://phpackages.com/badges/akpagni5547-filament-gemini-search/health.svg)](https://phpackages.com/packages/akpagni5547-filament-gemini-search)
```

###  Alternatives

[mailerlite/laravel-elasticsearch

An easy way to use the official PHP ElasticSearch client in your Laravel applications.

934529.3k2](/packages/mailerlite-laravel-elasticsearch)[jeroen-g/explorer

Next-gen Elasticsearch driver for Laravel Scout.

397612.3k](/packages/jeroen-g-explorer)[spatie/laravel-site-search

A site search engine

300129.1k](/packages/spatie-laravel-site-search)[jan-drda/laravel-google-custom-search-engine

Laravel package to get Google Custom Search results from Google Custom Search Engine API for both free and paid version.

5036.7k](/packages/jan-drda-laravel-google-custom-search-engine)[eightynine/filament-docs

Elegant documentation system for your Filament application with search, navigation, and markdown support

122.5k1](/packages/eightynine-filament-docs)

PHPackages © 2026

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