Apify SDK environment
What an Actor sees at runtime on Bytewells.
Bytewells is compatible with the official Apify SDK. Your existing Actors work without code changes.
Configuration
Set these environment variables to point the SDK to your server:
export APIFY_API_BASE_URL=https://bytewells.com/api/v2
export APIFY_TOKEN=your-api-tokenThat's it. Your Actor code works unchanged:
import { Actor } from 'apify';
await Actor.init();
// All SDK methods work with Bytewells
await Actor.pushData({ title: 'Example' });
const input = await Actor.getInput();
await Actor.setValue('OUTPUT', results);
await Actor.exit();Injected Environment Variables
When the runner starts an Actor container, it injects the full Apify SDK environment (see buildActorEnv in packages/runner/src/docker.ts):
| Variable | Value |
|---|---|
APIFY_ACTOR_ID | ID of the Actor being run |
APIFY_ACTOR_RUN_ID | ID of the current run |
APIFY_USER_ID | Owning user's ID (anonymous if unknown) |
APIFY_API_BASE_URL | URL of the Bytewells API |
APIFY_API_PUBLIC_BASE_URL | Same as APIFY_API_BASE_URL |
APIFY_TOKEN | Run-scoped token rt_<runId>.<signature> (see below) |
APIFY_DEFAULT_DATASET_ID | Default dataset for Actor.pushData() |
APIFY_DEFAULT_KEY_VALUE_STORE_ID | Default KV store for Actor.getInput() / Actor.setValue() |
APIFY_DEFAULT_REQUEST_QUEUE_ID | Default request queue |
APIFY_IS_AT_HOME | 1 |
APIFY_HEADLESS | 1 |
APIFY_MEMORY_MBYTES | Memory limit for this run |
APIFY_TIMEOUT_AT | ISO timestamp when the run times out |
APIFY_INPUT_KEY | INPUT |
APIFY_CONTAINER_PORT | 4321 |
APIFY_CONTAINER_URL | http://run-:runId:4321 |
CRAWLEE_STORAGE_DIR | /tmp/storage |
APIFY_PROXY_PASSWORD | Only set when a proxy password is configured |
APIFY_PROXY_HOSTNAME | Only set when configured |
APIFY_PROXY_PORT | Only set when configured |
When APIFY_PROXY_PASSWORD is not injected, the SDK falls back to resolving it via GET /v2/users/me (data.proxy.password).
Run-scoped APIFY_TOKEN
Actor code on Bytewells often belongs to someone other than the user running it, so the runner never injects the user's API key. APIFY_TOKEN is a token minted for this run only. It authenticates as the run's owner while the run is active (plus a 10-minute grace period) and only on the endpoints an Actor needs: datasets, key-value stores, request queues, its own run and log, GET /v2/users/me, and starting runs of Actors the owner is entitled to. Anything else returns 403. Actors that call the API with APIFY_TOKEN through the SDK or apify-client need no changes.
Supported Features
| Feature | Status |
|---|---|
Actor.init() / Actor.exit() | ✅ |
Actor.pushData() | ✅ |
Actor.getInput() | ✅ |
Actor.getValue() / Actor.setValue() | ✅ |
Actor.openDataset() | ✅ |
Actor.openKeyValueStore() | ✅ |
Actor.openRequestQueue() | ✅ |
| Request deduplication | ✅ |
| Distributed locking | ✅ |
| Webhooks (per-run + standalone CRUD) | ✅ |
| Schedules (cron-based Actor runs) | ✅ |
Apify proxy password resolution via GET /v2/users/me | ✅ |
| Binary key-value store payloads | ✅ |
| Presigned record URLs / dataset download streaming | ✅ |
Pointing an Actor at Bytewells
When you run an Actor on Bytewells, the platform sets APIFY_API_BASE_URL and APIFY_TOKEN for you. To exercise the same code from your laptop against the hosted API:
export APIFY_API_BASE_URL=https://bytewells.com/api/v2
export APIFY_TOKEN=<your Bytewells API key>
npm startPushing Actors
# Log in
bw login --url https://bytewells.com/api
# Push the Actor in the current directory (name from .actor/actor.json)
bw pushApify vs Bytewells
| Aspect | Apify | Bytewells |
|---|---|---|
| Renting Actors | Rental pricing retired on 2026-10-01 | Flat monthly rentals with free trials |
| Subscription | Paid plan required to rent | None; pay the rental plus compute |
| Developer cut | 80% | 90%* (100%* on customers you bring) |
| Compute | Plan-dependent price per CU | $0.15 per CU from prepaid credits |
| API and SDK | Apify v2 API | Same API; change the base URL |
| Runtime | Proprietary | Apify-compatible hosted runners |
*Before Stripe's card and billing fees, which are passed on to the developer at cost with no markup.