Skip to content

Commit 525369a

Browse files
Readme update (#129)
* Update README.md * Update README.md * Update README.md * Apply suggestions from code review Co-authored-by: FabianMaumeApify <fabian.maume@apify.com> * Update actors/apify_rag-web-browser/README.md --------- Co-authored-by: Nick Lamonov <nikita.lamonov@apify.com>
1 parent fcc71b8 commit 525369a

1 file changed

Lines changed: 39 additions & 57 deletions

File tree

actors/apify_rag-web-browser/README.md

Lines changed: 39 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22

33
[![RAG Web Browser](https://apify.com/actor-badge?actor=apify/rag-web-browser)](https://apify.com/apify/rag-web-browser)
44

5-
This Actor provides web browsing functionality for AI agents and LLM applications,
5+
Give your LLM application up-to-date context from the web: query Google Search, crawl the top results, and get clean Markdown back in one call. The extracted text can then be injected into prompts and retrieval augmented generation (RAG) pipelines, to provide your LLM application with up-to-date context from the web.
6+
7+
The RAG Web Browser provides web browsing functionality for AI agents and LLM applications,
68
similar to the [web browsing](https://openai.com/index/introducing-chatgpt-search/) feature in ChatGPT.
7-
It accepts a search phrase or a URL, queries Google Search, then crawls web pages from the top search results, cleans the HTML, converts it to text or Markdown,
8-
and returns it back for processing by the LLM application.
9-
The extracted text can then be injected into prompts and retrieval augmented generation (RAG) pipelines, to provide your LLM application with up-to-date context from the web.
109

1110
## Main features
1211

@@ -19,6 +18,7 @@ The extracted text can then be injected into prompts and retrieval augmented gen
1918
- 🪗 **Collapsed sections are expanded** in Browser mode, so their content is not missing from the output
2019
- 🔌 Supports **OpenAPI and MCP** for easy integration
2120
- 🪟 It's **open source**, so you can review and modify it
21+
- 🧹**HTML to Markdown conversion**
2222

2323
## Example
2424

@@ -50,6 +50,12 @@ For a search query like `fast web browser in RAG pipelines`, the Actor will retu
5050
]
5151
```
5252

53+
**This Actor supports Google search parameters.** You can use:
54+
- "site:apify.com keyword" to search results only on the Apify website
55+
- "after:2026-01-31 keyword" to get results from after the 1st of January 2026
56+
- "before:2026-01-31 keyword" to get results from before the 1st of January 2026
57+
58+
5359
If you enter a specific URL such as `https://openai.com/index/introducing-chatgpt-search/`, the Actor will extract
5460
the web page content directly like this:
5561

@@ -96,6 +102,18 @@ This mode is useful for testing and evaluation, but might be too slow for produc
96102
because it takes some time to start the Actor's Docker container and a web browser.
97103
Also, one Actor run can only handle one query, which isn't efficient.
98104

105+
#### Normal run output
106+
When running the Actor in normal mode, all results are saved in a dataset with the following format:
107+
```json
108+
[
109+
{
110+
"metadata.url": "https://github.com/apify/rag-web-browser",
111+
"metadata.title": "GitHub - apify/actor-rag-web-browser: RAG Web Browser is an Apify Actor to feed your LLM applications and RAG pipelines with up-to-date text content scraped from the web. · GitHub",
112+
"searchResult.resultType": "ORGANIC",
113+
"markdown": "GitHub - apify/actor-rag-web-browser: RAG Web Browser is an Apify Actor to feed your LLM applications and RAG pipelines ..."
114+
}
115+
]
116+
```
99117
### Standby web server
100118

101119
The Actor also supports the [**Standby mode**](https://docs.apify.com/actors/running/standby),
@@ -124,12 +142,17 @@ The `/search` GET HTTP endpoint accepts all the input parameters [described on t
124142

125143
RAG Web Browser has been designed for easy integration with LLM applications, GPTs, OpenAI Assistants, and RAG pipelines using function calling.
126144

145+
### Use Apify MCP server
146+
You can connect to the MCP server using clients like Claude Desktop, Cursor, Codex, and LibreChat, or even build your own. The RAG Web Browser is the default Actor for the MCP server, so you will access it right after installing the MCP server.
147+
148+
Simply follow the tutorial to set up [Apify MCP server](https://blog.apify.com/how-to-use-mcp/).
149+
127150
### OpenAPI schema
128151

129152
Here you can find the [OpenAPI 3.1.0 schema](https://apify.com/apify/rag-web-browser/endpoints)
130153
for the Standby web server. Note that the OpenAPI definition contains
131154
all available query parameters, but only `query` is required.
132-
You can remove all the others parameters from the definition if their default value is right for your application,
155+
You can remove all the other parameters from the definition if their default value is right for your application,
133156
in order to reduce the number of LLM tokens necessary and to reduce the risk of hallucinations in function calling.
134157

135158
### OpenAI Assistants
@@ -154,56 +177,10 @@ You can easily add the RAG Web Browser to your GPTs by creating a custom action.
154177

155178
Learn more about [adding custom actions to your GPTs with Apify Actors](https://blog.apify.com/add-custom-actions-to-your-gpts/) on Apify Blog.
156179

157-
### Anthropic: Model Context Protocol (MCP) Server
158-
159-
The RAG Web Browser Actor can also be used as an [MCP server](https://github.com/modelcontextprotocol) and integrated with AI applications and agents, such as Claude Desktop.
160-
For example, in Claude Desktop, you can configure the MCP server in its settings to perform web searches and extract content.
161-
Alternatively, you can develop a custom MCP client to interact with the RAG Web Browser Actor.
162-
163-
In the Standby mode, the Actor runs an HTTP server that supports the MCP protocol via SSE (Server-Sent Events).
164-
165-
1. Initiate SSE connection:
166-
```shell
167-
curl https://rag-web-browser.apify.actor/sse?token=<APIFY_API_TOKEN>
168-
```
169-
On connection, you'll receive a `sessionId`:
170-
```text
171-
event: endpoint
172-
data: /message?sessionId=5b2
173-
```
174-
175-
1. Send a message to the server by making a POST request with the `sessionId`, `APIFY-API-TOKEN` and your query:
176-
```shell
177-
curl -X POST "https://rag-web-browser.apify.actor/message?session_id=5b2&token=<APIFY-API-TOKEN>" -H "Content-Type: application/json" -d '{
178-
"jsonrpc": "2.0",
179-
"id": 1,
180-
"method": "tools/call",
181-
"params": {
182-
"arguments": { "query": "recent news about LLMs", "maxResults": 1 },
183-
"name": "rag-web-browser"
184-
}
185-
}'
186-
```
187-
For the POST request, the server will respond with:
188-
```text
189-
Accepted
190-
```
191-
192-
1. Receive a response at the initiated SSE connection:
193-
The server invoked `Actor` and its tool using the provided query and sent the response back to the client via SSE.
194-
195-
```text
196-
event: message
197-
data: {"result":{"content":[{"type":"text","text":"[{\"searchResult\":{\"title\":\"Language models recent news\",\"description\":\"Amazon Launches New Generation of LLM Foundation Model...\"}}
198-
```
199-
200-
You can try the MCP server using the [MCP Tester Client](https://apify.com/jiri.spilka/tester-mcp-client) available on Apify. In the MCP client, simply enter the URL `https://rag-web-browser.apify.actor/sse` in the Actor input field and click **Run** and interact with server in a UI.
201-
To learn more about MCP servers, check out the blog post [What is Anthropic's Model Context Protocol](https://blog.apify.com/what-is-model-context-protocol/).
202180

203181
## ⏳ Performance optimization
204182

205-
To get the most value from RAG Web Browsers in your LLM applications,
206-
always use the Actor via the [Standby web server](#standby-web-server) as described above,
183+
When using RAG Web Browser in production, run it via the [Standby web server](#standby-web-server) as described above,
207184
and see the tips in the following sections.
208185

209186
### Scraping tool
@@ -216,6 +193,11 @@ The **most critical performance decision** is selecting the appropriate scraping
216193

217194
This single parameter choice can significantly impact both response times and content quality, so select based on your target websites' characteristics.
218195

196+
### Result count
197+
When you use the RAG Web Browser to perform a web search, limit the results to 10 using the `maxResults` parameter.
198+
199+
If you request more than 10 results, the Actor will need to go through several pages of Google search results, which increases the response time.
200+
219201
### Request timeout
220202

221203
Many user-facing RAG applications impose a time limit on external functions to provide a good user experience.
@@ -276,7 +258,7 @@ When running the RAG Web Browser in Standby web server, the Actor can process a
276258
This number is determined by the following [Standby mode](https://docs.apify.com/actors/running/standby) settings:
277259

278260
- **Max requests per run** and **Desired requests per run** - Determine how many requests can be sent by the system to one Actor run.
279-
- **Memory** - Determines how much memory and CPU resources the Actor run has available, and this how many web pages it can open and process in parallel.
261+
- **Memory** - Determines how much memory and CPU resources the Actor run has available, and thus how many web pages it can open and process in parallel.
280262

281263
Additionally, the Actor manages its internal pool of web browsers to handle the requests.
282264
If the Actor memory or CPU is at capacity, the pool automatically scales down, and requests
@@ -303,7 +285,7 @@ Results were averaged for the three queries.
303285
| 8 | 1 | 16 |
304286
| 8 | 3 | 17 |
305287

306-
Please note the these results are only indicative and may vary based on the search term, target websites, and network latency.
288+
Please note that these results are only indicative and may vary based on the search term, target websites, and network latency.
307289

308290
## 💰 Pricing
309291

@@ -317,13 +299,13 @@ The Actor uses [Google Search](https://www.google.com/) in the United States wit
317299
and so queries like "_best nearby restaurants_" will return search results from the US.
318300

319301
If you need other regions or languages, or have some other feedback,
320-
please [submit an issue](https://console.apify.com/actors/3ox4R101TgZz67sLr/issues) in Apify Console to let us know.
302+
please [submit an issue](https://console.apify.com/actors/3ox4R101TgZz67sLr/issues) in Apify Console.
321303

322304

323305
## 👷🏼 Development
324306

325-
The RAG Web Browser Actor has open source available on [GitHub](https://github.com/apify/rag-web-browser),
326-
so that you can modify and develop it yourself. Here are the steps how to run it locally on your computer.
307+
The RAG Web Browser Actor is open source, available on [GitHub](https://github.com/apify/rag-web-browser),
308+
so that you can modify and develop it yourself. Here are the steps to run it locally on your computer.
327309

328310
Download the source code:
329311

0 commit comments

Comments
 (0)