Skip to main content
use-apify.com

SDK: guides & tutorials

Apify SDKs in Python or JavaScript start actors, stream datasets, and fit CI. Build locally, then deploy the same scraper code to managed Apify cloud runs.

2 articles

View all tags

The Apify SDK lets you start actors, stream datasets, and manage storage from Python or JavaScript, fitting cleanly into CI and local development. These guides cover the core SDK workflows for building and running scrapers in code.

Build a scraper locally with the SDK, then deploy the exact same code as a managed cloud actor without changes. Below you will find Python and JavaScript tutorials plus patterns for inputs, datasets, and scheduling.

Related topics

Guides on this site

Frequently asked questions

Frequently Asked Questions

The Apify SDK (JavaScript and Python) is a client library and runtime framework for building Apify actors. It provides crawler classes, request queue management, key-value store access, dataset writes, proxy integration, and lifecycle hooks. It abstracts Apify platform specifics so actor code focuses on scraping and processing logic.

Install @apify/actor or apify Python package, implement a main function that reads Actor.getInput(), runs your crawler, and writes to Actor.openDataset(). Use Actor.openRequestQueue() for URL management. The SDK handles environment detection—it runs locally with file-based storage and on Apify Cloud with platform storage transparently.

Datasets for append-only record storage, Key-Value Stores for arbitrary binary or JSON blobs, and Request Queues for crawler frontier management. All are accessible via SDK methods and exposed through the Apify platform API, enabling cross-actor data sharing and downstream processing by other actors or webhooks.

Yes, the JavaScript SDK ships full TypeScript types. Use Actor.getInput<MyInputSchema>() with a defined interface for type-safe input reading. Dataset push methods are also generic. This end-to-end typing catches mismatches between input schema JSON and actor handler code at compile time rather than in production.