Apify
This guide demonstrates how to integrate and use Apify Actors within the Agno framework to enhance your AI agents with web scraping, crawling, data extraction, and web automation capabilities.
What is Apify?
Apify is a platform that provides:
- Data collection services for AI Agents, specializing in extracting data from social media, search engines, online maps, e-commerce sites, travel portals, or general websites
- A marketplace of ready-to-use Actors (specialized tools) for various data tasks
- Infrastructure to run and monetize our own AI Agents
Prerequisites
- Sign up for an Apify account
- Obtain your Apify API token (can be obtained from Apify)
- Install the required packages:
Basic Usage
The Agno framework makes it easy to integrate Apify Actors into your agents. Here’s a simple example:
Available Apify Tools
You can easily integrate any Apify Actor as a tool. Here are some examples:
1. RAG Web Browser
The RAG Web Browser Actor is specifically designed for AI and LLM applications. It searches the web for a query or processes a URL, then cleans and formats the content for your agent. This tool is enabled by default.
2. Website Content Crawler
This tool uses Apify’s Website Content Crawler Actor to extract text content from websites, making it perfect for RAG applications.
3. Google Places Crawler
The Google Places Crawler extracts data about businesses from Google Maps and Google Places.
Example Scenarios
RAG Web Browser + Google Places Crawler
This example combines web search with local business data to provide comprehensive information about a topic:
Toolkit Params
Parameter | Type | Default | Description |
---|---|---|---|
apify_api_token | str | None | Apify API token (or set via APIFY_API_TOKEN environment variable) |
actors | str or List[str] | None | Single Actor ID or list of Actor IDs to register |