All notable changes to the Apify Go client are documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Lazy
Iteratehelpers on every list collection (Actors,Runs,Builds,Tasks,Datasets,KeyValueStores,RequestQueues,Schedules,Webhooks,WebhookDispatches, actor versions and env vars) plus dataset-item iteration (DatasetClient.IterateItemsand the genericIterateDatasetItems[T]), backed by a new exported generic iterator typeListIterator[T]. As in the reference client's iterablelist(), the options'Limitcaps the total number of items yielded across all pages (unset means all), and the per-page size is a separatechunkSizeargument (nil for the server default). - Cursor-based key iteration on the key-value store:
KeyValueStoreClient.IterateKeysreturns aKeyValueStoreKeysIteratorthat lazily walks all keys vianextExclusiveStartKey, matching the reference client's iterablelistKeys().Limitcaps the total keys yielded andchunkSizeis the page size.
- The
Iteratehelpers now honor a caller-setOffseton the list options as the starting point (iteration begins there and the cap counts from that offset), instead of silently discarding it. Matches the reference client'soptions.offsethandling.
- Bumped
APISpecVersiontov2-2026-07-10T105921Z. - Bumped
ClientVersionto0.6.0. - Breaking:
StoreCollectionClient.Iteratenow takes a secondchunkSize *int64argument and treats the options'Limitas a total-item cap rather than the per-page size, to match the reference client's iterator semantics.StoreActorIteratoris now an alias ofListIterator[ActorStoreListItem]. - Synced the
APISpecVersionreference in theREADME.md"Versioning" section to matchversion.go.
- Documented how the client-side
Call/WaitForFinishpolling relates toWithTimeout(each poll asks the server to wait ≤60s, so the per-request timeout never cuts off anilwait). - Added a pointer to where API tokens come from (Apify Console → Settings → Integrations).
- Added the
IterateDatasetItems[T]signature and a usage example to the storages guide. - Added
WithPublicBaseURLto theNewClientWithOptionssample and a note distinguishingclient.Build(id)fromActor.Build(...).
-
Breaking: Renamed the exported version constants
CLIENT_VERSION->ClientVersionandAPI_SPEC_VERSION->APISpecVersionto follow idiomatic Go naming (MixedCaps, not ALL_CAPS). -
Bumped
APISpecVersiontov2-2026-07-08T143931Z. -
Bumped
ClientVersionto0.5.0. -
Mapped the
User-AgentOS token to match Node'sos.platform()exactly:windows->win32,solaris/illumos->sunos,ios->darwin; all other platforms are unchanged.
- Request bodies of 1024 bytes or larger are now compressed before being sent, preferring Brotli
(
Content-Encoding: br) and falling back to gzip (Content-Encoding: gzip).
- Bumped
API_SPEC_VERSIONtov2-2026-07-07T132551Z. - Bumped
CLIENT_VERSIONto0.4.7. - Synced the
API_SPEC_VERSIONreference in theREADME.md"Versioning" section to matchversion.go.
- Corrected the
LastRunOptions.Origindoc comment:originis now a documented query parameter of theruns/lastendpoints in the OpenAPI spec (behavior unchanged; the client already sent it).
- Rewrote earlier
CHANGELOG.mdentries to satisfy the changelog requirements: condensed narrative prose into short change bullets and removed cross-client references to sibling implementations, references to requirement-tracking issues, and out-of-scope / not-implemented notes. - Bumped
CLIENT_VERSIONto0.4.6.
- Bumped
API_SPEC_VERSIONtov2-2026-07-02T131926Z. - Bumped
CLIENT_VERSIONto0.4.5. - Synced the
API_SPEC_VERSIONreference in theREADME.md"Versioning" section to matchversion.go.
- Bumped
API_SPEC_VERSIONtov2-2026-07-01T115402Z. - Bumped
CLIENT_VERSIONto0.4.4. - Synced the
API_SPEC_VERSIONreference in theREADME.md"Versioning" section to matchversion.go.
- Bumped
API_SPEC_VERSIONtov2-2026-06-30T091455Z. - Bumped
CLIENT_VERSIONto0.4.3. - Synced the
API_SPEC_VERSIONreference in theREADME.md"Versioning" section to matchversion.go.
docs/actors.md: document the nil-waitSecsbehaviour ofCall.
- Bumped
API_SPEC_VERSIONtov2-2026-06-29T142258Z(no in-scope API surface change). - Bumped
CLIENT_VERSIONto0.4.2. - Synced the
API_SPEC_VERSIONreference in theREADME.md"Versioning" section to matchversion.go.
- Documentation now states the client is official, but experimental and AI-generated/AI-maintained (
README.md,docs/README.md, and the package-level doc comment inclient.go). README.md"Releasing" section now documents that Go's publishing process has no central registry and therefore no "Trusted Publisher" mechanism — releases are cut by pushing a git tag read by the public Go module proxy, authenticated only by the built-inGITHUB_TOKEN.- Documentation completeness pass (no API change): added a field table for
*APIErrorand documentedAsAPIErrorinREADME.md; added aRunChargeOptionsfield table indocs/runs.md; enumerated the webhookCreateinput keys indocs/webhooks.md; documented the request-queue locking method signatures indocs/storages.md.
- Corrected a stale
API_SPEC_VERSIONreference in theREADME.md"Versioning" section (v2-2026-06-24T105326Z→v2-2026-06-25T142310Z). docs/storages.md:DownloadItemsnow listsJSONLin its format list.- Bumped
CLIENT_VERSIONto0.4.1.
ActorClient.LastRunWithOptionsandTaskClient.LastRunWithOptionsaccept aLastRunOptionswithStatusandOriginfilters, matching the reference client'slastRun({ status, origin }). The existingLastRun(status string)accessors delegate to the new methods (additive, non-breaking).
- Bumped
API_SPEC_VERSIONtov2-2026-06-25T142310Z. - Bumped
CLIENT_VERSIONto0.4.0(minor; additiveLastRunWithOptionsAPI).
- Cleaned up stale in-code comments around the
isAtHomeUser-Agent flag that quoted the older, capitalized requirement wording (no behaviour change).
ListRequestsOptions.Filter(forGET /v2/request-queues/{queueId}/requests) is now[]stringserialized comma-joined, matching the spec (an array of the enum valueslocked/pending,style=formexplode=false). Breaking change to that field's type. The allowed values are exported as theRequestFilterLocked/RequestFilterPendingconstants.- The
User-AgentisAtHomeflag is now based solely on theAPIFY_IS_AT_HOMEenvironment variable.
- Bumped
API_SPEC_VERSIONtov2-2026-06-24T105326Z. - Bumped
CLIENT_VERSIONto0.3.0(minor; breakingFiltertype change).
- Bumped
API_SPEC_VERSIONtov2-2026-06-23T113219Z. - Bumped
CLIENT_VERSIONto0.2.3.
- CI: a manually triggered (
workflow_dispatch)Publish Go clientworkflow (.github/workflows/go-publish.yml) that releases the module. Go is distributed by pushing a semver git tag, so the workflow runs the same gofmt/vet/lint/build/unit-test quality gate as CI, derives the tag from theCLIENT_VERSIONconstant inversion.go, refuses to proceed if that tag already exists, then creates and pushes thevX.Y.Ztag, opens a GitHub release, and pings the public Go module proxy. It uses only the built-inGITHUB_TOKENrepository secret and supports adry_runinput.
- Bumped
CLIENT_VERSIONto0.2.2. - Documentation: added a "Releasing" subsection to the README "Versioning" section describing the tag-based Go distribution mechanism and the publish workflow.
- Documentation: added the "experimental, AI-generated and AI-maintained" disclaimer to
README.mdanddocs/README.md, and softened the "official" wording accordingly.
- CI: a standalone
Test examplesstep in the Go integration workflow that runs the documentation example code end-to-end (theTestExample*smoke tests, each runninggo run ./examples/<name>) and validates that every in-documentationgosnippet is valid, runnable, and gofmt-formatted (the newTestDocSnippets*tests). TheIntegration testsstep now skips these so the two concerns stay separate. - Tests:
tests/docs_snippets_test.go, an offline doc-snippet harness that enforces that each in-documentation code snippet is valid, runnable, and properly formatted.
- Workflow now also triggers on
docs/**andREADME.mdchanges.
- Reformatted all
docs/and README code snippets to canonical gofmt output and made the custom-HTTP-transport snippet a complete, compilable program. - Corrected the README versioning note (
v2-2026-06-16T064758Z→v2-2026-06-18T095846Z).
- Documented the shared
ListOptionstype and theapify.ListDatasetItems[T]generic helper (with a runnable typed-decoding example) indocs/README.md/docs/storages.md. - Added field listings for the response models (
ActorRun,Build,User,ActorStoreListItem,Actor,Task,Schedule,Webhook,WebhookDispatch) acrossdocs/runs.md,docs/builds.md,docs/misc.md, and their resource pages. - Added field tables in
docs/storages.mdfor the storage option/parameter structs (DatasetListItemsOptions,DatasetDownloadOptions,ListKeysOptions,GetRecordOptions,GetRecordsOptions,ListRequestsOptions,RequestQueueRequest) and the storage return types (KeyValueStoreRecord,KeyValueStoreKeysPage,RequestQueueHead,RequestQueueOperationInfo,BatchAddResult). - Expanded the run/Actor/store input option structs (
ActorStartOptions,ActorBuildOptions,ActorListOptions,StoreListOptions,RunResurrectOptions,MetamorphOptions,LogOptions) into full field/type/meaning tables, and stated the closed enum sets definitively (RunListOptions.Status,ListRequestsOptions.Filter,DatasetListItemsOptions.View,StorageListOptions,StoreListOptions.PricingModel/ResponseFormat,ActorStartOptions.ForcePermissionLevel,ActorListOptions.SortBy, the 8-valueActorJobStatus, the versionsourceType/formatenums, and the 12-valueWebhookEventType). - Documented the schedule
actionspayload shape with a runnableRUN_ACTORaction example indocs/schedules.md.
ActorClient.ValidateInputForBuild(ctx, input, build)exposes the optionalbuildquery parameter onPOST /v2/actors/{actorId}/validate-input.ValidateInputdelegates with an empty build.UserClient.MonthlyUsageForDate(ctx, date)exposes the optionaldatequery parameter onGET /v2/users/me/usage/monthly.MonthlyUsagedelegates with an empty date.
- Bumped
API_SPEC_VERSIONtov2-2026-06-18T095846Z.
Initial release of the official Go client for the Apify API, verified against OpenAPI
specification version v2-2026-06-16T064758Z.
- Resource-oriented
ApifyClientmirroring the JavaScript reference client, with accessors for Actors, Actor versions and environment variables, builds, runs, datasets, key-value stores, request queues, tasks, schedules, webhooks, webhook dispatches, the Apify Store, users, and logs. - Replaceable HTTP transport via the
HTTPBackendinterface (defaultDefaultHTTPBackend), configurable throughWithHTTPBackend. - Cross-cutting request behaviour applied to every call: bearer-token authentication, the mandated
User-Agentheader, exponential-backoff-with-jitter retries (429, 5xx and network errors), and a growing-but-capped per-attempt timeout. - Convenience helpers matching the reference client:
Actor.Call/Task.Call,Build.WaitForFinish/Run.WaitForFinish,Actor.DefaultBuild,Actor.ValidateInput,Run.Metamorph/Reboot/Resurrect/Charge, run-nested default storages (Run.Dataset/KeyValueStore/RequestQueue/Log), lazyStore.IterateandRequestQueue.PaginateRequestsiterators, datasetDownloadItems/GetStatistics/CreateItemsPublicURL, key-value-storeGetRecords(ZIP), record and key-list public URLs with HMAC-SHA256 signing, the request-queue lock lifecycle, andApifyClient.SetStatusMessage. - Public version constants
CLIENT_VERSIONandAPI_SPEC_VERSION. - Forward-compatible models that capture unmodelled API fields in an
Extramap. - Offline unit tests (mock HTTP backend) covering retries, error parsing, 404→absent mapping, the User-Agent format, base-URL resolution, and the storage-signature scheme.
- Integration test suite (one simple GET plus one CRUD flow per resource) and runnable, CI-tested documentation examples.
- A language-specific GitHub Actions workflow that runs gofmt, go vet, build, unit tests and integration tests, triggered by PRs to master touching Go code or manual dispatch. CI also runs
golangci-lint(errcheck, govet, ineffassign, staticcheck, unused, misspell), configured in.golangci.yml.
RunClient.Chargenow always sends anidempotency-keyheader (auto-generated when not supplied), so a transport-retried charge is applied at most once — matching the reference client and preventing double-charging.KeyValueStoreClient.GetRecordnow defaultsattachmentto the truthy form, matching the reference client's record-fetch behaviour (serialised on the wire asattachment=1).WaitForFinish(used byRun.WaitForFinish,Build.WaitForFinish,Actor.Call,Task.Call) no longer hangs forever on a transient404during an indefinite wait (waitSecs == nil); it polls through404s on a pure time bound and returns a descriptive error if the resource never becomes available within the budget.
RunClient.Chargenow takes aRunChargeOptions{EventName, Count, IdempotencyKey}struct.RunClient.Metamorphnow takes aMetamorphOptions{Build, ContentType}struct.RunResurrectOptionsgainedMaxItems,MaxTotalChargeUsd,RestartOnError.RunClient.GetWithWaitandBuildClient.GetWithWaitexpose the spec'swaitForFinishquery parameter for a server-side synchronous fetch.RunCollectionClient.ListStatusfilter accepts multiple statuses ([]string, comma-separated).RequestQueueClient.BatchAddRequestsauto-chunks inputs at the API's 25-per-call limit and returns a typedBatchAddResult{ProcessedRequests, UnprocessedRequests}.RequestQueueClient.ListRequestsvalidates its options (mutually-exclusiveExclusiveStartID/Cursor;Filterrestricted tolocked/pending).- Tasks use a dedicated
TaskStartOptionsthat omits the Actor-onlycontentTypeandforcePermissionLevelfields (which the task run endpoint does not accept). LogClientexposes the spec'sraw/downloadoptions viaGetWithOptions/StreamWithOptions, andRunClient.GetStreamedLogprovides a raw live-stream convenience.RunClient.Abortnow takesgracefully *boolinstead ofbool(nilomits thegracefullyquery parameter).