PHPackages                             gabrielbull/sitesearch - 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. gabrielbull/sitesearch

AbandonedLibrary[API Development](/categories/api)

gabrielbull/sitesearch
======================

Google Site Search custom search PHP Wrapper Library

035PHP

Since Jul 6Pushed 9y ago1 watchersCompare

[ Source](https://github.com/gavroche/php-sitesearch)[ Packagist](https://packagist.org/packages/gabrielbull/sitesearch)[ RSS](/packages/gabrielbull-sitesearch/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

PHP Google Site Search
======================

[](#php-google-site-search)

[![Build Status](https://camo.githubusercontent.com/fcda0aca243adefb0c462fdecbc7a2cd07ab51202c56e6665360b0141fc1d5df/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6761627269656c62756c6c2f7068702d736974657365617263682e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/gabrielbull/php-sitesearch)

Search engine for websites using Google Custom Search Engine with a Google Site Search account.

Google Site Search API
----------------------

[](#google-site-search-api)

To use the Google Site Search API, you have to [obtain a search engine ID from Google](https://www.google.com/cse/).

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

[](#requirements)

This library uses PHP 5.3+.

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

[](#installation)

It is recommended that you install the PHP Google Site Search library [through composer](http://getcomposer.org).

```
{
    "require": {
        "gabrielbull/sitesearch": "dev-master"
    }
}
```

Search
------

[](#search)

The SiteSearch class allows you to search Google Custom Search Engine. All you have to provide is a search engine ID and a query.

### Examples

[](#examples)

```
$id = "YOUR_SEARCH_ENGINE_ID";

$siteSearch = new SiteSearch($id);
$results = $siteSearch->search('kittens');

foreach($results as $result) {
    echo $result['title'];
}
```

or:

```
$id = "YOUR_SEARCH_ENGINE_ID";

foreach(SiteSearch::create($id)->search('cats') as $result) {
    echo $result['title'];
}
```

### Parameters

[](#parameters)

The search method parameters are:

- `value` The search query.
- `start` The offset of the first result to return.
- `limit` The number of results to return.

### Results

[](#results)

The search results will contain the following parameters:

- `link` The link of the page.
- `title` The title of the page.
- `description` The description of the page.
- `lang` The language of the page.
- `image` An image associated with the page (src).
- `thumbnail` A thumbnail of the image (src, width and height).

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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/fcd3c0ec0f06b3ff94878dbcf5dad6bdfa1813c2c0bf753af44dd3184c3a2a04?d=identicon)[gabrielbull](/maintainers/gabrielbull)

---

Top Contributors

[![gabrielbull](https://avatars.githubusercontent.com/u/671923?v=4)](https://github.com/gabrielbull "gabrielbull (3 commits)")[![gavroche](https://avatars.githubusercontent.com/u/6575485?v=4)](https://github.com/gavroche "gavroche (1 commits)")

### Embed Badge

![Health badge](/badges/gabrielbull-sitesearch/health.svg)

```
[![Health](https://phpackages.com/badges/gabrielbull-sitesearch/health.svg)](https://phpackages.com/packages/gabrielbull-sitesearch)
```

###  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)
