Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 0.14.1

- Synced with Apify OpenAPI spec `v2-2026-11-10T140017Z`, which only changes descriptions.
- Documented that `RunClient::charge()` is called from the Actor run with the `APIFY_TOKEN` of the run, and how to charge a multi-tenant Server Actor request.
- Documented that Apify Console shows an API token only once.

## 0.14.0

- Synced with Apify OpenAPI spec `v2-2026-11-09T143926Z`: `zstd` is a documented `Content-Encoding`.
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ echo 'Item count: ' . $items->getCount() . PHP_EOL;
```

The client does not read `APIFY_TOKEN`. Pass it yourself, for example `new ApifyClient(getenv('APIFY_TOKEN'))`.
You can find your token in [Apify Console → Settings → API & Integrations](https://console.apify.com/settings/integrations).
You can create a token in [Apify Console → Settings → API & Integrations](https://console.apify.com/settings/integrations).
Apify Console shows a token only once, right after you create or rotate it, so store it somewhere safe.

## Configuration

Expand Down
2 changes: 1 addition & 1 deletion docs/runs.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ An Actor's or task's runs are available at `$client->actor($id)->runs()` / `$cli
- `metamorph(string $targetActorId, mixed $input = null, ?MetamorphOptions $options = null): ActorRun`: `$input` is as for `ActorClient::start()`.
- `reboot(): ActorRun`
- `resurrect(?RunResurrectOptions $options = null): ActorRun`
- `charge(RunChargeOptions $options): void`: for pay-per-event Actors.
- `charge(RunChargeOptions $options): void`: for pay-per-event Actors. Call it from the Actor run itself, with the token the run received in `APIFY_TOKEN`. For a multi-tenant Server Actor, set `requestId` to the request's `X-Actor-Request-ID` header value.
- `waitForFinish(?int $waitSecs = null, int|float|string|null $timeoutSecs = null): ActorRun`: `$timeoutSecs` is the timeout of each poll request (default `'noTimeout'`).
- `dataset(): DatasetClient`, `keyValueStore(): KeyValueStoreClient`, `requestQueue(): RequestQueueClient`: a 404 from `get()` or `delete()` is thrown, since the client cannot tell a missing run from a missing storage.
- `iterateDatasetItems(?RunIterateDatasetItemsOptions $options = null, int|float|string|null $timeoutSecs = null): Generator`: lazily yields the items of the default dataset while the run is producing them, and returns when the run has finished and the dataset is drained. `$timeoutSecs` is the timeout of each request, polls included (default: the `long` tier). See [below](#reading-a-dataset-while-the-run-is-running).
Expand Down
5 changes: 4 additions & 1 deletion src/Resource/RunClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@ public function resurrect(?RunResurrectOptions $options = null, int|float|string
/**
* Charges for events of a pay-per-event Actor run.
*
* The request always carries an idempotency key, so a retried charge is applied once.
* Call it from the Actor run itself, with a client that uses the token the run received in its
* {@code APIFY_TOKEN} environment variable. The request always carries an idempotency key, so a retried
* charge is applied once. To charge a request to a multi-tenant Server Actor, set
* {@see RunChargeOptions::$requestId} to the request's {@code X-Actor-Request-ID} header value.
*/
public function charge(RunChargeOptions $options, int|float|string|null $timeoutSecs = null): void
{
Expand Down
4 changes: 2 additions & 2 deletions src/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ final class Version
* The semantic version of this client library (see https://semver.org/).
* Changes to the public interface other than additive ones are considered breaking changes.
*/
public const CLIENT_VERSION = '0.14.0';
public const CLIENT_VERSION = '0.14.1';

/**
* The version of the Apify OpenAPI specification this client was generated and verified
* against. Corresponds to the {@code info.version} field of the Apify OpenAPI document.
*/
public const API_SPEC_VERSION = 'v2-2026-11-09T143926Z';
public const API_SPEC_VERSION = 'v2-2026-11-10T140017Z';

private function __construct()
{
Expand Down
Loading