https://github.com/apify/apify-sdk-js
Apify SDK monorepo
https://github.com/apify/apify-sdk-js
actor apify javascript nodejs sdk typescript
Last synced: about 2 months ago
JSON representation
Apify SDK monorepo
- Host: GitHub
- URL: https://github.com/apify/apify-sdk-js
- Owner: apify
- License: apache-2.0
- Created: 2022-04-22T10:40:07.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2025-05-14T04:35:11.000Z (11 months ago)
- Last Synced: 2025-05-14T06:06:09.259Z (11 months ago)
- Topics: actor, apify, javascript, nodejs, sdk, typescript
- Language: TypeScript
- Homepage: https://docs.apify.com/sdk/js
- Size: 312 MB
- Stars: 138
- Watchers: 10
- Forks: 46
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Apify SDK
[](https://www.npmjs.com/package/apify)
[](https://www.npmjs.com/package/apify)
[](https://discord.gg/jyEM2PRvMU)
[](https://github.com/apify/apify-sdk-js/actions/workflows/test-and-release.yaml)
## 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](https://docs.apify.com/sdk/js/docs/guides/apify-platform)
guide that will take you step by step through running your Actor on Apify's platform.
Apify SDK requires [Node.js](https://nodejs.org/en/) 16 or later. Add Apify SDK to any Node.js project by running:
```bash
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.
```typescript
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();
```
> You can also install the [`crawlee`](https://npmjs.org/crawlee) module, as it now provides the crawlers that were previously exported by Apify SDK. If you don't plan to use crawlers in your Actors, then you don't need to install it. Keep in mind that neither `playwright` nor `puppeteer` are bundled with `crawlee` in order to reduce install size and allow greater flexibility. That's why we manually install it with NPM. You can choose one, both, or neither. For more information and example please check [`documentation.`](https://docs.apify.com/sdk/js/docs/guides/apify-platform#running-crawlee-code-as-an-actor)
## Support
If you find any bug or issue with the Apify SDK, please [submit an issue on GitHub](https://github.com/apify/apify-sdk-js/issues).
For questions, you can ask on [Stack Overflow](https://stackoverflow.com/questions/tagged/apify) or contact support@apify.com
## Upgrading
Visit the [Upgrading Guide](https://docs.apify.com/sdk/js/docs/upgrading) to find out what changes you might want to make, and, if you encounter any issues, join our [Discord server](https://discord.gg/jyEM2PRvMU) for help!
## Contributing
Your code contributions are welcome, and you'll be praised to eternity!
If you have any ideas for improvements, either submit an issue or create a pull request.
For contribution guidelines and the code of conduct,
see [CONTRIBUTING.md](https://github.com/apify/apify-sdk-js/blob/master/CONTRIBUTING.md).
## License
This project is licensed under the Apache License 2.0 -
see the [LICENSE.md](https://github.com/apify/apify-sdk-js/blob/master/LICENSE.md) file for details.
## Acknowledgments
Many thanks to [Chema Balsas](https://www.npmjs.com/~jbalsas) for giving up the `apify` package name
on NPM and renaming his project to [jsdocify](https://www.npmjs.com/package/jsdocify).