PHPackages                             68publishers/crawler-client-php - 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. 68publishers/crawler-client-php

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

68publishers/crawler-client-php
===============================

v1.2.1(1y ago)1715↓66.7%proprietaryPHPPHP ^7.4 || ^8.0

Since Jun 9Pushed 1y ago1 watchersCompare

[ Source](https://github.com/68publishers/crawler-client-php)[ Packagist](https://packagist.org/packages/68publishers/crawler-client-php)[ RSS](/packages/68publishers-crawler-client-php/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (5)Dependencies (12)Versions (6)Used By (0)

[![Crawler Client Logo](docs/images/logo.svg)](docs/images/logo.svg)Crawler Client PHP
==================

[](#crawler-client-php)

PHP Client for [68publishers/crawler](https://github.com/68publishers/crawler)

[![Checks](https://camo.githubusercontent.com/244728f4a6b0146f585976dc882b632e214eaeaa5a62fedb3312f59a488a9022/68747470733a2f2f62616467656e2e6e65742f6769746875622f636865636b732f36387075626c6973686572732f637261776c65722d636c69656e742d7068702f6d61696e)](https://github.com/68publishers/crawler-client-php/actions)[![Coverage Status](https://camo.githubusercontent.com/9f526d48ec98aa6a7fb1257d9f4333c06282a2bd1b1c8655cd32d6ba704324c1/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f36387075626c6973686572732f637261776c65722d636c69656e742d7068702f62616467652e7376673f6272616e63683d6d61696e)](https://coveralls.io/github/68publishers/crawler-client-php?branch=main)[![Total Downloads](https://camo.githubusercontent.com/452e4939a807a6eb04cde94206df75907994d9f01990aecc0f17f7a8216c476a/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f64742f36387075626c6973686572732f637261776c65722d636c69656e742d706870)](https://packagist.org/packages/68publishers/crawler-client-php)[![Latest Version](https://camo.githubusercontent.com/634ed3113ab0f2ca4374721d6cec4e9b91a334da5212964ea2db760f44bfe506/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f762f36387075626c6973686572732f637261776c65722d636c69656e742d706870)](https://packagist.org/packages/68publishers/crawler-client-php)[![PHP Version](https://camo.githubusercontent.com/4027127cce0ce5a76d7c52c7fdfa13be99a45e9672b8a0dd9bb2b5b63eab6214/68747470733a2f2f62616467656e2e6e65742f7061636b61676973742f7068702f36387075626c6973686572732f637261776c65722d636c69656e742d706870)](https://packagist.org/packages/68publishers/crawler-client-php)

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

[](#installation)

```
$ composer require 68publishers/crawler-client-php
```

Client initialization
---------------------

[](#client-initialization)

The client instance is simply created by calling the static method `create()`.

```
use SixtyEightPublishers\CrawlerClient\CrawlerClient;

$client = CrawlerClient::create('');
```

The [Guzzle](https://github.com/guzzle/guzzle) library is used to communicate with the Crawler API. If you want to pass some custom options to the configuration for Guzzle, use the second optional parameter.

```
use SixtyEightPublishers\CrawlerClient\CrawlerClient;

$client = CrawlerClient::create('', [
    'timeout' => 0,
]);
```

Requests to the Crawler API must always be authenticated, so we must provide credentials.

```
use SixtyEightPublishers\CrawlerClient\CrawlerClient;
use SixtyEightPublishers\CrawlerClient\Authentication\Credentials;

$client = CrawlerClient::create('');

$client = $client->withAuthentication(new Credentials('', ''));
```

It should be pointed out that the client is immutable - calling the `with*` methods always returns a new instance. This is all that is needed for the client to work properly. You can read about other options on the [Advanced options](docs/advanced-options.md) page.

Nette Framework integration
---------------------------

[](#nette-framework-integration)

For integration with the Nette Framework please follow [this link](docs/integration-with-nette.md).

Working with scenarios
----------------------

[](#working-with-scenarios)

Scenarios are handled by `ScenarioController`.

```
use SixtyEightPublishers\CrawlerClient\Controller\Scenario\ScenariosController;

$controller = $client->getController(ScenariosController::class);
```

### List scenarios

[](#list-scenarios)

```
/**
 * @param int $page
 * @param int $limit
 * @param array $filter
 *
 * @returns \SixtyEightPublishers\CrawlerClient\Controller\Scenario\ScenarioListingResponse
 *
 * @throws \SixtyEightPublishers\CrawlerClient\Exception\BadRequestException
 */
```

```
$response = $controller->listScenarios(1, 10);

$filteredResponse = $controller->listScenarios(1, 10, [
    'name' => 'Test',
    'status' => 'failed',
])
```

### Get scenario

[](#get-scenario)

```
/**
 * @param string $scenarioId
 *
 * @returns \SixtyEightPublishers\CrawlerClient\Controller\Scenario\ScenarioResponse
 *
 * @throws \SixtyEightPublishers\CrawlerClient\Exception\BadRequestException
 * @throws \SixtyEightPublishers\CrawlerClient\Exception\NotFoundException
 */
```

```
$response = $controller->getScenario('');
```

### Run scenario

[](#run-scenario)

```
/**
 * @param \SixtyEightPublishers\CrawlerClient\Controller\Scenario\RequestBody\ScenarioRequestBody $requestBody
 *
 * @returns \SixtyEightPublishers\CrawlerClient\Controller\Scenario\ScenarioResponse
 *
 * @throws \SixtyEightPublishers\CrawlerClient\Exception\BadRequestException
 */
```

As a scenario config we can pass a normal array or use prepared value objects. Both options are valid.

```
 use SixtyEightPublishers\CrawlerClient\Controller\Scenario\RequestBody\ScenarioRequestBody;

$requestBody = new ScenarioRequestBody(
    name: 'My scenario',
    flags: ['my_flag' => 'my_flag_value'],
    config: [
        'scenes' => [ /* ... */ ],
        'options' => [ /* ... */ ],
        'entrypoint' => [ /* ... */ ],
    ],
)

$response = $controller->runScenario($requestBody);
```

```
 use SixtyEightPublishers\CrawlerClient\Controller\Scenario\RequestBody\ScenarioRequestBody;
 use SixtyEightPublishers\CrawlerClient\Controller\Scenario\ValueObject\ScenarioConfig;
 use SixtyEightPublishers\CrawlerClient\Controller\Scenario\ValueObject\Entrypoint;
 use SixtyEightPublishers\CrawlerClient\Controller\Scenario\ValueObject\Action;

$requestBody = new ScenarioRequestBody(
    name: 'My scenario',
    flags: ['my_flag' => 'my_flag_value'],
    config: (new ScenarioConfig(new Entrypoint('', 'default')))
        ->withOptions(/* ... */)
        ->withScene('default', [
            new Action('...', [ /* ... */ ])
            new Action('...', [ /* ... */ ])
        ]),
)

$response = $controller->runScenario($requestBody);
```

### Validate scenario

[](#validate-scenario)

```
/**
 * @param \SixtyEightPublishers\CrawlerClient\Controller\Scenario\RequestBody\ScenarioRequestBody $requestBody
 *
 * @returns \SixtyEightPublishers\CrawlerClient\Controller\Scenario\ValidateScenarioResponse
 */
```

As a scenario config we can pass a normal array or use prepared value objects. Both options are valid.

```
 use SixtyEightPublishers\CrawlerClient\Controller\Scenario\RequestBody\ScenarioRequestBody;

$requestBody = new ScenarioRequestBody(
    name: 'My scenario',
    flags: ['my_flag' => 'my_flag_value'],
    config: [
        'scenes' => [ /* ... */ ],
        'options' => [ /* ... */ ],
        'entrypoint' => [ /* ... */ ],
    ],
)

$response = $controller->validateScenario($requestBody);
```

```
 use SixtyEightPublishers\CrawlerClient\Controller\Scenario\RequestBody\ScenarioRequestBody;
 use SixtyEightPublishers\CrawlerClient\Controller\Scenario\ValueObject\ScenarioConfig;
 use SixtyEightPublishers\CrawlerClient\Controller\Scenario\ValueObject\Entrypoint;
 use SixtyEightPublishers\CrawlerClient\Controller\Scenario\ValueObject\Action;

$requestBody = new ScenarioRequestBody(
    name: 'My scenario',
    flags: ['my_flag' => 'my_flag_value'],
    config: (new ScenarioConfig(new Entrypoint('', 'default')))
        ->withOptions(/* ... */)
        ->withScene('default', [
            new Action('...', [ /* ... */ ])
            new Action('...', [ /* ... */ ])
        ]),
)

$response = $controller->validateScenario($requestBody);
```

### Abort scenario

[](#abort-scenario)

```
/**
 * @param string $scenarioId
 *
 * @returns \SixtyEightPublishers\CrawlerClient\Controller\Common\NoContentResponse
 *
 * @throws \SixtyEightPublishers\CrawlerClient\Exception\BadRequestException
 * @throws \SixtyEightPublishers\CrawlerClient\Exception\NotFoundException
 */
```

```
$response = $controller->abortScenario('');
```

Working with scenario schedulers
--------------------------------

[](#working-with-scenario-schedulers)

Scenario schedulers are handled by `ScenarioSchedulersController`.

```
use SixtyEightPublishers\CrawlerClient\Controller\ScenarioScheduler\ScenarioSchedulersController;

$controller = $client->getController(ScenarioSchedulersController::class);
```

### List scenario schedulers

[](#list-scenario-schedulers)

```
/**
 * @param int $page
 * @param int $limit
 * @param array $filter
 *
 * @returns \SixtyEightPublishers\CrawlerClient\Controller\ScenarioScheduler\ScenarioSchedulerListingResponse
 *
 * @throws \SixtyEightPublishers\CrawlerClient\Exception\BadRequestException
 */
```

```
$response = $controller->listScenarioSchedulers(1, 10);

$filteredResponse = $controller->listScenarioSchedulers(1, 10, [
    'name' => 'Test',
    'userId' => '',
])
```

### Get scenario scheduler

[](#get-scenario-scheduler)

```
/**
 * @param string $scenarioSchedulerId
 *
 * @returns \SixtyEightPublishers\CrawlerClient\Controller\ScenarioScheduler\ScenarioSchedulerResponse
 *
 * @throws \SixtyEightPublishers\CrawlerClient\Exception\BadRequestException
 * @throws \SixtyEightPublishers\CrawlerClient\Exception\NotFoundException
 */
```

```
$response = $controller->getScenarioScheduler('');
$etag = $response->getEtag(); # you need Etag for update
```

### Create scenario scheduler

[](#create-scenario-scheduler)

```
/**
 * @param \SixtyEightPublishers\CrawlerClient\Controller\ScenarioScheduler\RequestBody\ScenarioSchedulerRequestBody $requestBody
 *
 * @returns \SixtyEightPublishers\CrawlerClient\Controller\ScenarioScheduler\ScenarioSchedulerResponse
 *
 * @throws \SixtyEightPublishers\CrawlerClient\Exception\BadRequestException
 */
```

As a scenario config we can pass a normal array or use prepared value objects. Both options are valid.

```
 use SixtyEightPublishers\CrawlerClient\Controller\ScenarioScheduler\RequestBody\ScenarioSchedulerRequestBody;

$requestBody = new ScenarioSchedulerRequestBody(
    name: 'My scenario',
    flags: ['my_flag' => 'my_flag_value'],
    active: true,
    expression: '0 2 * * *',
    config: [
        'scenes' => [ /* ... */ ],
        'options' => [ /* ... */ ],
        'entrypoint' => [ /* ... */ ],
    ],
)

$response = $controller->createScenarioScheduler($requestBody);
$etag = $response->getEtag(); # you need Etag for update
```

```
 use SixtyEightPublishers\CrawlerClient\Controller\ScenarioScheduler\RequestBody\ScenarioSchedulerRequestBody;
 use SixtyEightPublishers\CrawlerClient\Controller\Scenario\ValueObject\ScenarioConfig;
 use SixtyEightPublishers\CrawlerClient\Controller\Scenario\ValueObject\Entrypoint;
 use SixtyEightPublishers\CrawlerClient\Controller\Scenario\ValueObject\Action;

$requestBody = new ScenarioSchedulerRequestBody(
    name: 'My scenario',
    flags: ['my_flag' => 'my_flag_value'],
    active: true,
    expression: '0 2 * * *',
    config: (new ScenarioConfig(new Entrypoint('', 'default')))
        ->withOptions(/* ... */)
        ->withScene('default', [
            new Action('...', [ /* ... */ ])
            new Action('...', [ /* ... */ ])
        ]),
)

$response = $controller->runScenario($requestBody);
$etag = $response->getEtag(); # you need Etag for update
```

### Update scenario scheduler

[](#update-scenario-scheduler)

```
/**
 * @param string $scenarioSchedulerId
 * @param string $etag
 * @param \SixtyEightPublishers\CrawlerClient\Controller\ScenarioScheduler\RequestBody\ScenarioSchedulerRequestBody $requestBody
 *
 * @returns \SixtyEightPublishers\CrawlerClient\Controller\ScenarioScheduler\ScenarioSchedulerResponse
 *
 * @throws \SixtyEightPublishers\CrawlerClient\Exception\BadRequestException
 * @throws \SixtyEightPublishers\CrawlerClient\Exception\PreconditionFailedException
 */
```

As a scenario config we can pass a normal array or use prepared value objects. Both options are valid.

```
 use SixtyEightPublishers\CrawlerClient\Controller\ScenarioScheduler\RequestBody\ScenarioSchedulerRequestBody;

$requestBody = new ScenarioSchedulerRequestBody(
    name: 'My scenario',
    flags: ['my_flag' => 'my_flag_value'],
    active: true,
    expression: '0 2 * * *',
    config: [
        'scenes' => [ /* ... */ ],
        'options' => [ /* ... */ ],
        'entrypoint' => [ /* ... */ ],
    ],
)

$response = $controller->updateScenarioScheduler('', '', $requestBody);
$etag = $response->getEtag(); # you need Etag for next update
```

```
 use SixtyEightPublishers\CrawlerClient\Controller\ScenarioScheduler\RequestBody\ScenarioSchedulerRequestBody;
 use SixtyEightPublishers\CrawlerClient\Controller\Scenario\ValueObject\ScenarioConfig;
 use SixtyEightPublishers\CrawlerClient\Controller\Scenario\ValueObject\Entrypoint;
 use SixtyEightPublishers\CrawlerClient\Controller\Scenario\ValueObject\Action;

$requestBody = new ScenarioSchedulerRequestBody(
    name: 'My scenario',
    flags: ['my_flag' => 'my_flag_value'],
    active: true,
    expression: '0 2 * * *',
    config: (new ScenarioConfig(new Entrypoint('', 'default')))
        ->withOptions(/* ... */)
        ->withScene('default', [
            new Action('...', [ /* ... */ ])
            new Action('...', [ /* ... */ ])
        ]),
)

$response = $controller->updateScenarioScheduler('', '', $requestBody);
$etag = $response->getEtag(); # you need Etag for next update
```

### Validate scenario scheduler

[](#validate-scenario-scheduler)

```
/**
 * @param \SixtyEightPublishers\CrawlerClient\Controller\ScenarioScheduler\RequestBody\ScenarioSchedulerRequestBody $requestBody
 *
 * @returns \SixtyEightPublishers\CrawlerClient\Controller\ScenarioScheduler\ValidateScenarioSchedulerResponse
 */
```

As a scenario config we can pass a normal array or use prepared value objects. Both options are valid.

```
 use SixtyEightPublishers\CrawlerClient\Controller\ScenarioScheduler\RequestBody\ScenarioSchedulerRequestBody;

$requestBody = new ScenarioSchedulerRequestBody(
    name: 'My scenario',
    flags: ['my_flag' => 'my_flag_value'],
    active: true,
    expression: '0 2 * * *',
    config: [
        'scenes' => [ /* ... */ ],
        'options' => [ /* ... */ ],
        'entrypoint' => [ /* ... */ ],
    ],
)

$response = $controller->validateScenarioScheduler($requestBody);
```

```
 use SixtyEightPublishers\CrawlerClient\Controller\ScenarioScheduler\RequestBody\ScenarioSchedulerRequestBody;
 use SixtyEightPublishers\CrawlerClient\Controller\Scenario\ValueObject\ScenarioConfig;
 use SixtyEightPublishers\CrawlerClient\Controller\Scenario\ValueObject\Entrypoint;
 use SixtyEightPublishers\CrawlerClient\Controller\Scenario\ValueObject\Action;

$requestBody = new ScenarioSchedulerRequestBody(
    name: 'My scenario',
    flags: ['my_flag' => 'my_flag_value'],
    active: true,
    expression: '0 2 * * *',
    config: (new ScenarioConfig(new Entrypoint('', 'default')))
        ->withOptions(/* ... */)
        ->withScene('default', [
            new Action('...', [ /* ... */ ])
            new Action('...', [ /* ... */ ])
        ]),
)

$response = $controller->validateScenarioScheduler($requestBody);
```

### Activate/deactivate scenario scheduler

[](#activatedeactivate-scenario-scheduler)

```
/**
 * @param string $scenarioSchedulerId
 *
 * @returns \SixtyEightPublishers\CrawlerClient\Controller\ScenarioScheduler\ScenarioSchedulerResponse
 *
 * @throws \SixtyEightPublishers\CrawlerClient\Exception\BadRequestException
 * @throws \SixtyEightPublishers\CrawlerClient\Exception\NotFoundException
 */
```

```
 use SixtyEightPublishers\CrawlerClient\Controller\ScenarioScheduler\RequestBody\ScenarioSchedulerRequestBody;

# to activate the scenario scheduler:
$response = $controller->activateScenarioScheduler('');

# to deactivate the scenario scheduler:
$response = $controller->deactivateScenarioScheduler('');
```

### Delete scenario scheduler

[](#delete-scenario-scheduler)

```
/**
 * @param string $scenarioSchedulerId
 *
 * @returns \SixtyEightPublishers\CrawlerClient\Controller\Common\NoContentResponse
 *
 * @throws \SixtyEightPublishers\CrawlerClient\Exception\BadRequestException
 * @throws \SixtyEightPublishers\CrawlerClient\Exception\NotFoundException
 */
```

```
$response = $controller->deleteScenarioScheduler('');
```

License
-------

[](#license)

The package is distributed under the MIT License. See [LICENSE](LICENSE.md) for more information.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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 ~123 days

Total

5

Last Release

629d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/609005caba54757716c3c037c381376ab298714003da87c9e20aa8c501c97df8?d=identicon)[Jelen](/maintainers/Jelen)

---

Top Contributors

[![tg666](https://avatars.githubusercontent.com/u/24430186?v=4)](https://github.com/tg666 "tg666 (16 commits)")

---

Tags

crawlercrawlingphpscraperscrapingcrawlerscrapercrawlingscraping68publisherscrawler-client

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/68publishers-crawler-client-php/health.svg)

```
[![Health](https://phpackages.com/badges/68publishers-crawler-client-php/health.svg)](https://phpackages.com/packages/68publishers-crawler-client-php)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[statamic/cms

The Statamic CMS Core Package

4.8k3.6M992](/packages/statamic-cms)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21866.0M1.7k](/packages/drupal-core)[crwlr/crawler

Web crawling and scraping library.

36917.4k2](/packages/crwlr-crawler)[blackfire/player

A powerful web crawler and web scraper with Blackfire support

49617.1k](/packages/blackfire-player)

PHPackages © 2026

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