PHPackages                             jez500/web-scraper-for-laravel - 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. jez500/web-scraper-for-laravel

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

jez500/web-scraper-for-laravel
==============================

A web scraper for laravel

1.0.9(1mo ago)1999—7.1%11PHPCI passing

Since Jan 27Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/jez500/Web-scraper-for-Laravel)[ Packagist](https://packagist.org/packages/jez500/web-scraper-for-laravel)[ RSS](/packages/jez500-web-scraper-for-laravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (8)Versions (11)Used By (1)

Web Scraper for Laravel
=======================

[](#web-scraper-for-laravel)

A package to make it easier to scrape external web pages using laravel.

Key Features
------------

[](#key-features)

- Support for standard HTTP requests (Using Laravel's HTTP client)
- Support for scraping javascript rendered pages (Using )
- Rotating user agents to avoid being blocked
- Support for extracting data using CSS selectors
- Support for extracting data using XPath expressions
- Support for extracting data using dot notation from JSON responses
- Support for extracting data using regular expressions
- Caching responses to avoid repeated requests

Usage examples
--------------

[](#usage-examples)

```
use Jez500\WebScraperForLaravel\Facades\WebScraper;

// Get an instance of the scraper with the body of the page loaded.
$scraper = WebScraper::http()->from('https://example.com')->get();

// Get the full page body
$body = $scraper->getBody();

// Get the first title element
$title = $scraper->getSelector('title')->first();

// Get the content attribute of the first meta tag with property og:image
$image = $scraper->getSelector('meta[property=og:image]|content')->first();

// Get all paragraph innerHtml as an array
$links = $scraper->getSelector('p')->all();

// Get the first h1 element using XPath
$h1 = $scraper->getXpath('//h1')->first();

// Get the href attribute of the first link using XPath
$linkHref = $scraper->getXpath('//a', 'attr', ['href'])->first();

 // Get values from the page via regex
$author = $scraper->getRegex('~"user"\:"(.*)"~')->first();

// Get JSON data
$author = WebScraper::http()
    ->from('https://example.com/page.json')
    ->get()
    ->getJson('user.name')
    ->first();

// Get title from a javascript rendered page
$title = WebScraper::api()
    ->from('https://example.com')
    ->get()
    ->getSelector('title')
    ->first();
```

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

[](#installation)

```
composer require jez500/web-scraper-for-laravel
```

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

[](#contributing)

PRs are welcome! It's a good idea to run coding standards and tests locally before submitting a PR. This can be done with:

```
composer analyse
composer test
```

Author
------

[](#author)

[Jeremy Graham](https://github.com/jez500)

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance90

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84.6% 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 ~46 days

Recently: every ~86 days

Total

10

Last Release

51d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e3c0bb30ee888a2896903c8da900523f7163c2f64191961ec1c3476fa48d3c89?d=identicon)[jez500](/maintainers/jez500)

---

Top Contributors

[![jez500](https://avatars.githubusercontent.com/u/782823?v=4)](https://github.com/jez500 "jez500 (11 commits)")[![iliakhubuluri](https://avatars.githubusercontent.com/u/13035391?v=4)](https://github.com/iliakhubuluri "iliakhubuluri (1 commits)")[![maksm](https://avatars.githubusercontent.com/u/2431416?v=4)](https://github.com/maksm "maksm (1 commits)")

###  Code Quality

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/jez500-web-scraper-for-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/jez500-web-scraper-for-laravel/health.svg)](https://phpackages.com/packages/jez500-web-scraper-for-laravel)
```

###  Alternatives

[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[ashallendesign/favicon-fetcher

A Laravel package for fetching website's favicons.

190272.4k3](/packages/ashallendesign-favicon-fetcher)[helgesverre/extractor

AI-Powered Data Extraction for your Laravel application.

22128.0k](/packages/helgesverre-extractor)[visuellverstehen/statamic-classify

A useful helper to add CSS classes to all HTML tags generated by the bard editor.

20116.8k](/packages/visuellverstehen-statamic-classify)

PHPackages © 2026

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