# Deep Research Agent (Brave + Gemini 3.1/GPT-5.1/Opus4.6) (`visita/deep-research-agent`) Actor

🦁 Autonomous research assistant. Uses Brave Search + AI (Gemini 3.1/GPT-5.1/Opus4.6) to search, scrape, and synthesize the web into professional, fully cited reports. 📄 Features instant HTML/Markdown export and massive context windows. Perfect for market intelligence, academic research, & briefs.

- **URL**: https://apify.com/visita/deep-research-agent.md
- **Developed by:** [Visita Intelligence](https://apify.com/visita) (community)
- **Categories:** AI, Agents, Developer tools
- **Stats:** 14 total users, 2 monthly users, 0.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

from $50.00 / 1,000 standard modes

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## 🦁 Deep Research Agent 

**The autonomous AI research assistant that browses, reads, analyzes, and synthesizes the web for you.**

---

### 🤯 The Problem: Search is Noisy
When you Google a complex topic like *"The impact of quantum computing on cryptography,"* you get 10 blue links.
* You have to click every link.
* You have to dodge ads and popups.
* You have to read 5,000 words just to find one specific fact.
* **It takes hours.**

### 💡 The Solution: Deep Research Agent
This Actor acts like a **human research assistant**. It does the heavy lifting for you automatically, saving you massive amounts of time:
1.  **Searches** the web using the ad-free Brave Search API.
2.  **Visits** the top websites and reads the full content (scraping text).
3.  **Synthesizes** the massive amount of information using **Premium LLMs** (GPT-5.1, Claude 4.6 Opus, Gemini 3.1 Pro).
4.  **Writes** a professional, fully cited report delivered in Multiple Formats.

> **✨ Key Feature: Massive Context Window**
> Because we utilize premium massive-context models like Gemini 3.1 Pro, this actor can read dozens of long articles, PDFs, and technical documentation in a single pass without "forgetting" details.

---

### 🚀 Features

| Feature | Description |
| :--- | :--- |
| **🦁 Brave Search** | Uses the privacy-focused Brave API to find unbiased results without SEO spam. |
| **🧠 Premium Multi-LLM Support** | Choose between the absolute best models on the market: **OpenAI** (GPT-5.1), **Anthropic** (Claude 4.6 Opus) or **Google** (Gemini 3.1 Pro). |
| **⚡ Flexible Research Modes** | Choose **Standard Mode** (Analyzes top 5 sources quickly) or **Deep Mode** (Analyzes up to 15 sources for comprehensive answers). |
| **📄 Multiple Output Formats** | Out-of-the-box generation of shareable **HTML pages, PDF documents, DOCX files**, and raw **Markdown**. |
| **📚 100% Cited & Hallucination-free** | Every claim in the report is strictly grounded and linked directly to its source URL. |
| **🔑 Zero Setup** | No Bring-Your-Own-Key (BYOK) needed! API keys for Search and Premium LLMs are handled natively by us. |

---

### 🎯 Use Cases

#### 🔬 Academic & Technical Research
* "What are the latest breakthroughs in Solid State Batteries in 2025?"
* "Summarize the current geopolitical tensions in the South China Sea."

#### 📊 Market Intelligence
* "Analyze the pricing strategy of top 5 CRM competitors in South Africa."
* "What are the emerging trends in AI-driven agriculture?"

#### ✍️ Content Creation
* "Write a detailed outline for a blog post about 'How to use Python for SEO'."
* "Find and summarize 5 recent news stories about SpaceX."

---

### 💰 Pricing (Pay Per Event)

This Actor uses a highly predictable **Pay-Per-Event (PPE)** pricing model. You do not pay for compute unit hours or external API usage—everything is bundled into a simple flat fee per report generated!

*   **⚡ Standard Mode:** $0.05 per Report (Searches and analyzes the top 5 sources)
*   **🕵️ Deep Mode:** $0.10 per Report (Searches and deeply analyzes up to 15 sources)

*Note: You do not need to configure any API keys or secrets yourself. The pricing above covers the full cost of Brave Search and the Premium LLMs.*

---

### 📦 Output Example

The Actor produces a Dataset containing the raw data, but the magic happens in the **Key-Value Store**.

You will receive direct links to download your formatted **PDF, DOCX**, and a **Hosted HTML Report** that looks like this:

`html
<h1>The State of Quantum Computing</h1>
<p>Quantum computing has moved beyond theoretical physics into early commercialization...</p>
<ul>
  <li><strong>IBM Condor Processor:</strong> Now stabilizing over 1000 qubits... [1]</li>
  <li><strong>Error Correction:</strong> New breakthroughs by Google DeepMind... [2]</li>
</ul>
<div class="sources">
  <h3>📚 Sources Analyzed</h3>
  <a href="...">[1] TechCrunch: IBM Roadmap</a>
  <a href="...">[2] Nature Journal: Quantum Error Correction</a>
</div>
``

**JSON Dataset Export:**

`json
{
  "query": "State of Quantum Computing",
  "model": "openai/gpt-5.1",
  "report_html_url": "https://api.apify.com/v2/key-value-stores/.../OUTPUT_REPORT.html",
  "report_pdf_url": "https://api.apify.com/v2/key-value-stores/.../OUTPUT_REPORT.pdf",
  "report_docx_url": "https://api.apify.com/v2/key-value-stores/.../OUTPUT_REPORT.docx",
  "report_markdown": "# Report Title...",
  "sources": [
    {
      "title": "Quantum Computing News",
      "url": "https://...",
      "domain": "techcrunch.com"
    }
  ]
}
`

-----

### ❓ FAQ

**Q: Can I trust the citations?**
A: Yes. The AI is strictly instructed to only use information from the scraped search results. It lists every source used at the bottom of the report.

**Q: Does it work for non-English queries?**
A: Yes\! You can ask questions in Spanish, French, German, etc. The AI will research and write the report in your target language.

-----

### 📞 Support

If you have feature requests or run into issues, please use the **Issues** tab on Apify. We actively maintain this agent to ensure compatibility with the latest AI models.

# Actor input Schema

## `query` (type: `string`):

The main question or subject you want to investigate.
## `mode` (type: `string`):

Select the depth of research. Standard explores 5 sources. Deep explores up to 15 sources for a comprehensive report.
## `customInstructions` (type: `string`):

Define the AI's tone.
## `country` (type: `string`):

Bias the search results to a specific location.
## `model` (type: `string`):

Select the AI model for synthesis.

## Actor input object example

```json
{
  "query": "State of Quantum Computing in 2025",
  "mode": "standard",
  "customInstructions": "Be professional, objective, and heavily cited.",
  "country": "US",
  "model": "openai/gpt-5.1"
}
````

# Actor output Schema

## `report_html` (type: `string`):

A formatted, shareable view of your research.

## `report_pdf` (type: `string`):

Download the generated PDF format.

## `report_docx` (type: `string`):

Download the generated DOCX format.

## `dataset_overview` (type: `string`):

View the report summary and download options.

## `sources_view` (type: `string`):

See exactly which websites were used for this research.

## `full_json` (type: `string`):

The complete dataset for developers.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "query": "State of Quantum Computing in 2025"
};

// Run the Actor and wait for it to finish
const run = await client.actor("visita/deep-research-agent").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "query": "State of Quantum Computing in 2025" }

# Run the Actor and wait for it to finish
run = client.actor("visita/deep-research-agent").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "State of Quantum Computing in 2025"
}' |
apify call visita/deep-research-agent --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=visita/deep-research-agent",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Deep Research Agent (Brave + Gemini 3.1/GPT-5.1/Opus4.6)",
        "description": "🦁 Autonomous research assistant. Uses Brave Search + AI (Gemini 3.1/GPT-5.1/Opus4.6) to search, scrape, and synthesize the web into professional, fully cited reports. 📄 Features instant HTML/Markdown export and massive context windows. Perfect for market intelligence, academic research, & briefs.",
        "version": "0.0",
        "x-build-id": "Nlwi8uaZGdnPMPx6Z"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/visita~deep-research-agent/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-visita-deep-research-agent",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/visita~deep-research-agent/runs": {
            "post": {
                "operationId": "runs-sync-visita-deep-research-agent",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/visita~deep-research-agent/run-sync": {
            "post": {
                "operationId": "run-sync-visita-deep-research-agent",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "query"
                ],
                "properties": {
                    "query": {
                        "title": "🔬 Research Topic",
                        "type": "string",
                        "description": "The main question or subject you want to investigate.",
                        "default": "State of Quantum Computing in 2025"
                    },
                    "mode": {
                        "title": "⚡ Research Mode",
                        "enum": [
                            "standard",
                            "deep"
                        ],
                        "type": "string",
                        "description": "Select the depth of research. Standard explores 5 sources. Deep explores up to 15 sources for a comprehensive report.",
                        "default": "standard"
                    },
                    "customInstructions": {
                        "title": "🎭 Researcher Persona",
                        "type": "string",
                        "description": "Define the AI's tone.",
                        "default": "Be professional, objective, and heavily cited."
                    },
                    "country": {
                        "title": "📍 Search Region",
                        "enum": [
                            "US",
                            "GB",
                            "ZA",
                            "CA",
                            "AU",
                            "IN",
                            "DE",
                            "FR"
                        ],
                        "type": "string",
                        "description": "Bias the search results to a specific location.",
                        "default": "US"
                    },
                    "model": {
                        "title": "🧠 AI Model",
                        "enum": [
                            "openai/gpt-5.1",
                            "anthropic/claude-4.6-opus",
                            "google/gemini-3.1-pro"
                        ],
                        "type": "string",
                        "description": "Select the AI model for synthesis.",
                        "default": "openai/gpt-5.1"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
