PHPackages                             abbadon1334/laravel-apify - 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. abbadon1334/laravel-apify

ActiveLibrary[API Development](/categories/api)

abbadon1334/laravel-apify
=========================

A Laravel package that provides a convenient interface for integrating with the Apify web scraping and automation platform

1.0(4mo ago)02.8k↓45%MITPHPPHP ^8.2

Since Dec 29Pushed 4mo agoCompare

[ Source](https://github.com/abbadon1334/laravel-apify)[ Packagist](https://packagist.org/packages/abbadon1334/laravel-apify)[ RSS](/packages/abbadon1334-laravel-apify/feed)WikiDiscussions main Synced 1mo ago

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

Laravel Apify Package
=====================

[](#laravel-apify-package)

A Laravel package for integrating with the [Apify](https://apify.com) web scraping and automation platform.

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

[](#installation)

Install the package via Composer:

```
composer require flatroy/laravel-apify
```

The package will automatically register its service provider and facade.

Configuration
-------------

[](#configuration)

Publish the configuration file:

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

Add your Apify API token to your `.env` file:

```
APIFY_API_TOKEN=your_apify_api_token_here
```

You can find your API token in your [Apify account settings](https://console.apify.com/settings/integrations).

Usage
-----

[](#usage)

### Using the Facade

[](#using-the-facade)

```
use Apify\Laravel\Facades\Apify;

// Run an actor
$result = Apify::runActor('actor-id', [
    'url' => 'https://example.com'
], [
    'waitForFinish' => 60
]);

// Get dataset results
$data = Apify::getDataset('dataset-id');

// Get user information
$user = Apify::getUser();
```

### Using Dependency Injection

[](#using-dependency-injection)

```
use Apify\Laravel\ApifyClient;

class ScrapingService
{
    public function __construct(private ApifyClient $apify)
    {
    }

    public function scrapeWebsite(string $url): array
    {
        return $this->apify->runActor('web-scraper', [
            'url' => $url
        ]);
    }
}
```

Available Methods
-----------------

[](#available-methods)

### Running Actors

[](#running-actors)

```
// Run an actor and wait for completion
$result = Apify::runActor('actor-id', $input, [
    'waitForFinish' => 60, // seconds
    'memory' => 512,       // MB
]);

// Run without waiting
$result = Apify::runActor('actor-id', $input, [
    'waitForFinish' => 0
]);
```

### Working with Datasets

[](#working-with-datasets)

```
// Get all items from a dataset
$items = Apify::getDataset('dataset-id');

// Get items with pagination
$items = Apify::getDataset('dataset-id', [
    'limit' => 100,
    'offset' => 200
]);

// Get specific fields only
$items = Apify::getDataset('dataset-id', [
    'fields' => ['title', 'url', 'price']
]);
```

### Key-Value Stores

[](#key-value-stores)

```
// Get a record from key-value store
$record = Apify::getKeyValueStore('store-id', 'record-key');

// Set a record in key-value store
Apify::setKeyValueStore('store-id', 'record-key', [
    'data' => 'value'
]);

// Store binary data
Apify::setKeyValueStore('store-id', 'image.jpg', $binaryData, 'image/jpeg');
```

### Actor Runs Management

[](#actor-runs-management)

```
// Get actor run details
$run = Apify::getActorRun('run-id');

// Abort a running actor
$result = Apify::abortActorRun('run-id');
```

### Listing Actors

[](#listing-actors)

```
// List all available actors
$actors = Apify::listActors();

// List only your actors
$myActors = Apify::listActors(['my' => true]);

// Paginated listing
$actors = Apify::listActors([
    'limit' => 50,
    'offset' => 100
]);
```

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

[](#error-handling)

The package throws `ApifyException` for API errors:

```
use Apify\Laravel\ApifyException;

try {
    $result = Apify::runActor('invalid-actor-id');
} catch (ApifyException $e) {
    Log::error('Apify error: ' . $e->getMessage());
}
```

Configuration Options
---------------------

[](#configuration-options)

The configuration file (`config/apify.php`) includes:

- `api_token`: Your Apify API token
- `base_uri`: API base URL (default: )
- `timeout`: Request timeout in seconds (default: 30)
- `default_actor_options`: Default options for running actors
- `webhook_url`: URL for webhook notifications
- `webhook_events`: Events to receive webhooks for

Testing
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance74

Regular maintenance activity

Popularity23

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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

141d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/54f3bc6465a0f20b47cc7cd7bfe00f607bf80b9de41d5d35fa6740f4b6b3f6c9?d=identicon)[abbadon1334](/maintainers/abbadon1334)

---

Top Contributors

[![Flatroy](https://avatars.githubusercontent.com/u/4980165?v=4)](https://github.com/Flatroy "Flatroy (3 commits)")[![abbadon1334](https://avatars.githubusercontent.com/u/5801824?v=4)](https://github.com/abbadon1334 "abbadon1334 (1 commits)")

---

Tags

apilaravelautomationapify

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/abbadon1334-laravel-apify/health.svg)

```
[![Health](https://phpackages.com/badges/abbadon1334-laravel-apify/health.svg)](https://phpackages.com/packages/abbadon1334-laravel-apify)
```

###  Alternatives

[nickurt/laravel-postcodeapi

Universal PostcodeApi for Laravel 11.x/12.x/13.x

97221.2k](/packages/nickurt-laravel-postcodeapi)[njoguamos/laravel-plausible

A laravel package for interacting with plausible analytics api.

208.8k](/packages/njoguamos-laravel-plausible)[xelon-ag/vmware-php-client

PHP API Client for VmWare

114.3k](/packages/xelon-ag-vmware-php-client)[crenspire/laravel-whatsapp

Laravel WhatsApp Business API package

133.0k](/packages/crenspire-laravel-whatsapp)

PHPackages © 2026

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