PHPackages                             samayamx/embed-extractor - 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. samayamx/embed-extractor

Abandoned → [embed/embed](/?search=embed%2Fembed)Library[Utility &amp; Helpers](/categories/utility)

samayamx/embed-extractor
========================

Prototype to extract basic embed properties from 3rd party content

0.3.3(5y ago)03561[2 issues](https://github.com/samayamx/embed-extractor/issues)MITPHPCI failing

Since Jun 4Pushed 5y agoCompare

[ Source](https://github.com/samayamx/embed-extractor)[ Packagist](https://packagist.org/packages/samayamx/embed-extractor)[ RSS](/packages/samayamx-embed-extractor/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (2)Versions (8)Used By (0)

Embed Extractor
===============

[](#embed-extractor)

Simple class to extract properties for embedding 3rd party resources supporting OEmbed protocol.

*Currently we support only resources with [Discovery](https://oembed.com/#section4) links*

### installation

[](#installation)

```
composer require samayamx/embed-extractor

```

### requirements

[](#requirements)

- cURL to get resources
- ext-json to extract data from oembed response

### example

[](#example)

You can use this simple service in a controller without too much hassle:

```
use Samaya\Embed\Extract;

$extractor = new Extract(
    'User-Agent-Cool',
    '1234567890123456',
    '0123456789abcdef0123456789abcdef'
);

Route::get('/embed', function (Request $request) use ($extractor) {
    $url = $request->get('url');
    try {
        $image = $extractor->getImage($url);
        $html = $extractor->getHtml($url);

        return response()->json(compact('url', 'html', 'image'));
    } catch (\DomainException $domainException) {
        // for Facebook "OpenGraph" errors
        return response()->json(
          ['message' => $domainException->getMessage()],
          $domainException->getCode()
        );
    } catch (\Exception $exception) {
        // handle other exceptions as well
        return response(
          $exception->getMessage(),
          $exception->getCode()
        );
    }
});
```

If you prefer, you can use the provided Laravel facade or configuration to provide the service with required parameters:

```
use Samaya\Embed\Extract;

// injected into the action handler:
Route::get('/embed', function (Extract $extractor, Request $request) {
    // ...
});

use Samaya\Embed\OEmbedExtract;

// using the facade
$image = OEmbedExtract::getImage($url);
$html = OEmbedExtract::getHtml($url);
```

### configuration with Laravel

[](#configuration-with-laravel)

To use the provided facade or automatic service instantiation, you provide the required secrets in environment and/or published configuration.

See `.env.example` for an example of the default environment variables.

Publish the configuration if you need to tweak the identifiers to avoid collision with another package:

```
php artisan vendor:publish --provider=Samaya\\Embed\\OEmbedExtractProvider --tag=config

```

### supports

[](#supports)

- Facebook
- Vimeo
- Youtube
- Samaya Share

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 61.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 ~41 days

Recently: every ~62 days

Total

7

Last Release

1922d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2f01afc6e15ca1ba483cc1773c5f5d1b6c5f5fa98e0fe224ae8410048eb84041?d=identicon)[jefrancomix](/maintainers/jefrancomix)

---

Top Contributors

[![tezcatl](https://avatars.githubusercontent.com/u/188753?v=4)](https://github.com/tezcatl "tezcatl (8 commits)")[![cruzmayra](https://avatars.githubusercontent.com/u/32860789?v=4)](https://github.com/cruzmayra "cruzmayra (3 commits)")[![tzkmx](https://avatars.githubusercontent.com/u/11432557?v=4)](https://github.com/tzkmx "tzkmx (2 commits)")

---

Tags

oembedopengraph

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/samayamx-embed-extractor/health.svg)

```
[![Health](https://phpackages.com/badges/samayamx-embed-extractor/health.svg)](https://phpackages.com/packages/samayamx-embed-extractor)
```

###  Alternatives

[roach-php/core

A complete web scraping toolkit for PHP

1.5k352.4k3](/packages/roach-php-core)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[wa72/htmlpagedom

jQuery-inspired DOM manipulation extension for Symfony's Crawler

3383.9M34](/packages/wa72-htmlpagedom)[vdb/php-spider

A configurable and extensible PHP web spider

1.4k181.0k7](/packages/vdb-php-spider)[ashallendesign/favicon-fetcher

A Laravel package for fetching website's favicons.

190272.4k3](/packages/ashallendesign-favicon-fetcher)[dominikb/composer-license-checker

Utility to check for licenses of dependencies and block/allow them.

563.8M9](/packages/dominikb-composer-license-checker)

PHPackages © 2026

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