All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
1.0.0 - 2026-12-03
Breaking
The client is rebuilt on code generated from Apify's OpenAPI description. The old resource API is gone; see the README for the new one.
- Removed
ApifyClient.new, the%ApifyClient{}struct,ApifyClient.Resources.*,ApifyClient.Base.*,ApifyClient.HTTPClientandApifyClient.Pagination. Calls take their settings as options (config: %ApifyClient.Config{},token:, ...). Connection settings are not read from the application environment, and the token is no longer read from theAPIFY_TOKENenvironment variable: pass it explicitly (token: System.fetch_env!("APIFY_TOKEN")). Without a token, requests are sent unauthenticated. - Responses are structs from
ApifyClient.Schemaswith snake_case fields (run.default_dataset_idinstead ofrun["defaultDatasetId"]), timestamps asDateTime, and the{"data": ...}envelope removed. - Query options are snake_case and sent under the API's camelCase names
(
max_items: 10becomesmaxItems=10; the old client sent them in snake_case). - Calls without a response body (deletes,
HEAD) return:ok. ApifyClient.Erroris now an exception;detailshas:status_code,:error_type(the API's error type) and:body.- Telemetry
:resourcefor Actor endpoints is"actors"(the client now uses/v2/actors/...instead of the deprecated/v2/acts/...). - Require Elixir 1.18+ (CI covers 1.18/OTP 27 through 1.20/OTP 29).
- Require Req
~> 0.7. - Jason is no longer a direct dependency (Req still pulls it in transitively). JSON goes
through the new
ApifyClient.JSONbehaviour and defaults to Elixir's built-inJSON(ApifyClient.JSON.Native). Structs that only implementJason.EncoderneedJSON.Encoder, or setconfig :apify_client, :json_library, ApifyClient.JSON.Jason. - Actor IDs in
username/actor-nameform are sent asusername~actor-name, as the API documents (ApifyClient.Actors.safe_id/1).
Added
ApifyClient.API.*: every operation of the Apify API (226), generated from its OpenAPI description, with the schemas as structs inApifyClient.Schemas.ApifyClient.Actors,ApifyClient.Tasks,ApifyClient.Runs,ApifyClient.Builds,ApifyClient.Datasets,ApifyClient.KeyValueStoresandApifyClient.Logsfor common tasks: start an Actor or task and wait for it, build an Actor and wait for the build, stream dataset items and store keys page by page, read and write records, follow logs.ApifyClient.Pagination.stream/2streams every item of any paginated list endpoint.- Retries for rate limits, server errors and network errors, with randomized
exponential backoff.
max_retriesandmin_delay_between_retries_mswere accepted before but never used. ApifyClient.JSONbehaviour withApifyClient.JSON.NativeandApifyClient.JSON.Jasonadapters, configurable globally (config :apify_client, :json_library, ...) or per call (json_library: ...).
Changed
- The User-Agent reports the actual library version instead of a hardcoded
0.1.0. - Dev shell targets Elixir 1.20 / OTP 29.
- Removed the unused
moxtest dependency. - Removed the unused
nimble_optionsdependency and thebypassandreqordtest dependencies.
Fixed
- Network errors are returned as
{:error, %ApifyClient.Error{}}instead of raising. - Error responses whose
erroris a plain string no longer crash.
0.2.0 - 2026-07-23
Added
- extended telemetry with spans
0.1.0 - 2025-10-05
Added
- Initial release of the Apify Client for Elixir
- Complete actor management (get, call, start, build, versions)
- Dataset operations (list items, stream items, download)
- Key-value store operations (get/set records, list keys)
- Request queue management (add/get/update/delete requests)
- Run monitoring and management (wait for finish, get status, abort)
- Build management and monitoring
- User account information and usage statistics
- Schedule management (CRON-based automation)
- Webhook management (event handling and testing)
- Apify Store browsing and search
- Comprehensive pagination utilities with streaming support
- Automatic retry logic with exponential backoff
- Structured error handling with 12+ specific error types
- Configuration management with environment variable support
- HTTP client based on Req library
- Memory-efficient streaming for large datasets
- Complete API coverage matching JavaScript client
- Elixir-specific enhancements:
{:ok, result} | {:error, error}tuple patterns- Stream processing for large data
- Automatic pagination streaming
- Rich typespec definitions
- Comprehensive documentation with examples
Features
- Actors: Run, manage, and monitor Apify actors
- Datasets: Efficiently process large datasets with streaming
- Key-Value Stores: Store and retrieve arbitrary data
- Request Queues: Manage crawling queues
- Schedules: Automate actor runs with CRON expressions
- Webhooks: Handle real-time notifications
- User Management: Access account info and usage statistics
- Store Integration: Browse and search Apify Store
- Streaming: Memory-efficient processing of large datasets
- Pagination: Automatic handling of paginated responses
- Error Handling: Comprehensive error types and messages
- Retry Logic: Automatic retries with exponential backoff
Technical Details
- Requires Elixir 1.17+
- Uses Req for HTTP requests
- JSON processing with Jason
- Configuration validation with NimbleOptions
- Comprehensive test coverage
- Complete ExDoc documentation
- Dialyzer type checking support