PHPackages                             docaxess/php-apify-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. docaxess/php-apify-sdk

ActiveLibrary[API Development](/categories/api)

docaxess/php-apify-sdk
======================

Unofficial SDK for Apify service

2.0.0(3mo ago)22.3k↓70.3%1[1 issues](https://github.com/ipedis/php-apify-sdk/issues)CC-BY-1.0PHPPHP &gt;=8.3CI passing

Since May 31Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/ipedis/php-apify-sdk)[ Packagist](https://packagist.org/packages/docaxess/php-apify-sdk)[ RSS](/packages/docaxess-php-apify-sdk/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (12)Versions (8)Used By (0)

Apify SDK for PHP
=================

[](#apify-sdk-for-php)

[![Latest Version](https://camo.githubusercontent.com/f825f25caf8a83139141b596e2b6fc8fca7e6a05c0c96b19519c291add1eda89/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646f6361786573732f7068702d61706966792d73646b2e7376673f6c6162656c3d52656c65617365267374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/docaxess/php-apify-sdk)[![CC-BY-1.0 License](https://camo.githubusercontent.com/fd6e87e08f38958f3f88b963da063edac0cdb96fc433c92b03e7723b2c738462/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f646f6361786573732f7068702d61706966792d73646b2e7376673f6c6162656c3d4c6963656e736526636f6c6f723d626c7565267374796c653d666f722d7468652d6261646765)](https://github.com/docaxess/php-apify-sdk/blob/main/LICENSE)

[![CI Testing](https://camo.githubusercontent.com/0c323d95b13f05d94a99b43c15c1cfc398dd03c4b45b413e403e2a2253e6924a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f646f6361786573732f7068702d61706966792d73646b2f746573742e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265266c6f676f436f6c6f723d7768697465266c6f676f3d676974687562266c6162656c3d54657374696e67)](https://github.com/docaxess/php-apify-sdk/actions)

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

[](#installation)

```
composer require docaxess/php-apify-sdk
```

Token generation
----------------

[](#token-generation)

You can generate a token by following the instructions:

- Go to the [Apify Console](https://console.apify.com/)
- Go to settings &gt; Integrations
- Click on the "+ Add token" button

You can find more detail on the [Apify Documentation](https://docs.apify.com/platform/integrations/api#api-token)

Usage
-----

[](#usage)

First you need to create a new instance of the ApifyConnector class and pass your token as a parameter.

```
use DocAxess\Apify\ApifyConnector;

$apify = new ApifyConnector('YOUR_APIFY_TOKEN');
```

From this point you can use the different methods available in the class.

### Get information about the user

[](#get-information-about-the-user)

```
$user = $apify->user()->me();
```

### Start a new actor run

[](#start-a-new-actor-run)

```
use DocAxess\Apify\ApifyConnector;
use DocAxess\Apify\Task\Data\Option\TaskOption;

// The ID of the actor you want to run, it can be found in the actor's URL
// or you can use the slug like 'yanis~actor-name'
$actorId = 'YOUR_ACTOR_ID';
$apify = new ApifyConnector('YOUR_APIFY_TOKEN');
$run = $apify->taskRunner()->run($actorId);

// it also possible to pass configuration options and input data
$config = new TaskOption(
    build: '1.2.3',
    timeout: 300,
    memory: 2048,
);
$run = $apify->taskRunner()->run($actorId, $config, [
    'key' => 'value' // input data to pass to the actor run
]);
```

### Add a webhook to an actor

[](#add-a-webhook-to-an-actor)

```
use DocAxess\Apify\ApifyConnector;
use DocAxess\Apify\Task\Data\Option\TaskOption;
use DocAxess\Apify\Webhook\Config\WebhookConfig;
use DocAxess\Apify\Webhook\Event\EventType;

$actorId = 'YOUR_ACTOR_ID';
$apify = new ApifyConnector('YOUR_APIFY_TOKEN');

$config = new TaskOption();
$config = $config->addWebhook(WebhookConfig::forEvent(EventType::RUN_SUCCEEDED, 'https://your-webhook-url.com'));

$run = $apify->taskRunner()->run($actorId, $config);
```

Webhook events detail can be parsed with the provided object.

```
use DocAxess\Apify\Webhook\Data\EventResult;

$eventResult = EventResult::fromArray(request()->all());
```

### Get Dataset

[](#get-dataset)

```
use DocAxess\Apify\ApifyConnector;
use DocAxess\Apify\Webhook\Data\EventResult;
use DocAxess\Apify\Core\Type\Identifier;

$eventResult = EventResult::fromArray(request()->all());

$apify = new ApifyConnector('YOUR_APIFY_TOKEN');
$results = $apify->dataset()->getJson($eventResult->datasetId);

// or if you know the dataset ID
$results = $apify->dataset()->getJson(Identifier::make('YOUR_DATASET_ID'));
```

By default, the dataset will return associative array, but you can also give the DTO class to return for each item. It should implement the `DocAxess\Apify\Dataset\Item\Item` interface.

```
use DocAxess\Apify\ApifyConnector;
use DocAxess\Apify\Webhook\Data\EventResult;
use DocAxess\Apify\Core\Type\Identifier;

$apify = new ApifyConnector('YOUR_APIFY_TOKEN');
$results = $apify->dataset()->getJson(Identifier::make('YOUR_DATASET_ID'), YourDtoForItem::class);
```

Disclaimer
----------

[](#disclaimer)

### Affiliation

[](#affiliation)

This package is not an official package from Apify. It is a community package that uses the Apify API. It is not affiliated with Apify in any way.

### API Coverage

[](#api-coverage)

This package does not cover all the Apify API, and was primarily built to cover our own use cases. It is a work in progress and will be updated over time. If you need a specific feature, feel free to open an issue or a pull request.

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance74

Regular maintenance activity

Popularity23

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 96.2% 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 ~111 days

Recently: every ~67 days

Total

7

Last Release

99d ago

Major Versions

0.4.0 → 1.0.12025-06-30

1.0.4 → 2.0.02026-03-26

PHP version history (2 changes)0.3.0PHP &gt;=8.2

1.0.1PHP &gt;=8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/97cc863f90ac18a7a620893a0a9cbf099dab4f8e5f853e1fe5a28c64b6dec9cc?d=identicon)[yanis-git](/maintainers/yanis-git)

---

Top Contributors

[![yanis-git](https://avatars.githubusercontent.com/u/4113879?v=4)](https://github.com/yanis-git "yanis-git (25 commits)")[![denbrian](https://avatars.githubusercontent.com/u/20847025?v=4)](https://github.com/denbrian "denbrian (1 commits)")

---

Tags

apifyclientcrawlerphpsdk

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[saloonphp/laravel-plugin

The official Laravel plugin for Saloon

807.1M201](/packages/saloonphp-laravel-plugin)[myoutdeskllc/salesforce-php

salesforce library for php8+

1579.5k](/packages/myoutdeskllc-salesforce-php)[codebar-ag/laravel-docuware

DocuWare integration with Laravel

1123.7k](/packages/codebar-ag-laravel-docuware)[codebar-ag/laravel-zammad

Zammad integration with Laravel

107.1k](/packages/codebar-ag-laravel-zammad)

PHPackages © 2026

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