{"id":18710681,"url":"https://github.com/apify/actor-templates","last_synced_at":"2025-11-03T16:26:48.380Z","repository":{"id":39592336,"uuid":"243292137","full_name":"apify/actor-templates","owner":"apify","description":"This project is the :house: home of Apify Actor templates to help users quickly get started. Contributions welcome!","archived":false,"fork":false,"pushed_at":"2025-04-02T09:03:49.000Z","size":13381,"stargazers_count":27,"open_issues_count":25,"forks_count":29,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-03T01:14:10.775Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://apify.com/templates","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apify.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-26T15:09:02.000Z","updated_at":"2025-04-02T08:10:58.000Z","dependencies_parsed_at":"2023-09-22T11:28:26.191Z","dependency_job_id":"8f2fb606-7fef-4513-84d6-5b99e6d53ea2","html_url":"https://github.com/apify/actor-templates","commit_stats":null,"previous_names":["apifytech/actor-templates"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apify%2Factor-templates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apify%2Factor-templates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apify%2Factor-templates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apify%2Factor-templates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apify","download_url":"https://codeload.github.com/apify/actor-templates/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299831,"owners_count":20916190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T12:35:16.633Z","updated_at":"2025-11-03T16:26:48.373Z","avatar_url":"https://github.com/apify.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"\u003cimg src=\"actor-logo.png\" align=\"right\" /\u003e\n\n# Apify Actor templates\n\n\u003e This repository stores boilerplate templates and code examples for [Apify Actor](https://apify.com/actors).\n\u003e The purpose of these templates is to help developers get started with Actor development on the Apify platform.\n\n## How to use the templates\n\nYou can start using the Actor templates right away with the [Apify CLI](https://docs.apify.com/cli):\n\n```Bash\nnpx apify-cli create my-crawler\n```\n\nor\n\n```Bash\nnpm -g install apify-cli\napify create my-actor\n```\n\nAfter running the command you will be prompted to select one of the templates from the list displayed in your terminal. The available templates are:\n\n### Getting started templates\n\nBasic templates to start developing Actors on the Apify platform using Node.js (JavaScript/Typescript), or Python.\nJust install the CLI and watch your Actor run.\n\n- [Node.js + JavaScript](./templates/js-start/)\n- [Node.js + TypeScript](./templates/ts-start/)\n- [Python](./templates/python-start/)\n\nYou can find more code examples in the\n[Apify SDK documentation](https://sdk.apify.com/docs/examples/puppeteer-crawler/).\n\n### Project boilerplate\n\nIf you're already familiar with Actors, you can use the following templates to bootstrap new projects using an empty project templates or Crawlee templates:\n\n#### Empty projects\n\nStart a new web scraping project quickly and easily in JavaScript/TypeScript (Node.js) or Python with our empty project template. It provides a basic structure for the Actor with [Apify JavaScript SDK](https://docs.apify.com/sdk/js/) or [Apify Python SDK](https://docs.apify.com/sdk/python/) and allows you to easily add your own functionality.\n\n- [Empty JavaScript project](./templates/js-empty/)\n- [Empty TypeScript project](./templates/ts-empty/)\n- [Empty Python project](./templates/python-empty/)\n\n#### Crawlee projects\n\n- [CheerioCrawler](./templates/js-crawlee-cheerio/) ([TypeScript version](./templates/ts-crawlee-cheerio/)) - Standard and up to date template for developing with Crawlee's CheerioCrawler.\n- [PlaywrightCrawler](./templates/js-crawlee-playwright-chrome/) ([TypeScript version](./templates/ts-crawlee-playwright-chrome/)) - Standard and up to date template for developing with Crawlee's PlaywrightCrawler.\n- [PuppeteerCrawler](./templates/js-crawlee-puppeteer-chrome/) ([TypeScript version](./templates/ts-crawlee-puppeteer-chrome/)) - Standard and up to date template for developing with Crawlee's PuppeteerCrawler.\n\nTo run the template:\n\n```Bash\ncd my-actor\napify run\n```\n\n## Templates API\n\nThe [template manifest](./templates/manifest.json) can be fetched programmatically.\nApify CLI uses this to always fetch the most up to date templates.\n\n```Bash\nnpm i @apify/actor-templates\n```\n\n```JavaScript\nimport { fetchManifest } from '@apify/actor-templates';\n\nconst manifest = await fetchManifest();\n```\n\n## Publish updated/new template\n\nAll templates are stores in `./templates` directory.\nFor each template needs to create an archive of whole source code into the `./dist/templates` directory.\nThe archive is used to create a boilerplate template in `apify CLI` or other places in the Apify system.\n\n### Update and add templates\n\nIf you want to change a template, you will have to update the template files and the [`manifest.json`](./templates/manifest.json) file before pushing the changes to the `master` branch. After pushing to `master`, the archive will be automatically built using Github actions.\n\n### Update the AGENTS.md file\n\nThe AGENTS.md file is provided in templates. Each file has a prefix in the name, which matches the prefix of the template in the templates directory.\nFor example, for all `js` templates (so `js-start`, `js-empty`, `js-crawlee-cheerio`, etc.), the AGENTS.md file is located in the `./agent-bases/js.AGENTS.md` file.\nTo update the AGENTS.md file, you will have to update the file in the `./agent-bases` directory. Once merged, the GitHub workflow will automatically update the\ntemplates with the new content.\n\n## How to propagate templates into Apify CLI?\n\nTemplates are propagated to Apify CLI templates. You can then find your newly added template when using the `apify create` command.\nThe propagation happens after committing a new version of the template into the `master` branch. After tests succeeded the Github action\nbuilds `archives` of each template and pushes these `archives` into the repository. The CLI command then uses those archives\nto bootstrap your project folder. We did it this way because we can update template structure/code without publishing\nany package to npm. It makes templates changes agile.\n\n## How to propagate templates into Apify web?\n\nTemplates on the Apify Web are statically generated with each `apify-web` deployment.\nThe web is typically deployed multiple times per week.\n\n## Template icons\n\nIcons are derived from the [`manifest.json`](./templates/manifest.json) file by specifying them in the technologies array.\nIf there is a new icon, it has to be added to the [apify-web/public/img/template-icons](https://github.com/apify/apify-web/tree/develop/public/img/template-icons) directory first.\n\n## Reference\n\n- [Apify Actor documentation](https://docs.apify.com/actor)\n- [Apify CLI](https://docs.apify.com/cli)\n- [Apify SDK](https://sdk.apify.com/)\n\n## Contributing\n\nIf you have any ideas for improvements, either submit an issue or create a pull request.\nFor contribution guidelines and the code of conduct, see [CONTRIBUTING.md](CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapify%2Factor-templates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapify%2Factor-templates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapify%2Factor-templates/lists"}