PHPackages                             tomaj/meta-scraper - 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. tomaj/meta-scraper

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

tomaj/meta-scraper
==================

Page meta scraper library

4.3.0(5y ago)689.2k↓65.6%4[1 issues](https://github.com/tomaj/meta-scraper/issues)[1 PRs](https://github.com/tomaj/meta-scraper/pulls)MITPHPPHP &gt;= 7.1.0CI failing

Since Jul 27Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/tomaj/meta-scraper)[ Packagist](https://packagist.org/packages/tomaj/meta-scraper)[ RSS](/packages/tomaj-meta-scraper/feed)WikiDiscussions master Synced 2d ago

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

Meta Scraper
============

[](#meta-scraper)

[![Build Status](https://camo.githubusercontent.com/d2fbc5dad275f22df978d8c0669cd9297f27abba97a9349d4b459f5a206f385a/68747470733a2f2f7472617669732d63692e6f72672f746f6d616a2f6d6574612d736372617065722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/tomaj/meta-scraper)[![Code Climate](https://camo.githubusercontent.com/243c3eb39a5df6d269bfa24fa931c52c3d42a15c915f793fa61df40e4fd983f2/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f746f6d616a2f6d6574612d736372617065722f6261646765732f6770612e737667)](https://codeclimate.com/github/tomaj/meta-scraper)[![Test Coverage](https://camo.githubusercontent.com/6f6048338c84d7923a6fc68a34b968472483c74102399c6c7264f2ea5b95c544/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f746f6d616a2f6d6574612d736372617065722f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/tomaj/meta-scraper/coverage)

[![SensioLabsInsight](https://camo.githubusercontent.com/58c5cd2818ec144cbe47ffb1ed86211d6afab86619a21b394e5404e604f4ce32/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f61626565313966662d326335622d343433642d616538342d3034353337623135353238372f6269672e706e67)](https://insight.sensiolabs.com/projects/abee19ff-2c5b-443d-ae84-04537b155287)

Page meta scraper parse meta information from page.

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

[](#installation)

via composer:

```
composer require tomaj/meta-scraper
```

How to use
----------

[](#how-to-use)

Example:

```
use Tomaj\Scraper\Scraper;
use Tomaj\Scraper\Parser\OgParser;

$scraper = new Scraper();
$parsers = [new OgParser()];
$meta = $scraper->parse(file_get_contents('http://www.google.com/'), $parsers);

var_dump($meta);
```

or you can use `parseUrl` method (internally use [Guzzle library](https://guzzle.readthedocs.org/en/latest/))

```
use Tomaj\Scraper\Scraper;
use Tomaj\Scraper\Parser\OgParser;

$scraper = new Scraper();
$parsers = [new OgParser()];
$meta = $scraper->parseUrl('http://www.google.com/', $parsers);

var_dump($meta);
```

Parsers
-------

[](#parsers)

There are 3 parsers included in package and you can create new implementing interface `Tomaj\Scraper\Parser\ParserInterface`.

3 parsers:

- `Tomaj\Scraper\Parser\OgParser` - based on og (Open Graph) meta attributes in html (built on regular expressions)
- `Tomaj\Scraper\Parser\OgDomParser` - also based on og (Open Graph) meta attributes in html (built on php DOM extension)
- `Tomaj\Scraper\Parser\SchemaParser` - based on schema json structure

You can combine these parsers. Data that will not be found in first parser will be replaced with data from second parser.

```
use Tomaj\Scraper\Scraper;
use Tomaj\Scraper\Parser\SchemaParser;
use Tomaj\Scraper\Parser\OgParser;

$scraper = new Scraper();
$parsers = [new SchemaParser(), new OgParser()];
$meta = $scraper->parseUrl('http://www.google.com/', $parsers);

var_dump($meta);
```

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 87.5% 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 ~149 days

Recently: every ~117 days

Total

14

Last Release

2048d ago

Major Versions

1.5.0 → 2.0.02019-07-19

2.0.1 → 3.0.02019-08-13

3.0.0 → 4.0.02020-05-06

PHP version history (2 changes)1.0.0PHP &gt;= 5.5.0

2.0.0PHP &gt;= 7.1.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/446736?v=4)[Tomas Majer](/maintainers/tomaj)[@tomaj](https://github.com/tomaj)

---

Top Contributors

[![tomaj](https://avatars.githubusercontent.com/u/446736?v=4)](https://github.com/tomaj "tomaj (42 commits)")[![rootpd](https://avatars.githubusercontent.com/u/812909?v=4)](https://github.com/rootpd "rootpd (3 commits)")[![PVGrad](https://avatars.githubusercontent.com/u/5259629?v=4)](https://github.com/PVGrad "PVGrad (2 commits)")[![lmfmaier](https://avatars.githubusercontent.com/u/13540389?v=4)](https://github.com/lmfmaier "lmfmaier (1 commits)")

---

Tags

pagesrapermeta

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/tomaj-meta-scraper/health.svg)

```
[![Health](https://phpackages.com/badges/tomaj-meta-scraper/health.svg)](https://phpackages.com/packages/tomaj-meta-scraper)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[oat-sa/tao-core

TAO core extension

66143.7k122](/packages/oat-sa-tao-core)

PHPackages © 2026

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