PHPackages                             scanlyser/php-sdk - 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. [API Development](/categories/api)
4. /
5. scanlyser/php-sdk

ActiveLibrary[API Development](/categories/api)

scanlyser/php-sdk
=================

PHP SDK for the ScanLyser API — accessibility, SEO, performance, UX, and security scanning.

v1.0.0(2mo ago)00MITPHPPHP ^8.2

Since Apr 8Pushed 2mo agoCompare

[ Source](https://github.com/scanlyser/php-sdk)[ Packagist](https://packagist.org/packages/scanlyser/php-sdk)[ Docs](https://scanlyser.app)[ RSS](/packages/scanlyser-php-sdk/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

ScanLyser PHP SDK
=================

[](#scanlyser-php-sdk)

Official PHP SDK for the [ScanLyser](https://scanlyser.app) API. Run accessibility, SEO, performance, UX, and security scans programmatically.

Requirements
------------

[](#requirements)

- PHP 8.2+
- Guzzle 7.0+

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

[](#installation)

```
composer require scanlyser/php-sdk
```

Quick Start
-----------

[](#quick-start)

```
use ScanLyser\Client;

$client = new Client(apiKey: 'your-api-token');

// List your sites
$sites = $client->sites($teamId)->list();

foreach ($sites->data as $site) {
    echo "{$site->name}: {$site->url}\n";
}

// Trigger a scan
$scan = $client->scans($teamId)->trigger($siteId, wcagLevel: 'AA');

// Wait for completion
$scan = $client->scans($teamId)->awaitCompletion($scan->id);

// Get issues
$issues = $client->issues($teamId)->list($scan->id, severity: 'critical');
```

API Reference
-------------

[](#api-reference)

### Client

[](#client)

```
$client = new Client(
    apiKey: 'your-api-token',
    maxRetries: 3, // optional, retries on 429
);
```

### Teams

[](#teams)

```
$teams = $client->teams()->list();
$team = $client->teams()->get($teamId);
```

### Sites

[](#sites)

```
$sites = $client->sites($teamId)->list(perPage: 15);
$site = $client->sites($teamId)->create(name: 'My Site', url: 'https://example.com');
$site = $client->sites($teamId)->get($siteId);
$client->sites($teamId)->delete($siteId);
```

### Scans

[](#scans)

```
$scans = $client->scans($teamId)->list($siteId);
$scan = $client->scans($teamId)->trigger($siteId, wcagLevel: 'AA');
$scan = $client->scans($teamId)->get($scanId);

// Poll until complete (default: 600s timeout, 10s interval)
$scan = $client->scans($teamId)->awaitCompletion(
    $scanId,
    timeoutSeconds: 600,
    pollIntervalSeconds: 10,
);
```

### Pages

[](#pages)

```
$pages = $client->pages($teamId)->list($scanId);
$page = $client->pages($teamId)->get($scanId, $pageId);
```

### Issues

[](#issues)

```
$issues = $client->issues($teamId)->list($scanId);
$issues = $client->issues($teamId)->list($scanId, category: 'wcag', severity: 'critical');
```

### Reports

[](#reports)

```
$report = $client->reports($teamId)->json($scanId);
$client->reports($teamId)->pdf($scanId, saveTo: '/path/to/report.pdf');
```

Webhook Verification
--------------------

[](#webhook-verification)

Verify webhook signatures from scan completion callbacks:

```
use ScanLyser\Webhooks\WebhookSignature;

$isValid = WebhookSignature::verify(
    payload: $request->getContent(),
    signature: $request->header('X-Signature'),
    secret: $tokenHash,
);
```

Error Handling
--------------

[](#error-handling)

The SDK throws typed exceptions for API errors:

```
use ScanLyser\Exceptions\AuthenticationException;
use ScanLyser\Exceptions\ForbiddenException;
use ScanLyser\Exceptions\NotFoundException;
use ScanLyser\Exceptions\RateLimitException;
use ScanLyser\Exceptions\ValidationException;

try {
    $site = $client->sites($teamId)->get('nonexistent');
} catch (NotFoundException $exception) {
    // 404
} catch (ValidationException $exception) {
    // 422 - $exception->errors contains field-level errors
} catch (RateLimitException $exception) {
    // 429 - automatic retries exhausted
}
```

Rate-limited requests (429) are automatically retried up to 3 times with the `Retry-After` delay.

Laravel Integration
-------------------

[](#laravel-integration)

The SDK includes an optional service provider with auto-discovery.

### Publish the config:

[](#publish-the-config)

```
php artisan vendor:publish --tag=scanlyser-config
```

### Configure `.env`:

[](#configure-env)

```
SCANLYSER_TOKEN=your-api-token
SCANLYSER_TEAM=your-team-id
```

### Usage:

[](#usage)

```
use ScanLyser\Client;

class ScanController extends Controller
{
    public function trigger(Client $client): void
    {
        $scan = $client->scans(config('scanlyser.team_id'))
            ->trigger($siteId, wcagLevel: 'AA');
    }
}
```

License
-------

[](#license)

MIT

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance85

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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

Unknown

Total

1

Last Release

80d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2211203?v=4)[Sebastian Sulinski](/maintainers/sebastiansulinski)[@sebastiansulinski](https://github.com/sebastiansulinski)

---

Top Contributors

[![sebastiansulinski](https://avatars.githubusercontent.com/u/2211203?v=4)](https://github.com/sebastiansulinski "sebastiansulinski (5 commits)")

---

Tags

apisdkaccessibilityseowcagscanlyser

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/scanlyser-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/scanlyser-php-sdk/health.svg)](https://phpackages.com/packages/scanlyser-php-sdk)
```

###  Alternatives

[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[resend/resend-php

Resend PHP library.

596.2M35](/packages/resend-resend-php)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

563.5M10](/packages/checkout-checkout-sdk-php)[mozex/anthropic-laravel

Laravel integration for the Anthropic API: facade, config publishing, install command, testing fakes, messages, streaming, tool use, thinking, and batches.

72287.1k1](/packages/mozex-anthropic-laravel)[clicksend/clicksend-php

301.6M11](/packages/clicksend-clicksend-php)

PHPackages © 2026

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