Download the PHP package crawlora/sdk without Composer
On this page you can find all versions of the php package crawlora/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package sdk
Short Description PHP client for the Crawlora web-scraping API: grouped helpers and a dynamic call interface for every public endpoint, with retries, pagination, and middleware hooks.
License MIT
Homepage https://crawlora.net/?utm_source=packagist&utm_medium=referral&utm_campaign=crawlora-php-sdk
Informations about the package sdk
Crawlora PHP SDK
PHP client for the public Crawlora web-scraping API. It wraps every public endpoint with grouped helpers and a dynamic call interface, plus retries, pagination, middleware hooks, and client-side rate limiting.
- Base URL:
https://api.crawlora.net/api/v1 - Auth: API key (
x-api-key) or JWT (Authorization) - PHP: 8.1+ (uses the
curlandjsonextensions; no runtime dependencies) - Operation reference:
docs/recipes.md
Install
Published on Packagist. Install the stable release:
Quick start
Calling operations
Grouped helpers map directly to the API ($client-><group>-><method>(...)):
The first argument is the params array; an optional second argument carries
per-call options (response_type, timeout, headers, retries,
retry_predicate):
Or call any operation dynamically by its id — handy for metaprogramming:
Authentication
Pass apiKey (sent as x-api-key) or jwtToken (sent as
Authorization: Token <jwt>, unless the value already starts with Token or
Bearer). CRAWLORA_API_KEY and CRAWLORA_BASE_URL are read from the
environment as fallbacks.
Retries
By default network failures and 408/409/425/429/5xx are retried with
exponential backoff and jitter, honoring Retry-After. Override the retryable
set with retryStatuses or a retryPredicate.
Pagination
Response modes
response_type may be auto (default; JSON when the content type is JSON, else
text), json, text, or stream (returns a readable PHP stream resource).
Middleware hooks
requestId => true adds an x-request-id header; idempotencyKeys => true
adds an Idempotency-Key on POST/PATCH.
Rate limiting
rateLimit spaces requests to at most N requests/second. Because PHP requests
are synchronous, maxConcurrency is accepted for API parity but is a no-op
(only one request is in flight at a time).
Custom transport
Inject any callable function (array $request): array returning
['status' => int, 'headers' => array, 'body' => string] — useful for tests or
a different HTTP stack:
Errors
All errors extend Crawlora\Exception\CrawloraError (carries status,
apiCode, body, rawBody, headers, requestId):
ClientError— 4xxServerError— 5xxNetworkError— transport failures and timeouts
License
MIT
All versions of sdk with dependencies
ext-curl Version *
ext-json Version *