Dexi API Client for PHP 5.3+

1.2.1 2022-08-24 08:48 UTC

This package is auto-updated.

Last update: 2023-09-24 10:58:38 UTC



Dexi API Client for PHP 5.3+


dexi-php-client is available via composer/packagist as dexi-api-client. Install it by adding it to your composer.json file:

"dexiio/dexi-api-client": "~1.1"


composer require dexiio/dexi-api-client


The following example executes a run and retrieves information for the execution:


// Load using the composer autoloader to handle our PSR-4 namespacing
require __DIR__ . '/vendor/autoload.php';

define('CS_API_KEY', 'Your secret API Key'); // See
define('CS_ACCOUNT_ID', 'Your account ID');
$someRunId = '59f3822f-6abc-4a01-81dc-5002a31f2dbc'; // Edit your runs inside the app to get their ID

\Dexi\Dexi::init(CS_API_KEY, CS_ACCOUNT_ID);

$newExecution = \Dexi\Dexi::runs()->execute($someRunId);



See the API documentation for details on all namespaces, methods and models. The global API object must be initialized in order to be used:

\Dexi\Dexi::init(<your api key>, <your account id>);

The following API namespaces are contained in the global Dexi\Dexi class:

\Dexi\Dexi::executions() \Dexi\Dexi::runs() \Dexi\Dexi::robots() \Dexi\Dexi::dataSets()

These namespaces contain the methods displayed in the API documentation. Models are defined in the \Dexi\DTO\ namespace.

Migrating from cloudscrape-client-php

Github: cloudscrape/cloudscrape-client-php is now dexiio/dexi-php-client

Packagist: cloudscrape/cloudscrape-api-client is now dexiio/dexi-api-client

If you are currently using cloudscrape-client-php, we strongly suggest you upgrade to this library as cloudscrape-client-php has been deprecated and will no longer be developed, and may not be supported in the future. Most method signatures have changed and we have added PSR-4 namespacing and rebranding to the Dexi name, as well as moving to support PHP7. New classes and methods have also been added.

Old class New class
CloudScrape \Dexi\Dexi
CloudScrapeClient \Dexi\Client
CloudScrapeExecutions \Dexi\Executions
CloudScrapeRuns \Dexi\Runs
CloudScrapeRunDTO \Dexi\DTO\RunDTO
CloudScrapeResultDTO \Dexi\DTO\ResultDTO
CloudScrapeFileDTO \Dexi\DTO\FileDTO
CloudScrapeExecutionDTO \Dexi\DTO\ExecutionDTO
CloudScrapeExecutionListDTO \Dexi\DTO\ExecutionListDTO
CloudScrapeRequestException \Dexi\Exception\RequestException


PHPUnit integration tests are provided in the test/Dexi folder. In order to run them, a configuration.ini file must be created in the top-level folder with the following settings:

apiKey=<a valid api key>
accountId=<your account id>

# Optional fields
categoryId=<if set, will store created resources in this folder>
dataSetId=<if set, provides data set tests using this data set>


Please submit bug reports, suggestions and pull requests to through Github.

We are more than happy to examine any pull-requests and appreciate any ideas, comments or suggestions you may have.


The library is available as open source under the terms of the MIT License.