Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Scrapingbee

Laravel Scrapingbee Laravel Package

ziming/laravel-scrapingbee

A Laravel wrapper for the ScrapingBee API that makes web scraping simple. Configure your API key, then fetch pages with JavaScript rendering, premium proxies, screenshots, extraction rules, and custom headers through a clean, expressive client for Laravel apps with easy configuration.

View on GitHub
Deep Wiki
Context7

PHP Laravel Library for Scrapingbee Web Scraping API. AI querying supported. Also support Google, Walmart, Amazon, YouTube scraping

Frequently asked questions about Laravel Scrapingbee
How do I install ziming/laravel-scrapingbee in a Laravel app?
Install it with composer require ziming/laravel-scrapingbee. The service provider is auto-discovered, so you then publish the config file with php artisan vendor:publish and add your SCRAPINGBEE_API_KEY to the .env file or your secret store. Setup is a sub-day spike for a developer already familiar with Laravel, since there are no migrations, models, or queues to configure. The container-bound client can then be injected or resolved through the facade wherever you need it.
Which Laravel and PHP versions does this package support?
The package targets conventional Laravel applications on PHP 8.x and relies on service provider auto-discovery and a publishable config file. Do not trust the README for version constraints; check the laravel/framework and php requirements in composer.json before adopting it. That constraint is the real gating item, because it determines whether you can upgrade Laravel on your own schedule. Verify the tags and commit history on the repository if the metadata looks unusual.
How do I configure the ScrapingBee API key for Laravel?
After publishing the config, set SCRAPINGBEE_API_KEY in your .env file locally and in your secret manager for staging and production. Never hardcode the key in source or commit a real value, since every request is billed against that credential. Because the client is bound in the container, you can also override the config at runtime for multi-tenant or per-environment setups. Keep config caching in mind and re-run php artisan config:cache after changes.
Does this package support JavaScript rendering and premium proxies?
Yes. The fluent request builder exposes ScrapingBee's parameters for JavaScript rendering, premium proxies, country codes, custom headers, and waiting behaviour. Those flags are what make the wrapper useful for modern JS-heavy sites that return an empty shell to a plain HTTP client. Be aware that each of these options increases the credit cost per request, so track usage against a monthly ceiling. Treat the parameters as thin passthroughs to the vendor API, not as guarantees of a successful render.
Can I take screenshots or use extraction rules with this Laravel package?
Yes, the client supports ScrapingBee screenshot requests and extraction rule payloads alongside plain HTML fetches. Screenshots return binary image data, so you should store them in a filesystem or object store rather than holding them in memory for long. Extraction rules return structured data whose shape is defined by the vendor, so validate and normalise the response before persisting it. Add fixtures for a few representative pages so you notice when a site layout change silently breaks your selectors.
Does the package support Google, Amazon, Walmart, and YouTube scraping?
The package advertises convenience helpers for Google, Amazon, Walmart, and YouTube, but these are presets over ScrapingBee endpoints rather than guaranteed parsers. Target markup and anti-bot behaviour change constantly, so expect breakage and build monitoring around any production feature. Scraping these sites also sits in contested territory with respect to their terms of service and anti-circumvention rules in some jurisdictions. Get legal sign-off on the specific sites in scope before shipping anything customer-visible on these presets.
What is AI querying in this package and how reliable is it?
AI querying lets you send a prompt to ScrapingBee and get back extracted fields instead of raw HTML, which is useful for enrichment and internal agent workflows. The model layer is the vendor's, so output shape, accuracy, and latency are outside the package's control. Validate responses against an expected schema and keep regression fixtures so prompt or model changes surface early. Treat the results as probabilistic enrichment data, not as authoritative records.
Should I call ScrapingBee inside an HTTP request or a queued job?
Use queued jobs. Scraping requests with JavaScript rendering and premium proxies can take several seconds, which is a poor fit for a synchronous user-facing request path. Dispatch a ShouldQueue job, cache the result, and design an error taxonomy for timeouts, blocked requests, and out-of-credit failures. This also makes the per-request credit cost visible in your own logs, which matters because pricing is metered and varies by feature.
How do I test scraping code without spending ScrapingBee credits?
Swap the bound client or fake the underlying HTTP layer in your test suite so no real requests leave your environment. Because the package is a thin wrapper with a container binding, you can bind a stub implementation in a test service provider. Keep recorded response fixtures for HTML, extraction payloads, and AI outputs, then assert your own parsing and persistence rather than the vendor's behaviour. Reserve real API calls for a small, explicitly tagged integration suite with a low credit budget.
Is ziming/laravel-scrapingbee actively maintained, and what is the alternative?
Signals are weak: modest star count, a single-maintainer community project, and a listed release date that appears to be bad metadata, so verify tag cadence and issue responsiveness directly on the repository. The package is glue code with few moving parts, so the breakage risk is low, but so is the value, since most behaviour lives in ScrapingBee's API. Wrap it behind your own adapter interface so you can fork it or swap in a direct Guzzle or Laravel HTTP client implementation. Do not treat it as a strategic dependency, and confirm ScrapingBee itself is an approved vendor before adopting.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections