PHPackages                             amir-anisheh/scrapeflow - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. amir-anisheh/scrapeflow

AbandonedArchivedLibrary[Parsing &amp; Serialization](/categories/parsing)

amir-anisheh/scrapeflow
=======================

A chainable, SOAP-like HTML parser for Laravel using pure PHP

1.3(10mo ago)04MITPHPPHP ^8.0

Since Sep 6Pushed 10mo agoCompare

[ Source](https://github.com/AmirAnisheh/ScrapeFlow)[ Packagist](https://packagist.org/packages/amir-anisheh/scrapeflow)[ RSS](/packages/amir-anisheh-scrapeflow/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (1)Versions (4)Used By (0)

ScrapeFlow
==========

[](#scrapeflow)

**ScrapeFlow** is a chainable, SOAP-like HTML parser for Laravel using pure PHP.
It allows you to parse HTML from URLs or strings in a fluent, readable way.

Package: `amir-anisheh/scrapeflow`

---

Features
--------

[](#features)

- Chainable syntax for fluent HTML parsing
- Select elements by **tag**, **class**, **id**, or **attribute**
- Get **text** or **HTML** of elements
- Pure PHP, no external parsing libraries required
- Ready to use in Laravel with automatic package discovery

---

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

[](#installation)

Require the package via Composer:

```
composer require amir-anisheh/scrapeflow
```

Or for local development:

```
"repositories": [
    {
        "type": "path",
        "url": "../scrapeflow"
    }
]
```

Then require it:

```
composer require amir-anisheh/scrapeflow:@dev
```

---

Usage
-----

[](#usage)

### Basic Example

[](#basic-example)

```
use AmirAnisheh\ScrapeFlow\HtmlParser;

$parser = new HtmlParser();

// Get all titles by class
$titles = $parser->url('https://example.com')
                 ->getByClass('title')
                 ->texts();

// Get the first  text
$firstH1 = $parser->url('https://example.com')
                  ->getByTag('h1')
                  ->text();

print_r($titles);
echo $firstH1;
```

### Chainable Syntax

[](#chainable-syntax)

```
$parser->url('https://example.com')
       ->getByClass('container')
       ->getByTag('h2')
       ->texts();
```

---

Methods
-------

[](#methods)

MethodDescription`url(string $url)`Load HTML from a URL`loadHtml(string $html)`Load HTML from a string`getByTag(string $tag)`Select nodes by tag name`getByClass(string $class)`Select nodes by class name`getById(string $id)`Select nodes by ID`getByAttribute(string $attr, string $value)`Select nodes by attribute`text()`Get text of the first matched node`texts()`Get text of all matched nodes`html()`Get HTML of the first matched node`allHtml()`Get HTML of all matched nodes---

License
-------

[](#license)

ScrapeFlow is **open-sourced software licensed under the MIT license**.

---

Author
------

[](#author)

**Amir Anisheh**Email: GitHub:

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance55

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

3

Last Release

300d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19823897?v=4)[Amir Mohammad Anisheh](/maintainers/amiranisheh)[@AmirAnisheh](https://github.com/AmirAnisheh)

---

Top Contributors

[![AmirAnisheh](https://avatars.githubusercontent.com/u/19823897?v=4)](https://github.com/AmirAnisheh "AmirAnisheh (2 commits)")

### Embed Badge

![Health badge](/badges/amir-anisheh-scrapeflow/health.svg)

```
[![Health](https://phpackages.com/badges/amir-anisheh-scrapeflow/health.svg)](https://phpackages.com/packages/amir-anisheh-scrapeflow)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)

PHPackages © 2026

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