Automate web browsing and scraping tasks with intelligent, AI-powered capabilities. Search Google, navigate websites, and extract tailored content from GitHub, Stack Overflow, documentation, and generic sites. Save screenshots and text content automatically for efficient data collection and processing.
Tools
search_and_scrape
Search for content using Tavily and scrape the most relevant result. This function performs a two-step process: 1. Uses Tavily search API to find the most relevant URLs for a given query 2. Scrapes the content from the top-ranked URL using Firecrawl Args: query (str): The search query to find relevant content. This query will be used to search for and retrieve the most relevant webpage content. Returns: str: The scraped content in markdown format from the most relevant webpage. Example: >>> content = search_and_scrape("What is Python programming language?") >>> print(content) Raises: Exception: If the search fails or if the scraping process fails.
list_directory
List contents of a directory. This tool lists all files and directories in the specified path. If no path is provided, it lists the current directory. Args: path (str, optional): The directory path to list. Defaults to current directory ("."). Returns: list: A list of dictionaries containing information about each item: - name: The name of the file/directory - type: Either "file" or "directory" - size: File size in bytes (for files only) - modified: Last modification timestamp Example: >>> contents = list_directory("/path/to/directory") >>> print(contents)
get_current_directory
Get the current working directory. Returns: str: The absolute path of the current working directory. Example: >>> current_dir = get_current_directory() >>> print(current_dir)
change_directory
Change the current working directory. Args: path (str): The directory path to change to. Returns: str: The new current working directory path. Raises: Exception: If the directory doesn't exist or is not accessible. Example: >>> new_dir = change_directory("/path/to/directory") >>> print(new_dir)