Download the PHP package rkdhatterwal/decodo-scraper without Composer

On this page you can find all versions of the php package rkdhatterwal/decodo-scraper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package decodo-scraper

Decodo Scraper for Laravel

A clean, well-tested Laravel wrapper for the Decodo Web Scraping API — supports both real-time (v2) and async/batch (v3) scraping.


Requirements

Installation

Publish the config and migrations:

Add credentials to .env:

Your token is in the Decodo dashboard under Scraping APIs → Username / Token.


Real-time Scraping (v2)

Use the Decodo facade or inject DecodoClient.

Full control with PayloadBuilder


Database Tracking

When database.enabled is true (default), the package automatically tracks every async task and batch in your database using the decodo_tasks and decodo_batches tables.

Models

You can associate a task with one of your own models (e.g., a Product or Lead) by passing it to queueTask:


Async Scraping (v3)

Use the DecodoAsync facade or inject AsyncDecodoClient.

Queue a single task

Queue with PayloadBuilder

You can also use the PayloadBuilder with async tasks for a more fluent experience:

Queue a batch

Decodo enforces a 1-request-per-second rate limit on batch submissions. The package handles this for you automatically.

Check status & retrieve results

v3 Batch Format

Decodo v3 supports passing an array of URLs in a single request. The package handles this via queueBatch or by passing URLs to buildBatch() in the PayloadBuilder:


Webhooks

The package includes a built-in webhook handler that automatically updates your local database records when Decodo tasks complete.

Setup

  1. Ensure webhook.enabled is true in your config.
  2. Configure a DECODO_WEBHOOK_SECRET in your .env to enable passthrough verification.
  3. Exempt the webhook path from CSRF protection in app/Http/Middleware/VerifyCsrfToken.php (Laravel 10) or your bootstrap/app.php (Laravel 11+):

Security

The built-in webhook handler uses the VerifyDecodoWebhook middleware to ensure callbacks are authentic. It compares the passthrough value from the request against your configured secret using hash_equals.

Automatic Injection

When webhook.auto_inject_callback is enabled, the package will automatically append the correct callback_url to every async request. You don't need to pass it manually unless you want to override it.


Result Caching

To avoid redundant API calls and save credits, enable the DecodoResultCache. It caches results for "done" tasks (which are immutable) for up to 23 hours.


Logging

The package includes a DecodoLogger that routes all package-specific activities to a Laravel log channel. By default, it uses your application's default channel.

To isolate Decodo logs, set the channel in config/decodo.php:

And add the channel to your config/logging.php:


Events

You can listen for the following events to trigger your own logic:


Artisan Commands

Pruning Configuration

Configure retention periods in config/decodo.php:


DTOs & Public Properties

All DTOs in this package use PHP 8.1+ public readonly properties for a better developer experience. You can access properties directly: echo $result->content;.

ScrapeResult DTO

Property Type Description
content string Raw HTML, Markdown, or parsed JSON
statusCode int HTTP status of the upstream page
url string The URL that was scraped
taskId string Decodo task ID
createdAt string Task creation timestamp
updatedAt string Task completion timestamp

TaskResponse DTO

Returned by queueTask() and getTaskStatus().

Property Type Description
id string Decodo task ID
status string pending, done, or faulted
url string Target URL
target ?string Scraper template target
geo ?string Geographical location
domain string TLD used
deviceType string desktop, mobile, or tablet
httpMethod string get or post
createdAt string Creation timestamp
updatedAt string Last update timestamp

BatchTaskResponse DTO

Returned by queueBatch().


All Payload Parameters

See the Decodo parameters docs.

Method on PayloadBuilder API Parameter Default
->url($url) url required
->query($q) query
->target($t) target null
->proxyPool('standard') proxy_pool premium
->headless('html'/'png') headless null
->geo('United States') geo auto
->domain('co.uk') domain com
->locale('en-GB') locale matched
->headers([...]) headers null
->forceHeaders() force_headers false
->cookies([...]) cookies null
->forceCookies() force_cookies false
->deviceType('mobile') device_type desktop
->parse() parse false
->sessionId('1234') session_id null
->httpMethod('post') http_method get
->payload($body) payload (base64) null
->successfulStatusCodes([]) successful_status_codes null
->markdown() markdown false
->xhr() xhr false
->callbackUrl($url) callback_url null
->passthrough($val) passthrough null

Testing

The package provides a powerful DecodoFake helper to mock API responses and assert that requests were sent.

For async tasks:

For batches:

Other Assertions & Helpers


Changelog

See CHANGELOG.md.

License

MIT


All versions of decodo-scraper with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/http Version ^10.0|^11.0|^12.0|^13.0
illuminate/database Version ^10.0|^11.0|^12.0|^13.0
illuminate/routing Version ^10.0|^11.0|^12.0|^13.0
illuminate/events Version ^10.0|^11.0|^12.0|^13.0
illuminate/cache Version ^10.0|^11.0|^12.0|^13.0
illuminate/console Version ^10.0|^11.0|^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rkdhatterwal/decodo-scraper contains the following files

Loading the files please wait ...