skillfed

apify-client

Apify API client for Python

apify-client v3.1.2 2.7M downloads/30d#2,918 on PyPI97
Permissive license Apache-2.0 Active released

What it is and what it does

apify-client is the official Python wrapper for the Apify platform's REST API. It provides both synchronous and asynchronous clients to orchestrate web scraping Actors, manage cloud storage (datasets, key-value stores, request queues), schedule recurring tasks, and configure webhooks—all from Python code. The library ships with Pydantic-validated typed responses, automatic exponential backoff retries, tiered timeout strategies, pagination and streaming helpers, and a pluggable HTTP layer (defaulting to impit but supporting httpx, requests, aiohttp, or custom implementations).

It's designed for developers who want to consume the Apify platform programmatically rather than build Actors themselves (for that, use the Apify SDK for Python instead). The client handles authentication via API token, compresses requests with gzip by default, offers structured error handling with ApifyApiError subclasses, and includes opt-in debug logging. Runtime dependencies are minimal: colorama, impit, more-itertools, and pydantic.

Use it for:

  • Trigger and monitor web scraping Actors from a Python application, then retrieve and process the results.
  • Build a data pipeline that orchestrates multiple Apify Actors in sequence, passing data between them via datasets.
  • Manage and query key-value stores and request queues programmatically to coordinate distributed scraping jobs.
  • Stream live logs from running Actor jobs in real time to monitor progress or debug failures.
  • Schedule recurring Apify tasks and manage webhooks to integrate Apify scraping into a larger automation workflow.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A Python client library for the Apify REST API that lets you run Actors, manage storage (datasets, key-value stores, request queues), schedule tasks, and configure webhooks from Python code.

Yes. The package is actively maintained, has no known vulnerabilities, requires only common dependencies, and is the official client for a widely-used platform. Install it if you need to orchestrate Apify Actors or manage Apify storage from Python; skip it if you only build Actors (use the Apify SDK instead) or don't use the Apify platform.

Install

apify-client on PyPI

pip

pip install apify-client

uv

uv add apify-client

poetry

poetry add apify-client

Installing apify-client

Before you install

Low friction install with a pure-Python wheel. Actively maintained with a release 4 days old and recent commits. Requires Python 3.11 or higher.

License in practice

Licensed under Apache-2.0 (permissive), allowing use in commercial and private projects with minimal restrictions.

Quickstart

pip install apify-client

from apify_client import ApifyClient

client = ApifyClient('YOUR-APIFY-TOKEN')
run = client.actor('apify/hello-world').call(run_input={'message': 'Hello'})
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

Requires Python 3.11 or higher. You must obtain an Apify API token from the Apify Console Integrations section.

Verify before relying

  • Whether the optional brotli extra dependency improves performance enough to justify installation for typical workloads.
  • Performance characteristics when streaming large datasets or handling high-volume pagination.
  • Specific retry and timeout defaults and how they compare to typical API client conventions.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.11)
Install friction low — pure-Python wheel
Runtime dependencies 4 — colorama, impit, more-itertools, pydantic
Maintenance actively maintained — 4 days since the last release
Last repo commit
First released
Downloads 2,726,378/month — #2,918 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: apify_client-3.1.2-py3-none-any.whl

Keywords: apify, api, client, automation, crawling, scraping

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Libraries

Tags

apify api client pythonrun apify actors programmaticallymanage apify datasets and storageapify automation platform clientweb scraping actor orchestrationapify rest api wrapperschedule apify tasks python
web-scrapingapi-clientautomation

More Libraries packages