Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ OPENAI_API_BASE=https://api.openai.com/v1
# Search & Scraping Tool API Keys
# -----------------------------------------------------------------------------
SERPER_API_KEY=fake-serper-key
CLORO_API_KEY=fake-cloro-key
EXA_API_KEY=fake-exa-key
BRAVE_API_KEY=fake-brave-key
FIRECRAWL_API_KEY=fake-firecrawl-key
Expand Down
88 changes: 88 additions & 0 deletions docs/en/tools/web-scraping/cloro-tool.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
title: CloroTool
description: Use the `CloroTool` to scrape AI models using the cloro API.
icon: flask
mode: "wide"
---

# `CloroTool`

## Description

Use the `CloroTool` to scrape AI models using the cloro API. Supports engines: google, chatgpt, gemini, copilot, perplexity, aimode.

## Installation

```shell
pip install 'crewai[tools]'
```

## Environment Variables

- `CLORO_API_KEY` (required)

Get the credentials by creating a [cloro account](https://dashboard.cloro.dev).

## Example

```python Code
from crewai_tools import CloroTool

# make sure CLORO_API_KEY variable is set
tool = CloroTool()

result = tool.run(search_query="latest news about AI agents")

print(result)
```

## Arguments

- `api_key` (str, optional): cloro API key.
- `engine` (str, optional): The engine to use for the query. Options are `google`, `chatgpt`, `gemini`, `copilot`, `perplexity`, `aimode`. Defaults to `google`.
- `country` (str, optional): The ISO 3166-1 alpha-2 country code for localized results (e.g., "US", "BR"). For a full list of supported country codes, refer to the [cloro API /v1/countries endpoint](https://docs.cloro.dev/api-reference/endpoint/countries). Defaults to "US".
- `device` (str, optional): The device type for Google search results (`desktop` or `mobile`). Defaults to "desktop".
- `pages` (int, optional): The number of pages to retrieve for Google search results. Defaults to 1.
- `save_file` (bool, optional): Whether to save the search results to a file. Defaults to `False`.

## Response Format

The tool returns a structured dictionary containing different fields depending on the selected engine.

### Google Engine

- `organic`: List of organic search results with title, link, snippet, etc.
- `peopleAlsoAsk`: List of related questions.
- `relatedSearches`: List of related search queries.
- `ai_overview`: Google AI Overview data (if available).

### LLM Engines (ChatGPT, Perplexity, Gemini, etc.)

- `text`: The main response text from the model.
- `sources`: List of sources cited by the model (if available).
- `shopping_cards`: List of product/shopping cards with prices and offers (if available).
- `hotels`: List of hotel results (if available).
- `places`: List of places/locations (if available).
- `videos`: List of video results (if available).
- `images`: List of image results (if available).
- `related_queries`: List of related follow-up queries (if available).
- `entities`: List of extracted entities (if available).

## Advanced example

Check out the cloro [documentation](https://docs.cloro.dev/api-reference/introduction) to get the full list of parameters.

```python Code
from crewai_tools import CloroTool

# make sure CLORO_API_KEY variable is set
tool = CloroTool(
engine="chatgpt",
country="BR",
save_file=True
)

result = tool.run(search_query="Say 'Hello, Brazil!'")

print(result)
```
150 changes: 103 additions & 47 deletions docs/en/tools/web-scraping/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,53 +14,109 @@ These tools enable your agents to interact with the web, extract data from websi
General-purpose web scraping tool for extracting content from any website.
</Card>

<Card title="Scrape Element Tool" icon="crosshairs" href="/en/tools/web-scraping/scrapeelementfromwebsitetool">
Target specific elements on web pages with precision scraping capabilities.
</Card>

<Card title="Firecrawl Crawl Tool" icon="spider" href="/en/tools/web-scraping/firecrawlcrawlwebsitetool">
Crawl entire websites systematically with Firecrawl's powerful engine.
</Card>

<Card title="Firecrawl Scrape Tool" icon="fire" href="/en/tools/web-scraping/firecrawlscrapewebsitetool">
High-performance web scraping with Firecrawl's advanced capabilities.
</Card>

<Card title="Firecrawl Search Tool" icon="magnifying-glass" href="/en/tools/web-scraping/firecrawlsearchtool">
Search and extract specific content using Firecrawl's search features.
</Card>

<Card title="Selenium Scraping Tool" icon="robot" href="/en/tools/web-scraping/seleniumscrapingtool">
Browser automation and scraping with Selenium WebDriver capabilities.
</Card>

<Card title="ScrapFly Tool" icon="plane" href="/en/tools/web-scraping/scrapflyscrapetool">
Professional web scraping with ScrapFly's premium scraping service.
</Card>

<Card title="ScrapGraph Tool" icon="network-wired" href="/en/tools/web-scraping/scrapegraphscrapetool">
Graph-based web scraping for complex data relationships.
</Card>

<Card title="Spider Tool" icon="spider" href="/en/tools/web-scraping/spidertool">
Comprehensive web crawling and data extraction capabilities.
</Card>

<Card title="BrowserBase Tool" icon="browser" href="/en/tools/web-scraping/browserbaseloadtool">
Cloud-based browser automation with BrowserBase infrastructure.
</Card>

<Card title="HyperBrowser Tool" icon="window-maximize" href="/en/tools/web-scraping/hyperbrowserloadtool">
Fast browser interactions with HyperBrowser's optimized engine.
</Card>

<Card title="Stagehand Tool" icon="hand" href="/en/tools/web-scraping/stagehandtool">
Intelligent browser automation with natural language commands.
</Card>

<Card title="Oxylabs Scraper Tool" icon="globe" href="/en/tools/web-scraping/oxylabsscraperstool">
Access web data at scale with Oxylabs.
</Card>
{" "}
<Card
title="Scrape Element Tool"
icon="crosshairs"
href="/en/tools/web-scraping/scrapeelementfromwebsitetool"
>
Target specific elements on web pages with precision scraping capabilities.
</Card>

{" "}
<Card
title="Firecrawl Crawl Tool"
icon="spider"
href="/en/tools/web-scraping/firecrawlcrawlwebsitetool"
>
Crawl entire websites systematically with Firecrawl's powerful engine.
</Card>

{" "}
<Card
title="Firecrawl Scrape Tool"
icon="fire"
href="/en/tools/web-scraping/firecrawlscrapewebsitetool"
>
High-performance web scraping with Firecrawl's advanced capabilities.
</Card>

{" "}
<Card
title="Firecrawl Search Tool"
icon="magnifying-glass"
href="/en/tools/web-scraping/firecrawlsearchtool"
>
Search and extract specific content using Firecrawl's search features.
</Card>

{" "}
<Card
title="Selenium Scraping Tool"
icon="robot"
href="/en/tools/web-scraping/seleniumscrapingtool"
>
Browser automation and scraping with Selenium WebDriver capabilities.
</Card>

{" "}
<Card
title="ScrapFly Tool"
icon="plane"
href="/en/tools/web-scraping/scrapflyscrapetool"
>
Professional web scraping with ScrapFly's premium scraping service.
</Card>

{" "}
<Card
title="ScrapGraph Tool"
icon="network-wired"
href="/en/tools/web-scraping/scrapegraphscrapetool"
>
Graph-based web scraping for complex data relationships.
</Card>

{" "}
<Card
title="Spider Tool"
icon="spider"
href="/en/tools/web-scraping/spidertool"
>
Comprehensive web crawling and data extraction capabilities.
</Card>

{" "}
<Card title="CloroTool" icon="flask" href="/en/tools/web-scraping/cloro-tool">
Scrape the user interface of major LLMs via cloro API.
</Card>

{" "}
<Card
title="HyperBrowser Tool"
icon="window-maximize"
href="/en/tools/web-scraping/hyperbrowserloadtool"
>
Fast browser interactions with HyperBrowser's optimized engine.
</Card>

{" "}
<Card
title="Stagehand Tool"
icon="hand"
href="/en/tools/web-scraping/stagehandtool"
>
Intelligent browser automation with natural language commands.
</Card>

{" "}
<Card
title="Oxylabs Scraper Tool"
icon="globe"
href="/en/tools/web-scraping/oxylabsscraperstool"
>
Access web data at scale with Oxylabs.
</Card>

<Card title="Bright Data Tools" icon="spider" href="/en/tools/web-scraping/brightdata-tools">
SERP search, Web Unlocker, and Dataset API integrations.
Expand Down
2 changes: 2 additions & 0 deletions lib/crewai-tools/src/crewai_tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from crewai_tools.tools.browserbase_load_tool.browserbase_load_tool import (
BrowserbaseLoadTool,
)
from crewai_tools.tools.cloro_tool.cloro_tool import CloroTool
from crewai_tools.tools.code_docs_search_tool.code_docs_search_tool import (
CodeDocsSearchTool,
)
Expand Down Expand Up @@ -205,6 +206,7 @@
"BrightDataSearchTool",
"BrightDataWebUnlockerTool",
"BrowserbaseLoadTool",
"CloroTool",
"CSVSearchTool",
"CodeDocsSearchTool",
"CodeInterpreterTool",
Expand Down
2 changes: 2 additions & 0 deletions lib/crewai-tools/src/crewai_tools/tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from crewai_tools.tools.browserbase_load_tool.browserbase_load_tool import (
BrowserbaseLoadTool,
)
from crewai_tools.tools.cloro_tool.cloro_tool import CloroTool
from crewai_tools.tools.code_docs_search_tool.code_docs_search_tool import (
CodeDocsSearchTool,
)
Expand Down Expand Up @@ -190,6 +191,7 @@
"BrightDataSearchTool",
"BrightDataWebUnlockerTool",
"BrowserbaseLoadTool",
"CloroTool",
"CSVSearchTool",
"CodeDocsSearchTool",
"CodeInterpreterTool",
Expand Down
75 changes: 75 additions & 0 deletions lib/crewai-tools/src/crewai_tools/tools/cloro_tool/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# CloroTool

Use the `CloroTool` to search the web or query AI models using the cloro API.

## Installation

```shell
pip install 'crewai[tools]'
```

## Example

```python
from crewai_tools import CloroTool

# make sure CLORO_API_KEY variable is set
tool = CloroTool()

result = tool.run(search_query="latest news about AI agents")

print(result)
```

## Arguments

- `api_key` (str, optional): cloro API key.
- `engine` (str, optional): The engine to use for the query. Options are `google`, `chatgpt`, `gemini`, `copilot`, `perplexity`, `aimode`. Defaults to `google`.
- `country` (str, optional): The ISO 3166-1 alpha-2 country code for localized results (e.g., "US", "BR"). For a full list of supported country codes, refer to the [cloro API /v1/countries endpoint](https://docs.cloro.dev/api-reference/endpoint/countries). Defaults to "US".
- `device` (str, optional): The device type for Google search results (`desktop` or `mobile`). Defaults to "desktop".
- `pages` (int, optional): The number of pages to retrieve for Google search results. Defaults to 1.
- `save_file` (bool, optional): Whether to save the search results to a file. Defaults to `False`.

Get the credentials by creating a [cloro account](https://dashboard.cloro.dev).

## Response Format

The tool returns a structured dictionary containing different fields depending on the selected engine.

### Google Engine

- `organic`: List of organic search results with title, link, snippet, etc.
- `peopleAlsoAsk`: List of related questions.
- `relatedSearches`: List of related search queries.
- `ai_overview`: Google AI Overview data (if available).

### LLM Engines (ChatGPT, Perplexity, Gemini, etc.)

- `text`: The main response text from the model.
- `sources`: List of sources cited by the model (if available).
- `shopping_cards`: List of product/shopping cards with prices and offers (if available).
- `hotels`: List of hotel results (if available).
- `places`: List of places/locations (if available).
- `videos`: List of video results (if available).
- `images`: List of image results (if available).
- `related_queries`: List of related follow-up queries (if available).
- `entities`: List of extracted entities (if available).

## Advanced example

Check out the cloro [documentation](https://docs.cloro.dev/api-reference/introduction) to get the full list of parameters.

```python
from crewai_tools import CloroTool

# make sure CLORO_API_KEY variable is set
tool = CloroTool(
engine="chatgpt",
country="BR",
save_file=True
)

result = tool.run(search_query="Say 'Hello, Brazil!'")

print(result)
```
Empty file.
Loading