PHPackages                             ziming/laravel-scrapingbee - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ziming/laravel-scrapingbee

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ziming/laravel-scrapingbee
==========================

A PHP Laravel Library for ScrapingBee

2.22(2mo ago)4310.6k↓15.6%7MITPHPPHP ^8.1CI passing

Since Aug 21Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/ziming/laravel-scrapingbee)[ Packagist](https://packagist.org/packages/ziming/laravel-scrapingbee)[ Docs](https://github.com/ziming/laravel-scrapingbee)[ GitHub Sponsors](https://github.com/ziming)[ RSS](/packages/ziming-laravel-scrapingbee/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (16)Versions (53)Used By (0)

A PHP Laravel Library for [ScrapingBee](https://www.scrapingbee.com?fpr=php-laravel)
====================================================================================

[](#a-php-laravel-library-for-scrapingbee)

[![Latest Version on Packagist](https://camo.githubusercontent.com/cc41a955598a5f199006d9dcf0c58e163944b7a60c8efb9c7f5174397c10c91b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a696d696e672f6c61726176656c2d7363726170696e676265652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ziming/laravel-scrapingbee)[![Total Downloads](https://camo.githubusercontent.com/36727679a538b170d345eb08ad74d116d2b56e79cb67c51f1f0e4940b205ed33/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a696d696e672f6c61726176656c2d7363726170696e676265652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ziming/laravel-scrapingbee)

A PHP Laravel Package for [ScrapingBee](https://www.scrapingbee.com?fpr=php-laravel)

If you wish to support my work you can use my [referral link to create a free account, I get a small reward if you upgrade to a paid plan in the future](https://www.scrapingbee.com?fpr=php-laravel).

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

[](#installation)

You can install the package via composer:

```
composer require ziming/laravel-scrapingbee
```

You can publish the config file with:

```
php artisan vendor:publish --provider="Ziming\LaravelScrapingBee\LaravelScrapingBeeServiceProvider" --tag="laravel-scrapingbee-config"
```

This is the contents of the published config file:

```
return [
    'api_key' => env('SCRAPINGBEE_API_KEY'),
    'base_url' => env('SCRAPINGBEE_BASE_URL', 'https://app.scrapingbee.com/api/v1/'),
    'timeout' => env('SCRAPINGBEE_TIMEOUT', 140),

    'google_search_base_url' => env('SCRAPINGBEE_GOOGLE_SEARCH_BASE_URL', 'https://app.scrapingbee.com/api/v1/store/google'),

    'walmart_search_base_url' => env('SCRAPINGBEE_WALMART_SEARCH_BASE_URL', 'https://app.scrapingbee.com/api/v1/walmart/search'),
    'walmart_product_base_url' => env('SCRAPINGBEE_WALMART_PRODUCT_BASE_URL', 'https://app.scrapingbee.com/api/v1/walmart/product'),

    'amazon_search_base_url' => env('SCRAPINGBEE_AMAZON_SEARCH_BASE_URL', 'https://app.scrapingbee.com/api/v1/amazon/search'),
    'amazon_product_base_url' => env('SCRAPINGBEE_AMAZON_PRODUCT_BASE_URL', 'https://app.scrapingbee.com/api/v1/amazon/product'),
];
```

Usage
-----

[](#usage)

### The Generic ScrapingBee Client

[](#the-generic-scrapingbee-client)

```
$scrapingBeeClient = Ziming\LaravelScrapingBee\LaravelScrapingBee::make();

$response = $scrapingBeeClient->blockAds()
    ->when(now()->weekOfMonth === 4, function (LaravelScrapingBee $scrapingBeeClient): LaravelScrapingBee {
        // if it is last week of the month, spam premium proxy to use up credits!
        return $scrapingBeeClient->premiumProxy();
    })
    ->jsonResponse()
    //->aiQuery('top 5 blog posts') // AI Query Feature!
    //->aiExtractRules(['title' => 'title of post', 'summary' => 'summary of post']) // AI Extract Feature!
    ->jsScenario([
        ['click' => '#button_id'],
        ['wait' => 1000],
        ['wait_for' => '#slow_div'],
        ['scroll_x' => 1000],
        ['scroll_y' => 1000],
        ['fill' => ['#input_1','value_1']],
        ['evaluate' => 'console.log(window);'],
])->get('https://www.scrapingbee.com')
```

Look at the source code of `src/LaravelScrapingBee.php` for the other methods (link below). Methods that return `$this` are chainable. An example is the `blockAds()` method you saw above. Meanwhile methods such as `get()`, `post()`, `usageStatistics()` returns you an `Illuminate\Http\Client\Response` object if no exceptions are thrown.

[LaravelScrapingBee.php](https://github.com/ziming/laravel-scrapingbee/blob/main/src/LaravelScrapingBee.php)

If for some reason you prefer to set all parameters at once you may wish to use the `setParams() or addParams()` method. Take note that these methods simply takes in an array and sets the parameters as is. So for the methods that does something extra before setting the parameter you would have to do them yourselves now if you chose this path.

An example is shown below:

```
$scrapingBeeClient = Ziming\LaravelScrapingBee\LaravelScrapingBee::make();

$response = $scrapingBeeClient->setParams([
        'js_scenario' => json_encode([
            'instructions' => [
                ['click' => '#button_id'],
                ['wait' => 1000],
                ['wait_for' => '#slow_div'],
                ['scroll_x' => 1000],
                ['scroll_y' => 1000],
                ['fill' => ['#input_1','value_1']],
                ['evaluate' => 'console.log(window);']
            ]
        ]),
        'block_ads' => true,
        'json_response' => true,
    ])->get('https://www.scrapingbee.com')
```

### The Google Search ScrapingBee Client

[](#the-google-search-scrapingbee-client)

```
$googleSearchScrapingBeeClient = Ziming\LaravelScrapingBee\LaravelScrapingBeeGoogleSearch::make();

$response = $googleSearchScrapingBeeClient
    ->page(1)
    ->search('scrapingbee')
    ->get();
```

Look at the source code of `src/LaravelScrapingBeeGoogleSearch.php` for the other methods (link below).

[LaravelScrapingBeeGoogleSearch.php](https://github.com/ziming/laravel-scrapingbee/blob/main/src/LaravelScrapingBeeGoogleSearch.php)

### Walmart ScrapingBee Clients

[](#walmart-scrapingbee-clients)

#### The Walmart Search ScrapingBee Client

[](#the-walmart-search-scrapingbee-client)

```
$walmartSearchScrapingBeeClient = Ziming\LaravelScrapingBee\LaravelScrapingBeeWalmartSearch::make();

$response = $walmartSearchScrapingBeeClient
    ->query('iPhone')
    ->minPrice(100)
    ->maxPrice(1000)
    ->fulfillmentType('in_store')
    ->fulfillmentSpeed('today')
    ->domain('walmart.ca')
    ->sortBy('price_low')
    ->page(2)
    ->get();
```

Look at the source code of `src/LaravelScrapingBeeWalmartSearch.php` for the other methods (link below).

[LaravelScrapingBeeWalmartSearch.php](https://github.com/ziming/laravel-scrapingbee/blob/main/src/LaravelScrapingBeeWalmartSearch.php)

#### The Walmart Product ScrapingBee Client

[](#the-walmart-product-scrapingbee-client)

```
$walmartProductScrapingBeeClient = Ziming\LaravelScrapingBee\LaravelScrapingBeeWalmartProduct::make();

$response = $walmartProductScrapingBeeClient
    ->productId('5491199371')
    ->domain('walmart.ca')
    ->deliveryZip('10001')
    ->storeId('3520')
    ->get();
```

Look at the source code of `src/LaravelScrapingBeeWalmartProduct.php` for the other methods (link below).

[LaravelScrapingBeeWalmartProduct.php](https://github.com/ziming/laravel-scrapingbee/blob/main/src/LaravelScrapingBeeWalmartProduct.php)

### Amazon ScrapingBee Clients

[](#amazon-scrapingbee-clients)

#### The Amazon Search ScrapingBee Client

[](#the-amazon-search-scrapingbee-client)

```
$amazonSearchScrapingBeeClient = Ziming\LaravelScrapingBee\LaravelScrapingBeeAmazonSearch::make();

$response = $amazonSearchScrapingBeeClient
    ->query('iPhone')
    ->startPage(2)
    ->pages(3)
    ->device('desktop')
    ->currency('usd')
    ->country('gb')
    ->sortBy('average_review')
    ->get();
```

Look at the source code of `src/LaravelScrapingBeeAmazonSearch.php` for the other methods (link below).

[LaravelScrapingBeeAmazonSearch.php](https://github.com/ziming/laravel-scrapingbee/blob/main/src/LaravelScrapingBeeAmazonSearch.php)

#### The Amazon Product ScrapingBee Client

[](#the-amazon-product-scrapingbee-client)

```
$amazonProductScrapingBeeClient = Ziming\LaravelScrapingBee\LaravelScrapingBeeAmazonProduct::make();

$response = $amazonProductScrapingBeeClient
    ->query('ASIN')
    ->device('desktop')
    ->currency('usd')
    ->country('gb')
    ->get();
```

Look at the source code of `src/LaravelScrapingBeeAmazonProduct.php` for the other methods (link below). [LaravelScrapingBeeAmazonProduct.php](https://github.com/ziming/laravel-scrapingbee/blob/main/src/LaravelScrapingBeeAmazonProduct.php)

### YouTube ScrapingBee Clients

[](#youtube-scrapingbee-clients)

#### YouTube ScrapingBee Search Client

[](#youtube-scrapingbee-search-client)

```
$youTubeScrapingBeeSearchClient = Ziming\LaravelScrapingBee\LaravelScrapingBeeYouTubeSearch::make();

$response = $youTubeScrapingBeeSearchClient
    ->search('Python Tutorial')
    ->get();
```

Look at the source code of `src/LaravelScrapingBeeYouTubeSearch.php` for the other methods (link below). [LaravelScrapingBeeYouTubeSearch.php](https://github.com/ziming/laravel-scrapingbee/blob/main/src/LaravelScrapingBeeYouTubeSearch.php)

#### YouTube ScrapingBee Metadata Client

[](#youtube-scrapingbee-metadata-client)

```
$youTubeScrapingBeeMetadataClient = Ziming\LaravelScrapingBee\LaravelScrapingBeeYouTubeMetadata::make();
$response = $youTubeScrapingBeeMetadataClient
    ->videoId('rfscVS0vtbw')
    ->get();
```

Look at the source code of `src/LaravelScrapingBeeYouTubeMetadata.php` for the other methods (link below). [LaravelScrapingBeeYouTubeMetadata.php](https://github.com/ziming/laravel-scrapingbee/blob/main/src/LaravelScrapingBeeYouTubeMetadata.php)

#### YouTube ScrapingBee Transcript Client

[](#youtube-scrapingbee-transcript-client)

```
$youTubeScrapingBeeTranscriptClient = Ziming\LaravelScrapingBee\LaravelScrapingBeeYouTubeTranscript::make();
$response = $youTubeScrapingBeeTranscriptClient
    ->videoId('rfscVS0vtbw')
    ->language('es')
    ->transcriptOrigin('uploader_provided')
    ->get();
```

Look at the source code of `src/LaravelScrapingBeeYouTubeTranscript.php` for the other methods (link below). [LaravelScrapingBeeYouTubeTranscript.php](https://github.com/ziming/laravel-scrapingbee/blob/main/src/LaravelScrapingBeeYouTubeTranscript.php)

#### YouTube ScrapingBee Trainability Client

[](#youtube-scrapingbee-trainability-client)

```
$youTubeScrapingBeeTrainabilityClient = Ziming\LaravelScrapingBee\LaravelScrapingBeeYouTubeTrainability::make();
$response = $youTubeScrapingBeeTrainabilityClient
    ->videoId('rfscVS0vtbw')
    ->get();
```

Look at the source code of `src/LaravelScrapingBeeYouTubeTrainability.php` for the other methods (link below). [LaravelScrapingBeeYouTubeTrainability.php](https://github.com/ziming/laravel-scrapingbee/blob/main/src/LaravelScrapingBeeYouTubeTrainability.php)

### ChatGPT ScrapingBee Client

[](#chatgpt-scrapingbee-client)

```
$chatGptScrapingbeeClient = Ziming\LaravelScrapingBee\LaravelScrapingBeeChatGpt::make();

$response = $chatGptScrapingbeeClient
    ->prompt('Explain why a career in web development is a bad choice')
    ->webSearch()
    ->countryCode('US')
    ->addHtml()
    ->get();
```

Look at the source code of `src/LaravelScrapingBeeChatGpt.php` for the other methods (link below).

[LaravelScrapingBeeChatGpt.php](https://github.com/ziming/laravel-scrapingbee/blob/main/src/LaravelScrapingBeeChatGpt.php)

Testing
-------

[](#testing)

Currently, there are no tests as it uses credits. But if there are tests in the future, you can run the command below to execute the testcases.

```
composer test
```

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

[](#contributing)

You may see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Ziming](https://github.com/ziming)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance87

Actively maintained with recent releases

Popularity37

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 91.3% 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 ~33 days

Recently: every ~39 days

Total

51

Last Release

62d ago

Major Versions

0.10.1 → 1.02021-12-07

1.2 → 2.02022-03-22

PHP version history (2 changes)0.1PHP ^8.0

2.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/20bbe714df709bd31994360fbba65adce9f28fd930c5590265d4d58c452fe32e?d=identicon)[ziming.opensource](/maintainers/ziming.opensource)

---

Top Contributors

[![ziming](https://avatars.githubusercontent.com/u/679513?v=4)](https://github.com/ziming "ziming (94 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (1 commits)")[![jackwh](https://avatars.githubusercontent.com/u/627533?v=4)](https://github.com/jackwh "jackwh (1 commits)")[![simonhamp](https://avatars.githubusercontent.com/u/31628?v=4)](https://github.com/simonhamp "simonhamp (1 commits)")

---

Tags

aiartificial-intelligencegooglehacktoberfestlaravelllm-trainingphpscrapingscraping-beescrapingbeescrapingbee-apiwalmartweb-scrapingwebscrapingyoutubelaravellaravel-scrapingbee

###  Code Quality

TestsPHPUnit

Static AnalysisRector

### Embed Badge

![Health badge](/badges/ziming-laravel-scrapingbee/health.svg)

```
[![Health](https://phpackages.com/badges/ziming-laravel-scrapingbee/health.svg)](https://phpackages.com/packages/ziming-laravel-scrapingbee)
```

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.8k28.9M627](/packages/spatie-laravel-data)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)

PHPackages © 2026

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