ApifyActorsTool
lets you call Apify Actors to provide your CrewAI workflows with web scraping, crawling, data extraction, and web automation capabilities.
ApifyActorsTool
ApifyActorsTool
connects Apify Actors, cloud-based programs for web scraping and automation, to your CrewAI workflows.
Use any of the 4,000+ Actors on Apify Store for use cases such as extracting data from social media, search engines, online maps, e-commerce sites, travel portals, or general websites.
For details, see the Apify CrewAI integration in Apify documentation.
Install dependencies
crewai[tools]
and langchain-apify
using pip: pip install 'crewai[tools]' langchain-apify
.Obtain an Apify API token
Configure environment
APIFY_API_TOKEN
environment variable to enable the tool’s functionality.ApifyActorsTool
manually to run the RAG Web Browser Actor to perform a web search:
ApifyActorsTool
automatically fetches the Actor definition and input schema from Apify using the provided actor_name
and then constructs the tool description and argument schema. This means you need to specify only a valid actor_name
, and the tool handles the rest when used with agents—no need to specify the run_input
. Here’s how it works:
actor_name
and, when using it manually, adjusting the run_input
based on the Actor input schema.
For an example of usage with agents, see the CrewAI Actor template.
ApifyActorsTool
requires these inputs to work:
actor_name
The ID of the Apify Actor to run, e.g., "apify/rag-web-browser"
. Browse all Actors on Apify Store.run_input
A dictionary of input parameters for the Actor when running the tool manually.
apify/rag-web-browser
Actor: {"query": "search term", "maxResults": 5}