@xcrawl/actor-sdk
v0.1.0
Published
TypeScript/Node.js port of the xcrawl Actor SDK reference implementation.
Readme
@xcrawl/actor-sdk
TypeScript/Node.js port of the reference xcrawl_actor Python SDK.
Minimal actor
import { Actor } from "@xcrawl/actor-sdk";
await Actor.main(async () => {
const input = (await Actor.getInput()) as { start_urls?: string[] } | null;
await Actor.pushData({ input });
});The SDK keeps both camelCase and snake_case aliases for the main helpers to make Python template migration straightforward.
Implemented areas:
- Actor runtime facade: input, dataset/KVS/request queue helpers, lifecycle helpers, logging, status messages, webhooks, charging, proxy helpers.
- API client: actor, run, task, webhook, dataset, key-value store, and request queue clients.
- Storage: local filesystem storage by default, cloud API storage when
XCRAWL_IS_AT_HOME=trueorforceCloudis used. - Proxy configuration and request-list helpers.
Runtime environment variables follow the reference SDK contract, including XCRAWL_RUN_ID, XCRAWL_RUN_TOKEN, XCRAWL_API_BASE_URL, XCRAWL_DEFAULT_DATASET_ID, XCRAWL_DEFAULT_KV_STORE_ID, XCRAWL_DEFAULT_REQUEST_QUEUE_ID, and XCRAWL_LOCAL_STORAGE_DIR.
