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.HTTPClient and ApifyClient.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 the APIFY_TOKEN environment variable: pass it explicitly (token: System.fetch_env!("APIFY_TOKEN")). Without a token, requests are sent unauthenticated.
  • Responses are structs from ApifyClient.Schemas with snake_case fields (run.default_dataset_id instead of run["defaultDatasetId"]), timestamps as DateTime, and the {"data": ...} envelope removed.
  • Query options are snake_case and sent under the API's camelCase names (max_items: 10 becomes maxItems=10; the old client sent them in snake_case).
  • Calls without a response body (deletes, HEAD) return :ok.
  • ApifyClient.Error is now an exception; details has :status_code, :error_type (the API's error type) and :body.
  • Telemetry :resource for 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.JSON behaviour and defaults to Elixir's built-in JSON (ApifyClient.JSON.Native). Structs that only implement Jason.Encoder need JSON.Encoder, or set config :apify_client, :json_library, ApifyClient.JSON.Jason.
  • Actor IDs in username/actor-name form are sent as username~actor-name, as the API documents (ApifyClient.Actors.safe_id/1).

Added

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 mox test dependency.
  • Removed the unused nimble_options dependency and the bypass and reqord test dependencies.

Fixed

  • Network errors are returned as {:error, %ApifyClient.Error{}} instead of raising.
  • Error responses whose error is 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