Laravel Integration
Pricing
from $8.00 / 1,000 integration runs
Laravel Integration
Laravel Integration connects Laravel apps with Apify to run Actors, process trigger datasets, send signed webhook callbacks, forward dataset IDs, and support scraper orchestration, queue workflows, and Actor chaining.
Pricing
from $8.00 / 1,000 integration runs
Rating
5.0
(2)
Developer
Sovanza
Maintained by CommunityActor stats
0
Bookmarked
3
Total users
2
Monthly active users
15 days ago
Last modified
Categories
Share
Laravel Integration – Apify Automation Bridge for PHP Apps
Integrate the Laravel web application framework with the Apify platform to simplify building automation and web scraping APIs. This Actor acts as an integration layer: your Laravel app passes static configuration (webhook URL, API token, queue name) and dynamic scraper parameters, and this Actor runs other Apify Actors, processes integration trigger payloads, and calls back to Laravel with run status and dataset IDs.
Overview
This Laravel Integration Actor connects PHP applications to Apify using static Laravel settings (webhook URL, secrets, queue, correlation ID) and dynamic trigger data (dataset ID, run ID, key-value store ID from integration webhooks). It is built for Laravel developers, backend engineers, and agencies who need a reusable bridge for scraper orchestration, webhook callbacks, and Actor chaining without reimplementing Apify integration logic in every project.
Integration-ready by design: dynamic fields are read from the implicit payload field attached by Apify integration triggers, so users only configure the static Laravel side in most cases.
Key benefits
- Start any Apify scraper from Laravel controllers, jobs, or artisan commands
- Receive progress and completion callbacks on your own HTTPS endpoints
- Chain Actors with Apify Integrations (when a scraper finishes, process its dataset automatically)
- Forward dataset IDs (not full webhook payloads) and optionally preview rows
- Use Apify Proxy and retries for production reliability
- Export integration results in JSON, CSV, or Excel via Apify
Core features
- Run any Actor (
mode=run_actor): calltargetActorIdwithtargetActorInputfrom Laravel - Laravel webhooks: POST callbacks to
laravelWebhookUrlwith optional HMACX-Apify-Signature - Integration triggers: reads
payload.resource.defaultDatasetIdfrom Apify integration webhooks automatically - Process trigger datasets (
mode=process_trigger): copy source dataset rows into this run's dataset in batches - Forward to Laravel (
mode=forward_dataset): send dataset metadata (and optional preview) to your app - Static vs dynamic input: Laravel config is static; trigger fields come from
payloador advanced overrides - Apify Proxy: optional
proxyConfigurationmerged into child Actor input whenmergeProxyIntoTargetActoris true - Retries: configurable retries for
Actor.call()and Laravel webhook HTTP requests - Health check:
runHealthCheckOnStart: truefor Apify Console Try actor / CI validation
How to Use Laravel Integration on Apify
Using the Actor
- Open the Actor on the Apify platform and go to the Input tab.
- Configure input (see below): set
mode, Laravel webhook settings, and eithertargetActorId+targetActorInputor rely on integration triggerpayload. - Start the run. The Actor calls child Actors, processes trigger datasets, or forwards results, and pushes summary rows to the default dataset.
- Open the Dataset tab to browse integration summaries, copied rows, or download JSON/CSV/Excel.
- Schedule or integrate (optional): connect this Actor on another Actor's Integrations tab, use webhooks, or call from Laravel via
apify-client.
Input Configuration
Full schema: INPUT_SCHEMA.json. Example (run Python Scraper from Laravel — no cookies required):
{"mode": "run_actor","targetActorId": "sovanza.inc/python-scraper","startUrls": ["https://example.com"],"targetActorInput": {"startUrls": ["https://example.com"],"includeLinks": true,"includeHtml": false,"exportFormat": "json"},"laravelWebhookUrl": "https://your-app.test/api/apify/webhook","laravelWebhookSecret": "your-shared-secret","laravelBaseUrl": "https://your-app.test","laravelQueue": "scrapers","correlationId": "job-uuid-from-laravel","waitForFinish": true,"waitSecs": 120,"pushResultsToLaravel": true,"callbackOnProgress": true,"mergeProxyIntoTargetActor": false,"maxRetries": 3}
Health-check example (Apify Console Try actor):
{"runHealthCheckOnStart": true}
Integration trigger example (static Laravel config; payload attached automatically):
{"mode": "process_trigger","laravelWebhookUrl": "https://your-app.test/api/apify/webhook","laravelQueue": "default","pushResultsToLaravel": true,"callbackOnProgress": true}
runHealthCheckOnStart(optional): Iftrue, writes one demo dataset row and exits (defaultfalse). Use for Apify Console health checks.mode(optional):run_actor|process_trigger|forward_dataset(defaultrun_actor).laravelWebhookUrl(optional): HTTPS endpoint on your Laravel app for run progress and completion callbacks.laravelWebhookSecret(optional): Shared secret forX-Apify-Signature(HMAC SHA-256). Secret input — encrypted at rest, not copied to dataset rows.laravelApiToken(optional): Bearer token sent asAuthorizationwhen calling your Laravel webhook. Secret input.laravelBaseUrl(optional): Base URL of your Laravel app (included in callback payloads for traceability).laravelQueue(optional): Queue name your Laravel app should use when dispatching jobs from the webhook (defaultdefault).correlationId(optional): ID from your Laravel request/job so callbacks can be matched to the originating job.targetActorId(required whenmode=run_actor): Apify Actor ID orusername/actor-nameto run (e.g.sovanza.inc/python-scraper).startUrls(optional shortcut): Top-level URLs merged intotargetActorInput.startUrlsfor python-scraper.targetActorInput(optional): JSON object passed to the target Actor (scraper parameters from Laravel).waitForFinish(optional): Iftrue, blocks until the target Actor run completes (defaulttrue).waitSecs(optional): Max seconds to wait for the target Actor whenwaitForFinishis true (default300, max3600).mergeProxyIntoTargetActor(optional): InjectproxyConfigurationintotargetActorInputwhen not already set (defaulttrue).proxyConfiguration(optional): Apify proxy settings; forwarded to child Actors when merging is enabled.maxRetries(optional): Retry count for Actor calls and Laravel webhook requests (default3).retryDelayMs(optional): Base delay between retries in ms (default1000).pushResultsToLaravel(optional): Send finalSUCCEEDEDcallback when the run completes (defaulttrue).callbackOnProgress(optional): SendSTARTED/PROCESSINGcallbacks during long operations (defaulttrue).includeDatasetPreviewInCallback(optional): Attach up tomaxCallbackItemsrows in the final callback (defaultfalse).maxCallbackItems(optional): Max dataset rows in callback preview (default50).maxDatasetItems(optional): Max source dataset rows to process inprocess_triggermode (default1000).datasetBatchSize(optional): Batch size when reading source datasets (default100).sourceDatasetId(advanced): Override dataset ID; when empty, readspayload.resource.defaultDatasetId.sourceKeyValueStoreId(advanced): Override KV store ID from trigger payload.sourceRunId(advanced): Override triggering run ID from trigger payload.payload(automatic): Attached by Apify when started via Actor integrations orisApifyIntegrationwebhooks.
Authentication & sensitive input
Fields that can hold credentials use Apify secret input (isSecret: true), following the same pattern as other CloudBots Actors:
laravelWebhookSecret— shared HMAC secret for webhook verificationlaravelApiToken— Bearer token for your Laravel API
Secret values are encrypted in storage and are not written into dataset rows or logs.
Static vs dynamic input (integration-ready)
Per Apify integration guidelines:
- Static input — Laravel webhook URL, secrets, queue, target Actor config (same value every run).
- Dynamic input — dataset ID, run ID, KV store ID from the triggering event (read from
payload.resource).
When chained via Integrations → Connect Actor, Apify attaches:
{"payload": {"eventType": "ACTOR.RUN.SUCCEEDED","resource": {"id": "runId...","defaultDatasetId": "datasetId...","defaultKeyValueStoreId": "kvId...","status": "SUCCEEDED"}}}
Recommended integration prefill (Apify Console → Actor → Settings → Integrations): see INTEGRATION_INPUT.example.json.
Apify Console (quality score & monetization)
After deploying build 0.1+, finish these in Apify Console → Publication (cannot be set in git):
- Monetization → Pay per event (PPE) or pay-per-usage — tune based on your CU cost for child Actor calls.
- Store discounts: enable tier discounts for Bronze, Silver, and Gold plans.
- Re-run Try actor with
runHealthCheckOnStart: true— should finish in under 2 minutes on Apify.
Environment variables (optional)
| Variable | Purpose |
|---|---|
APIFY_TOKEN | Required on Apify platform; used by Actor.call() and dataset API access for child Actors. |
APIFY_LOG_LEVEL | Logging verbosity (default INFO in apify.json). |
Run locally
INPUT.json is gitignored. Copy INPUT.example.json to INPUT.json, set APIFY_TOKEN, then:
cd laravel-integrationnpm installcp INPUT.example.json INPUT.jsonnpm run validatenode src/main.js
Push to Apify:
$apify push
Output
Results are stored in the Actor's default dataset. Each run produces summary rows and, in process_trigger mode, copied data rows.
Typical fields (when data is available):
- Summary:
type(health_check,__summary__,__error__),mode,success,timestamp,message,error. - Child Actor run:
targetActorId,runId,status,defaultDatasetId,defaultKeyValueStoreId,itemCount. - Trigger processing:
sourceDatasetId,sourceRunId,outputDatasetId,processedItems. - Copied rows: original dataset fields plus
__sourceDatasetId,__sourceRunIdmetadata.
Example summary item (illustrative):
{"type": "__summary__","mode": "run_actor","success": true,"targetActorId": "YOUR_USERNAME/instagram-reels-scraper","runId": "abc123runId","status": "SUCCEEDED","defaultDatasetId": "xyz789datasetId","itemCount": 5,"timestamp": "2026-06-04T12:00:00.000Z"}
Example Laravel callback payload (sent to your webhook, not stored in dataset unless you log it):
{"service": "laravel-integration","status": "SUCCEEDED","phase": "completed","correlationId": "uuid-from-laravel","laravelQueue": "scrapers","mode": "run_actor","targetActorId": "YOUR_USERNAME/instagram-reels-scraper","runId": "childRunId","defaultDatasetId": "resultDatasetId","itemCount": 10,"apifyDatasetUrl": "https://api.apify.com/v2/datasets/.../items","timestamp": "2026-06-04T12:00:00.000Z"}
➡️ Output is structured for Laravel jobs, warehouses, or spreadsheet export via Apify.
Use Cases
- Laravel scraping APIs: expose
POST /api/scrape/...endpoints that start Apify runs and return run/dataset IDs. - Queued job pipelines: receive webhooks in Laravel, dispatch jobs to
laravelQueue, pull dataset items asynchronously. - Actor chaining: when a scraper finishes, automatically process or forward its default dataset to your app.
- Multi-tenant SaaS: pass
correlationIdper customer request and route callbacks to the correct tenant handler.
Integrations & API
- Run and fetch results through the Apify API
- Call from Laravel using
apify/apify-client(seeroutes/laravel_integration.example.php) - Connect Zapier, Make, Google Sheets, and other Apify integrations
- Webhooks and schedules for recurring automation
- Chain Actors via Integrations → Connect Actor with
isApifyIntegrationwebhooks
Laravel example (PHP)
Install the official client:
$composer require apify/apify-client
Call this Actor from Laravel:
use Apify\Client\ApifyClient;$client = new ApifyClient(['token' => env('APIFY_TOKEN')]);$run = $client->actor('YOUR_USERNAME/laravel-integration')->call(['mode' => 'run_actor','targetActorId' => 'YOUR_USERNAME/instagram-reels-scraper','targetActorInput' => ['usernames' => ['https://www.instagram.com/nasa/'],'resultsLimit' => 10,],'laravelWebhookUrl' => route('apify.webhook'),'laravelWebhookSecret' => env('APIFY_WEBHOOK_SECRET'),'correlationId' => (string) Str::uuid(),'waitForFinish' => false,]);
Webhook handler (verify signature):
public function handle(Request $request){$body = $request->getContent();$expected = hash_hmac('sha256', $body, env('APIFY_WEBHOOK_SECRET'));abort_unless(hash_equals($expected, $request->header('X-Apify-Signature', '')), 401);$payload = json_decode($body, true);// status: STARTED | PROCESSING | SUCCEEDED | FAILED | DATASET_READY}
Setting up Actor integration (webhook chain)
- Open your scraper Actor → Integrations → Connect Actor
- Select laravel-integration
- Event: Run succeeded
- Static input: Laravel webhook URL, queue, secrets
- Apify prefills dynamic fields from
{{resource.defaultDatasetId}}viapayload
See Integrating Actors via API.
Why Choose This Actor?
- Integration-ready — reads
payload.resource.defaultDatasetIdautomatically per Apify guidelines - Laravel-first callbacks — HMAC signatures, queue hints, correlation IDs
- Run any scraper — one stable integration Actor instead of custom glue per scraper
- Proxy + retries — production patterns reused from CloudBots scraper actors
- Built for Apify datasets, exports, API access, and Actor chaining
FAQ
How does Laravel Integration work?
Your Laravel app starts this Actor with static config and scraper parameters. The Actor calls child Apify Actors via Actor.call(), processes integration trigger datasets in batches, or forwards dataset metadata to your Laravel webhook. Progress and completion are reported via HTTPS POST callbacks.
Can I call scrapers directly from Laravel without this Actor?
Yes. This Actor adds standardized integration trigger handling, webhook callbacks, proxy merging, retries, and dataset batch processing in one reusable place.
Does the webhook include all scraped data?
No. By design, Apify integrations pass dataset IDs, not full dataset contents. Enable includeDatasetPreviewInCallback for a limited preview; otherwise pull items via the Apify API in your Laravel job.
What is the difference between static and dynamic input?
Static input (webhook URL, secrets, queue) stays the same across runs. Dynamic input (dataset ID, run ID) comes from the integration trigger payload field automatically when you connect this Actor on another Actor's Integrations tab.
Can I use this without Laravel?
Yes. Any HTTPS endpoint can receive callbacks; Laravel-specific fields (laravelQueue, laravelBaseUrl) are optional metadata.
What integration modes are available?
run_actor— start a child scraper withtargetActorId+targetActorInputprocess_trigger— copy rows from a trigger dataset into this run's datasetforward_dataset— POST dataset metadata to your Laravel webhook
Why did run_actor fail with "does not support running public Actors"?
Some Apify plans cannot call Store/public Actors like apify/hello-world. Options:
- Set
runHealthCheckOnStart: truefor a quick smoke test (no child Actor). - Keep
useDemoFallbackOnPublicActorError: true(default) — the Actor writes a demo result row instead of failing. - In production, set
targetActorIdto your own Actor (e.g.YOUR_USERNAME/instagram-reels-scraper).
What formats can I download?
JSON, CSV, and Excel from the Apify dataset UI, plus full access via the Apify API.
SEO Keywords
laravel apify integration
apify laravel webhook
laravel scraping api
apify actor integration
laravel automation apify
php apify client
web scraping laravel
apify integration actor
laravel queue webhook
apify dataset callback
Actor permissions
This Actor is intended to work with limited permissions: it reads your input, calls other Actors you specify, reads datasets by ID, and writes to its default dataset. It posts callbacks only to URLs you provide.
To set limited permissions in Apify Console:
- Open your Actor on the Apify platform.
- Go to Source or Settings.
- Open Review permissions / Permissions.
- Choose Limited permissions and save.
Limitations
- Child Actor runs consume your Apify platform credits and depend on the target Actor's reliability.
waitSecscaps how long this Actor waits for a child run; very long scrapes may needwaitForFinish: falseand webhook-based completion handling in Laravel.- Webhook delivery requires your Laravel endpoint to be reachable from Apify cloud.
- Dataset preview in callbacks is limited by
maxCallbackItems; large datasets should be fetched via the Apify API in Laravel. - This Actor orchestrates integration — it does not scrape websites directly unless configured to call a scraper Actor.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Get Started
Configure your Laravel webhook URL, set mode=run_actor with a target scraper, enable proxy if needed, and start your first run on Apify — or connect this Actor on another Actor's Integrations tab to chain scrapers automatically. 🚀
