PHPackages                             inbo/google-crawler - 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. inbo/google-crawler

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

inbo/google-crawler
===================

A simple Crawler for getting Google results

v2.0.3(6y ago)34GPL-3.0PHPPHP &gt;=7.2

Since Feb 25Pushed 4y agoCompare

[ Source](https://github.com/Nader-abdi/google-crawler)[ Packagist](https://packagist.org/packages/inbo/google-crawler)[ RSS](/packages/inbo-google-crawler/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (10)Versions (22)Used By (0)

Google Crawler
==============

[](#google-crawler)

[![Latest Stable Version](https://camo.githubusercontent.com/232a072dfbf65c704559c9f0f83d7cfb43f80269285a3d67d89c2f72626169d3/68747470733a2f2f706f7365722e707567782e6f72672f6376696e696369757373646961732f676f6f676c652d637261776c65722f762f737461626c65)](https://packagist.org/packages/cviniciussdias/google-crawler)[![Build Status](https://camo.githubusercontent.com/e0aa0eb6594a0fae659fc6162e4dce9c6168a63b3bb9ba59e839ee1bddee4eab/68747470733a2f2f7472617669732d63692e6f72672f4356696e696369757353446961732f676f6f676c652d637261776c65722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/CViniciusSDias/google-crawler)[![Code Coverage](https://camo.githubusercontent.com/10e285a94c991f86ac3cea0a789c09dc863b6759339548af4d769572c727d93e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4356696e696369757353446961732f676f6f676c652d637261776c65722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/CViniciusSDias/google-crawler/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/1f7f904584cbfa5e55d351eeef62fae8f986c3811a2f63bfd7625b10e07c9f71/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4356696e696369757353446961732f676f6f676c652d637261776c65722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/CViniciusSDias/google-crawler/?branch=master)[![License](https://camo.githubusercontent.com/9497e0183c18dae35adfd6ddd7be569ddd35a580c1589ad24435184118d84f71/68747470733a2f2f706f7365722e707567782e6f72672f6376696e696369757373646961732f676f6f676c652d637261776c65722f6c6963656e7365)](https://packagist.org/packages/cviniciussdias/google-crawler)

A simple Crawler for getting Google results.

This component can be used to retrieve the 100 first results for a search term.

Since google detects a crawler and blocks the IP when several requests are made, this component is prepared to use some online proxy services, such as hide.me.

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

[](#installation)

Install the latest version with

```
$ composer require cviniciussdias/google-crawler

```

Usage
-----

[](#usage)

### Crawler class constructor prototype

[](#crawler-class-constructor-prototype)

```
CViniciusSDias\GoogleCrawler\Crawler::__construct(
    SearchTermInterface $searchTerm, GoogleProxyInterface $proxy = null,
    string $googleDomain = 'google.com', string $countryCode = ''
)

```

#### Parameters

[](#parameters)

- $searchTerm Term that will be searched on Google
- $proxy Online proxy service that will be used to access Google \[optional\]
- $googleDomain Your country specific google domain, like google.de, google.com.br, etc. \[optional\]
- $countryCode Country code that will be added to `gl` parameter on Google's url, indicating the location of the search. E.g. 'BR', 'US', 'DE' \[optional\]

Examples
--------

[](#examples)

### Without proxy

[](#without-proxy)

```
