--- id: apify version: "4.0.1" license: Apache-2.0 license_treatment: permissive maintenance: active --- # apify — Apify SDK for Python License: permissive · Maintenance: active · Downloads: 273.1K/mo ## What it is and what it does Apify SDK is the official Python framework for building Actors—serverless programs that run on the Apify platform or locally. It wraps your code in an async context manager that handles initialization, teardown, error recovery, and platform lifecycle events automatically. The SDK provides built-in access to storage (datasets, key-value stores, request queues), proxy routing, platform events, and the full Apify API through a preconfigured client. You write a simple async function inside `async with Actor:`, and the SDK handles everything else: reading validated input, writing results to storage, reacting to platform signals, and managing Actor execution state. It works with any Python library you already use—web scrapers like Crawlee or Scrapy, browser automation tools like Playwright, AI frameworks, or custom code. The SDK is designed to let you focus on your business logic while Apify handles deployment, scaling, monitoring, and pay-per-event billing. Use it for: - Build and deploy web scrapers and crawlers that run on the Apify platform with automatic scaling and monitoring. - Create browser automation workflows using Playwright or Selenium, packaged as serverless Actors for cloud execution. - Host AI agents or LLM-powered applications as Actors, with templates for LangGraph, CrewAI, and PydanticAI. - Run web servers or HTTP APIs inside Actors to expose scrapers or other services as live endpoints. - Deploy MCP (Model Context Protocol) servers as Actors to make tools available to any MCP client. - Automate repetitive tasks with scheduled Actor runs, webhooks, and inter-Actor communication. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Apify SDK for Python is the official framework for building and running Apify Actors—serverless programs that handle web scraping, browser automation, AI agents, and other cloud-deployed tasks with built-in lifecycle management, storage access, and platform integration. Yes. The SDK is actively maintained, has no known vulnerabilities, uses a permissive license, and requires only Python 3.11+. Install it if you plan to build Actors on the Apify platform or want a framework that bundles serverless lifecycle management, storage, and proxy handling. Skip it if you only need to consume the Apify API from existing code—use apify-client instead, which comes bundled with this SDK. ## Install pip install apify uv add apify poetry add apify ## Installing apify Before you install: Low install friction with a pure-wheel distribution. Actively maintained with a release 7 days ago and a commit history through 2026-08-14. Requires Python 3.11 or higher, which aligns with current language support. License in practice: Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions—suitable for both open-source and proprietary projects. Quickstart: pip install apify from apify import Actor async def main() -> None: async with Actor: actor_input = await Actor.get_input() Actor.log.info('Actor input: %s', actor_input) await Actor.set_value('OUTPUT', 'Hello, world!') Requires Python 3.11 or higher. Async context manager pattern is mandatory for Actor lifecycle management. Verify before relying: - Whether the 11 runtime dependencies (apify-client, crawlee, pydantic, cryptography, websockets, etc.) are all required for basic usage or if some are optional. - Performance characteristics and scaling limits when running locally versus on the Apify platform. - Detailed compatibility matrix with popular scraping libraries (Scrapy, Crawlee, Playwright, Selenium) mentioned in the description. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 273.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags apify actor sdk python, serverless web scraping framework, python actor platform, cloud automation sdk, distributed task runner python, web crawler deployment platform, async actor lifecycle management, serverless-automation, web-scraping, actor-framework [View on SkillFed](https://skillfed.io/packages/apify) · [View on PyPI](https://pypi.org/project/apify/)