noscrape/noscrape-laravel

Official Laravel package for protecting sensitive text from automated scraping using the Noscrape API.

Maintainers

Package info

github.com/noscrape/noscrape-laravel

pkg:composer/noscrape/noscrape-laravel

Fund package maintenance!

:vendor_name

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 1

v1.0.0 2026-06-18 18:57 UTC

This package is auto-updated.

Last update: 2026-06-23 19:34:22 UTC


README

Official Laravel integration for Noscrape.

Protect publicly visible text from automated scraping with a simple Blade component. The package automatically collects all protected content, sends it to the Noscrape API, injects a generated font, and renders the obfuscated text back in the browser.

Features

  • Simple Blade component
  • One API request per page
  • Automatic font generation
  • No JavaScript framework required
  • Laravel 11 & 12 compatible
  • Supports public cloud and on-premise installations

Installation

Install the package via Composer:

composer require noscrape/noscrape-laravel

Publish the configuration file:

php artisan vendor:publish --tag="noscrape-config"

Configuration

For most installations only an API key is required.
Simply visit https://noscrape.eu, choose your plan and create your api key.

NOSCRAPE_API_KEY=your-api-key

If you are using an on-premise or private Noscrape installation, configure the host as well.

NOSCRAPE_API_KEY=your-api-key
NOSCRAPE_HOST=https://noscrape.example.com

NOSCRAPE_HOST is optional and defaults to the public Noscrape API.

Usage

Wrap any text you want to protect.

<x-noscrape::obfuscated>
    customer@example.com
</x-noscrape::obfuscated>

Finally, include the renderer once before the closing </body> tag.

@noscrapeScripts

Complete example

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Noscrape Example</title>
    </head>
    <body>

        <h1>
            <x-noscrape::obfuscated>
                Contact us
            </x-noscrape::obfuscated>
        </h1>

        <p>
            <x-noscrape::obfuscated>
                info@example.com
            </x-noscrape::obfuscated>
        </p>

        <p>
            <x-noscrape::obfuscated>
                +49 123 456789
            </x-noscrape::obfuscated>
        </p>

        @noscrapeScripts

    </body>
</html>

How it works

  1. Every <x-noscrape::obfuscated> component registers its content during rendering.
  2. @noscrapeScripts sends all collected values to the Noscrape API in a single request.
  3. The API returns:
    • obfuscated text
    • a generated font
  4. The package injects the font and replaces the placeholder elements with the protected text.

The original text is therefore no longer present in the HTML source.

Why Noscrape?

Noscrape uses dynamically generated fonts instead of simply encoding or hiding text.

Benefits

  • Protects publicly visible text from automated scraping
  • One request for all protected elements
  • Fast integration
  • Minimal performance overhead
  • No build step required
  • Works with server-rendered Blade templates
  • Supports self-hosted deployments

Requirements

  • PHP 8.2+
  • Laravel 11 or newer
  • A Noscrape API key

Testing

Run the test suite:

composer test

Run static analysis:

composer analyse

Format the code:

composer format

License

The MIT License (MIT).