Apify SDK monorepo
https://docs.apify.com/sdk/js โ// momentum
// why it's here
- Active: last commit today
// how to help
// readme
Apify SDK
apify is the official SDK for building Apify Actors in JavaScript and TypeScript. It handles the Actor lifecycle, storage access, platform events, proxy configuration, and more.
Quick Start
This short tutorial will set you up to start using Apify SDK in a minute or two. If you want to learn more, proceed to the Apify Platform guide that will take you step by step through running your Actor on Apifyโs platform.
Apify SDK requires Node.js 16 or later. Add Apify SDK to any Node.js project by running:
npm install apify
To initialize your Actor and to stop it use the Actor.init() and Actor.exit() functions. You also may use Actor.main() function for cases with multiple crawlers in one context.
import { Actor } from 'apify';
await Actor.init();
const input = await Actor.getInput();
await Actor.setValue('OUTPUT', {
message: 'Hello from Apify SDK!',
input,
});
await Actor.exit();