Download the PHP package anakin/sdk without Composer
On this page you can find all versions of the php package anakin/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package sdk
anakin-php
Official PHP SDK for Anakin — web scraping, crawling, search, and Wire actions.
Status: alpha (v0.1.x). Public API may change between minor versions until v1.0.
Install
Requires PHP 8.1+ with ext-curl and ext-json.
Quickstart
The SDK polls long-running jobs internally — you get the final result back from a single synchronous method call. No job IDs to manage, no polling loops to write.
Method overview
| Method | Endpoint | Sync? |
|---|---|---|
$client->scrape($url, $opts = []) |
POST /url-scraper → poll |
async |
$client->map($url, $opts = []) |
POST /map → poll |
async |
$client->crawl($url, $opts = []) |
POST /crawl → poll |
async |
$client->search($query, $opts = []) |
POST /search |
sync |
$client->agenticSearch($prompt, $opts = []) |
POST /agentic-search → poll |
async |
$client->wire($actionId, $params = []) |
POST /holocron/task → poll |
async |
$client->sessions()->list/create/save/update/delete |
/browser-sessions/* |
various |
Anakin\Countries::supported() |
offline (bundled) | sync |
Configuration
You can also inject a pre-built Guzzle / PSR-18 client via 'http_client' => $myClient.
Errors
Every error thrown by the SDK is a typed subclass of Anakin\Exception\AnakinException:
The exception hierarchy:
| Class | When |
|---|---|
AuthenticationException |
401 — invalid or missing API key |
InsufficientCreditsException |
402 — out of credits ($balance, $required) |
InvalidRequestException |
400 — validation failure |
RateLimitException |
429 — after retry budget exhausted ($retryAfter) |
JobFailedException |
Polled job came back with status="failed" ($reason) |
JobTimeoutException |
Polling budget exhausted before terminal status |
ServerException |
5xx — after retries exhausted |
NetworkException |
DNS / connect / read-timeout |
AnakinException |
Base class; everything above extends it |
Develop
Related packages
@anakin-io/sdk— Node.js / TypeScript SDKanakin-sdk— Python SDKgithub.com/Anakin-Inc/anakin-go— Go SDKio.anakin:anakin-sdk— Java SDKanakin-sdk(rubygems) — Ruby SDKAnakin(NuGet) — .NET SDKanakin-sdk(crates.io) — Rust SDK@anakin-io/mcp— Model Context Protocol server for AI agents
License
Apache 2.0