{"id":22814424,"url":"https://github.com/68publishers/crawler-client-php","last_synced_at":"2026-01-23T21:59:01.883Z","repository":{"id":173244512,"uuid":"650439942","full_name":"68publishers/crawler-client-php","owner":"68publishers","description":":spider_web: PHP Client for https://github.com/68publishers/crawler","archived":false,"fork":false,"pushed_at":"2024-10-14T04:49:55.000Z","size":91,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-27T17:10:55.292Z","etag":null,"topics":["crawler","crawling","php","scraper","scraping"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/68publishers.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-06-07T04:38:34.000Z","updated_at":"2024-10-14T04:49:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"340fcfbe-a6dd-4201-b6dc-e6a7fc1cdad5","html_url":"https://github.com/68publishers/crawler-client-php","commit_stats":null,"previous_names":["68publishers/crawler-client-php"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/68publishers/crawler-client-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/68publishers%2Fcrawler-client-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/68publishers%2Fcrawler-client-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/68publishers%2Fcrawler-client-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/68publishers%2Fcrawler-client-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/68publishers","download_url":"https://codeload.github.com/68publishers/crawler-client-php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/68publishers%2Fcrawler-client-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28700717,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T17:25:48.045Z","status":"ssl_error","status_checked_at":"2026-01-23T17:25:47.153Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crawler","crawling","php","scraper","scraping"],"created_at":"2024-12-12T13:08:51.803Z","updated_at":"2026-01-23T21:59:01.879Z","avatar_url":"https://github.com/68publishers.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\" style=\"text-align: center; margin-bottom: 50px\"\u003e\n\u003cimg src=\"docs/images/logo.svg\" alt=\"Crawler Client Logo\" align=\"center\" width=\"200\"\u003e\n\u003ch1 align=\"center\"\u003eCrawler Client PHP\u003c/h1\u003e\n\u003cp\u003ePHP Client for \u003ca href=\"https://github.com/68publishers/crawler\"\u003e68publishers/crawler\u003c/a\u003e\u003c/p\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/68publishers/crawler-client-php/actions\"\u003e\u003cimg alt=\"Checks\" src=\"https://badgen.net/github/checks/68publishers/crawler-client-php/main\"\u003e\u003c/a\u003e\n\u003ca href=\"https://coveralls.io/github/68publishers/crawler-client-php?branch=main\"\u003e\u003cimg alt=\"Coverage Status\" src=\"https://coveralls.io/repos/github/68publishers/crawler-client-php/badge.svg?branch=main\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/68publishers/crawler-client-php\"\u003e\u003cimg alt=\"Total Downloads\" src=\"https://badgen.net/packagist/dt/68publishers/crawler-client-php\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/68publishers/crawler-client-php\"\u003e\u003cimg alt=\"Latest Version\" src=\"https://badgen.net/packagist/v/68publishers/crawler-client-php\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/68publishers/crawler-client-php\"\u003e\u003cimg alt=\"PHP Version\" src=\"https://badgen.net/packagist/php/68publishers/crawler-client-php\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Installation\n\n```sh\n$ composer require 68publishers/crawler-client-php\n```\n\n## Client initialization\n\nThe client instance is simply created by calling the static method `create()`.\n\n```php\nuse SixtyEightPublishers\\CrawlerClient\\CrawlerClient;\n\n$client = CrawlerClient::create('\u003cfull url to your crawler instance\u003e');\n```\n\nThe [Guzzle](https://github.com/guzzle/guzzle) library is used to communicate with the Crawler API.\nIf you want to pass some custom options to the configuration for Guzzle, use the second optional parameter.\n\n```php\nuse SixtyEightPublishers\\CrawlerClient\\CrawlerClient;\n\n$client = CrawlerClient::create('\u003cfull url to your crawler instance\u003e', [\n    'timeout' =\u003e 0,\n]);\n```\n\nRequests to the Crawler API must always be authenticated, so we must provide credentials.\n\n```php\nuse SixtyEightPublishers\\CrawlerClient\\CrawlerClient;\nuse SixtyEightPublishers\\CrawlerClient\\Authentication\\Credentials;\n\n$client = CrawlerClient::create('\u003cfull url to your crawler instance\u003e');\n\n$client = $client-\u003ewithAuthentication(new Credentials('\u003cusername\u003e', '\u003cpassword\u003e'));\n```\n\nIt should be pointed out that the client is immutable - calling the `with*` methods always returns a new instance.\nThis 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.\n\n## Nette Framework integration\n\nFor integration with the Nette Framework please follow [this link](docs/integration-with-nette.md).\n\n## Working with scenarios\n\nScenarios are handled by `ScenarioController`.\n\n```php\nuse SixtyEightPublishers\\CrawlerClient\\Controller\\Scenario\\ScenariosController;\n\n$controller = $client-\u003egetController(ScenariosController::class);\n```\n\n### List scenarios\n\n```php\n/**\n * @param int $page\n * @param int $limit\n * @param array\u003cstring, string|array\u003cstring\u003e\u003e $filter\n * \n * @returns \\SixtyEightPublishers\\CrawlerClient\\Controller\\Scenario\\ScenarioListingResponse\n * \n * @throws \\SixtyEightPublishers\\CrawlerClient\\Exception\\BadRequestException\n */\n```\n\n```php\n$response = $controller-\u003elistScenarios(1, 10);\n\n$filteredResponse = $controller-\u003elistScenarios(1, 10, [\n    'name' =\u003e 'Test',\n    'status' =\u003e 'failed',\n])\n```\n\n### Get scenario\n\n```php\n/**\n * @param string $scenarioId\n * \n * @returns \\SixtyEightPublishers\\CrawlerClient\\Controller\\Scenario\\ScenarioResponse\n * \n * @throws \\SixtyEightPublishers\\CrawlerClient\\Exception\\BadRequestException\n * @throws \\SixtyEightPublishers\\CrawlerClient\\Exception\\NotFoundException\n */\n```\n\n```php\n$response = $controller-\u003egetScenario('\u003cid\u003e');\n```\n\n### Run scenario\n\n```php\n/**\n * @param \\SixtyEightPublishers\\CrawlerClient\\Controller\\Scenario\\RequestBody\\ScenarioRequestBody $requestBody\n * \n * @returns \\SixtyEightPublishers\\CrawlerClient\\Controller\\Scenario\\ScenarioResponse\n * \n * @throws \\SixtyEightPublishers\\CrawlerClient\\Exception\\BadRequestException\n */\n```\n\nAs a scenario config we can pass a normal array or use prepared value objects. Both options are valid.\n\n```php\n use SixtyEightPublishers\\CrawlerClient\\Controller\\Scenario\\RequestBody\\ScenarioRequestBody;\n\n$requestBody = new ScenarioRequestBody(\n    name: 'My scenario',\n    flags: ['my_flag' =\u003e 'my_flag_value'],\n    config: [\n        'scenes' =\u003e [ /* ... */ ],\n        'options' =\u003e [ /* ... */ ],\n        'entrypoint' =\u003e [ /* ... */ ],\n    ],\n)\n\n$response = $controller-\u003erunScenario($requestBody);\n```\n\n```php\n use SixtyEightPublishers\\CrawlerClient\\Controller\\Scenario\\RequestBody\\ScenarioRequestBody;\n use SixtyEightPublishers\\CrawlerClient\\Controller\\Scenario\\ValueObject\\ScenarioConfig;\n use SixtyEightPublishers\\CrawlerClient\\Controller\\Scenario\\ValueObject\\Entrypoint;\n use SixtyEightPublishers\\CrawlerClient\\Controller\\Scenario\\ValueObject\\Action;\n\n$requestBody = new ScenarioRequestBody(\n    name: 'My scenario',\n    flags: ['my_flag' =\u003e 'my_flag_value'],\n    config: (new ScenarioConfig(new Entrypoint('\u003curl\u003e', 'default')))\n        -\u003ewithOptions(/* ... */)\n        -\u003ewithScene('default', [\n            new Action('...', [ /* ... */ ])\n            new Action('...', [ /* ... */ ])\n        ]),\n)\n\n$response = $controller-\u003erunScenario($requestBody);\n```\n\n### Validate scenario\n\n```php\n/**\n * @param \\SixtyEightPublishers\\CrawlerClient\\Controller\\Scenario\\RequestBody\\ScenarioRequestBody $requestBody\n * \n * @returns \\SixtyEightPublishers\\CrawlerClient\\Controller\\Scenario\\ValidateScenarioResponse\n */\n```\n\nAs a scenario config we can pass a normal array or use prepared value objects. Both options are valid.\n\n```php\n use SixtyEightPublishers\\CrawlerClient\\Controller\\Scenario\\RequestBody\\ScenarioRequestBody;\n\n$requestBody = new ScenarioRequestBody(\n    name: 'My scenario',\n    flags: ['my_flag' =\u003e 'my_flag_value'],\n    config: [\n        'scenes' =\u003e [ /* ... */ ],\n        'options' =\u003e [ /* ... */ ],\n        'entrypoint' =\u003e [ /* ... */ ],\n    ],\n)\n\n$response = $controller-\u003evalidateScenario($requestBody);\n```\n\n```php\n use SixtyEightPublishers\\CrawlerClient\\Controller\\Scenario\\RequestBody\\ScenarioRequestBody;\n use SixtyEightPublishers\\CrawlerClient\\Controller\\Scenario\\ValueObject\\ScenarioConfig;\n use SixtyEightPublishers\\CrawlerClient\\Controller\\Scenario\\ValueObject\\Entrypoint;\n use SixtyEightPublishers\\CrawlerClient\\Controller\\Scenario\\ValueObject\\Action;\n\n$requestBody = new ScenarioRequestBody(\n    name: 'My scenario',\n    flags: ['my_flag' =\u003e 'my_flag_value'],\n    config: (new ScenarioConfig(new Entrypoint('\u003curl\u003e', 'default')))\n        -\u003ewithOptions(/* ... */)\n        -\u003ewithScene('default', [\n            new Action('...', [ /* ... */ ])\n            new Action('...', [ /* ... */ ])\n        ]),\n)\n\n$response = $controller-\u003evalidateScenario($requestBody);\n```\n\n### Abort scenario\n\n```php\n/**\n * @param string $scenarioId\n * \n * @returns \\SixtyEightPublishers\\CrawlerClient\\Controller\\Common\\NoContentResponse\n * \n * @throws \\SixtyEightPublishers\\CrawlerClient\\Exception\\BadRequestException\n * @throws \\SixtyEightPublishers\\CrawlerClient\\Exception\\NotFoundException\n */\n```\n\n```php\n$response = $controller-\u003eabortScenario('\u003cid\u003e');\n```\n\n## Working with scenario schedulers\n\nScenario schedulers are handled by `ScenarioSchedulersController`.\n\n```php\nuse SixtyEightPublishers\\CrawlerClient\\Controller\\ScenarioScheduler\\ScenarioSchedulersController;\n\n$controller = $client-\u003egetController(ScenarioSchedulersController::class);\n```\n\n### List scenario schedulers\n\n```php\n/**\n * @param int $page\n * @param int $limit\n * @param array\u003cstring, string|array\u003cstring\u003e\u003e $filter\n * \n * @returns \\SixtyEightPublishers\\CrawlerClient\\Controller\\ScenarioScheduler\\ScenarioSchedulerListingResponse\n * \n * @throws \\SixtyEightPublishers\\CrawlerClient\\Exception\\BadRequestException\n */\n```\n\n```php\n$response = $controller-\u003elistScenarioSchedulers(1, 10);\n\n$filteredResponse = $controller-\u003elistScenarioSchedulers(1, 10, [\n    'name' =\u003e 'Test',\n    'userId' =\u003e '\u003cid\u003e',\n])\n```\n\n### Get scenario scheduler\n\n```php\n/**\n * @param string $scenarioSchedulerId\n * \n * @returns \\SixtyEightPublishers\\CrawlerClient\\Controller\\ScenarioScheduler\\ScenarioSchedulerResponse\n * \n * @throws \\SixtyEightPublishers\\CrawlerClient\\Exception\\BadRequestException\n * @throws \\SixtyEightPublishers\\CrawlerClient\\Exception\\NotFoundException\n */\n```\n\n```php\n$response = $controller-\u003egetScenarioScheduler('\u003cid\u003e');\n$etag = $response-\u003egetEtag(); # you need Etag for update\n```\n\n### Create scenario scheduler\n\n```php\n/**\n * @param \\SixtyEightPublishers\\CrawlerClient\\Controller\\ScenarioScheduler\\RequestBody\\ScenarioSchedulerRequestBody $requestBody\n * \n * @returns \\SixtyEightPublishers\\CrawlerClient\\Controller\\ScenarioScheduler\\ScenarioSchedulerResponse\n * \n * @throws \\SixtyEightPublishers\\CrawlerClient\\Exception\\BadRequestException\n */\n```\n\nAs a scenario config we can pass a normal array or use prepared value objects. Both options are valid.\n\n```php\n use SixtyEightPublishers\\CrawlerClient\\Controller\\ScenarioScheduler\\RequestBody\\ScenarioSchedulerRequestBody;\n\n$requestBody = new ScenarioSchedulerRequestBody(\n    name: 'My scenario',\n    flags: ['my_flag' =\u003e 'my_flag_value'],\n    active: true,\n    expression: '0 2 * * *',\n    config: [\n        'scenes' =\u003e [ /* ... */ ],\n        'options' =\u003e [ /* ... */ ],\n        'entrypoint' =\u003e [ /* ... */ ],\n    ],\n)\n\n$response = $controller-\u003ecreateScenarioScheduler($requestBody);\n$etag = $response-\u003egetEtag(); # you need Etag for update\n```\n\n```php\n use SixtyEightPublishers\\CrawlerClient\\Controller\\ScenarioScheduler\\RequestBody\\ScenarioSchedulerRequestBody;\n use SixtyEightPublishers\\CrawlerClient\\Controller\\Scenario\\ValueObject\\ScenarioConfig;\n use SixtyEightPublishers\\CrawlerClient\\Controller\\Scenario\\ValueObject\\Entrypoint;\n use SixtyEightPublishers\\CrawlerClient\\Controller\\Scenario\\ValueObject\\Action;\n\n$requestBody = new ScenarioSchedulerRequestBody(\n    name: 'My scenario',\n    flags: ['my_flag' =\u003e 'my_flag_value'],\n    active: true,\n    expression: '0 2 * * *',\n    config: (new ScenarioConfig(new Entrypoint('\u003curl\u003e', 'default')))\n        -\u003ewithOptions(/* ... */)\n        -\u003ewithScene('default', [\n            new Action('...', [ /* ... */ ])\n            new Action('...', [ /* ... */ ])\n        ]),\n)\n\n$response = $controller-\u003erunScenario($requestBody);\n$etag = $response-\u003egetEtag(); # you need Etag for update\n```\n\n### Update scenario scheduler\n\n```php\n/**\n * @param string $scenarioSchedulerId\n * @param string $etag\n * @param \\SixtyEightPublishers\\CrawlerClient\\Controller\\ScenarioScheduler\\RequestBody\\ScenarioSchedulerRequestBody $requestBody\n * \n * @returns \\SixtyEightPublishers\\CrawlerClient\\Controller\\ScenarioScheduler\\ScenarioSchedulerResponse\n * \n * @throws \\SixtyEightPublishers\\CrawlerClient\\Exception\\BadRequestException\n * @throws \\SixtyEightPublishers\\CrawlerClient\\Exception\\PreconditionFailedException\n */\n```\n\nAs a scenario config we can pass a normal array or use prepared value objects. Both options are valid.\n\n```php\n use SixtyEightPublishers\\CrawlerClient\\Controller\\ScenarioScheduler\\RequestBody\\ScenarioSchedulerRequestBody;\n\n$requestBody = new ScenarioSchedulerRequestBody(\n    name: 'My scenario',\n    flags: ['my_flag' =\u003e 'my_flag_value'],\n    active: true,\n    expression: '0 2 * * *',\n    config: [\n        'scenes' =\u003e [ /* ... */ ],\n        'options' =\u003e [ /* ... */ ],\n        'entrypoint' =\u003e [ /* ... */ ],\n    ],\n)\n\n$response = $controller-\u003eupdateScenarioScheduler('\u003cid\u003e', '\u003cetag\u003e', $requestBody);\n$etag = $response-\u003egetEtag(); # you need Etag for next update\n```\n\n```php\n use SixtyEightPublishers\\CrawlerClient\\Controller\\ScenarioScheduler\\RequestBody\\ScenarioSchedulerRequestBody;\n use SixtyEightPublishers\\CrawlerClient\\Controller\\Scenario\\ValueObject\\ScenarioConfig;\n use SixtyEightPublishers\\CrawlerClient\\Controller\\Scenario\\ValueObject\\Entrypoint;\n use SixtyEightPublishers\\CrawlerClient\\Controller\\Scenario\\ValueObject\\Action;\n\n$requestBody = new ScenarioSchedulerRequestBody(\n    name: 'My scenario',\n    flags: ['my_flag' =\u003e 'my_flag_value'],\n    active: true,\n    expression: '0 2 * * *',\n    config: (new ScenarioConfig(new Entrypoint('\u003curl\u003e', 'default')))\n        -\u003ewithOptions(/* ... */)\n        -\u003ewithScene('default', [\n            new Action('...', [ /* ... */ ])\n            new Action('...', [ /* ... */ ])\n        ]),\n)\n\n$response = $controller-\u003eupdateScenarioScheduler('\u003cid\u003e', '\u003cetag\u003e', $requestBody);\n$etag = $response-\u003egetEtag(); # you need Etag for next update\n```\n\n### Validate scenario scheduler\n\n```php\n/**\n * @param \\SixtyEightPublishers\\CrawlerClient\\Controller\\ScenarioScheduler\\RequestBody\\ScenarioSchedulerRequestBody $requestBody\n * \n * @returns \\SixtyEightPublishers\\CrawlerClient\\Controller\\ScenarioScheduler\\ValidateScenarioSchedulerResponse\n */\n```\n\nAs a scenario config we can pass a normal array or use prepared value objects. Both options are valid.\n\n```php\n use SixtyEightPublishers\\CrawlerClient\\Controller\\ScenarioScheduler\\RequestBody\\ScenarioSchedulerRequestBody;\n\n$requestBody = new ScenarioSchedulerRequestBody(\n    name: 'My scenario',\n    flags: ['my_flag' =\u003e 'my_flag_value'],\n    active: true,\n    expression: '0 2 * * *',\n    config: [\n        'scenes' =\u003e [ /* ... */ ],\n        'options' =\u003e [ /* ... */ ],\n        'entrypoint' =\u003e [ /* ... */ ],\n    ],\n)\n\n$response = $controller-\u003evalidateScenarioScheduler($requestBody);\n```\n\n```php\n use SixtyEightPublishers\\CrawlerClient\\Controller\\ScenarioScheduler\\RequestBody\\ScenarioSchedulerRequestBody;\n use SixtyEightPublishers\\CrawlerClient\\Controller\\Scenario\\ValueObject\\ScenarioConfig;\n use SixtyEightPublishers\\CrawlerClient\\Controller\\Scenario\\ValueObject\\Entrypoint;\n use SixtyEightPublishers\\CrawlerClient\\Controller\\Scenario\\ValueObject\\Action;\n\n$requestBody = new ScenarioSchedulerRequestBody(\n    name: 'My scenario',\n    flags: ['my_flag' =\u003e 'my_flag_value'],\n    active: true,\n    expression: '0 2 * * *',\n    config: (new ScenarioConfig(new Entrypoint('\u003curl\u003e', 'default')))\n        -\u003ewithOptions(/* ... */)\n        -\u003ewithScene('default', [\n            new Action('...', [ /* ... */ ])\n            new Action('...', [ /* ... */ ])\n        ]),\n)\n\n$response = $controller-\u003evalidateScenarioScheduler($requestBody);\n```\n\n### Activate/deactivate scenario scheduler\n\n```php\n/**\n * @param string $scenarioSchedulerId\n * \n * @returns \\SixtyEightPublishers\\CrawlerClient\\Controller\\ScenarioScheduler\\ScenarioSchedulerResponse\n * \n * @throws \\SixtyEightPublishers\\CrawlerClient\\Exception\\BadRequestException\n * @throws \\SixtyEightPublishers\\CrawlerClient\\Exception\\NotFoundException\n */\n```\n\n```php\n use SixtyEightPublishers\\CrawlerClient\\Controller\\ScenarioScheduler\\RequestBody\\ScenarioSchedulerRequestBody;\n\n# to activate the scenario scheduler:\n$response = $controller-\u003eactivateScenarioScheduler('\u003cid\u003e');\n\n# to deactivate the scenario scheduler:\n$response = $controller-\u003edeactivateScenarioScheduler('\u003cid\u003e');\n```\n\n### Delete scenario scheduler\n\n```php\n/**\n * @param string $scenarioSchedulerId\n * \n * @returns \\SixtyEightPublishers\\CrawlerClient\\Controller\\Common\\NoContentResponse\n * \n * @throws \\SixtyEightPublishers\\CrawlerClient\\Exception\\BadRequestException\n * @throws \\SixtyEightPublishers\\CrawlerClient\\Exception\\NotFoundException\n */\n```\n\n```php\n$response = $controller-\u003edeleteScenarioScheduler('\u003cid\u003e');\n```\n\n## License\n\nThe package is distributed under the MIT License. See [LICENSE](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F68publishers%2Fcrawler-client-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F68publishers%2Fcrawler-client-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F68publishers%2Fcrawler-client-php/lists"}