|
1
|
--- |
|
2
|
name: web-search |
|
3
|
description: Search the web, fetch content, extract branding profiles, and capture screenshots from URLs. Use for real-time information, API documentation, current events, design matching, and visual reference. |
|
4
|
--- |
|
5
|
|
|
6
|
# Web Search Skill |
|
7
|
|
|
8
|
## When to Use |
|
9
|
|
|
10
|
- Real-time information (news, prices, events) |
|
11
|
- Looking up API documentation or SDK guides |
|
12
|
- Current technical information beyond training data |
|
13
|
- Verifying facts from authoritative sources |
|
14
|
|
|
15
|
## When NOT to Use |
|
16
|
|
|
17
|
- Replit-specific features (use the `replit-docs` skill) |
|
18
|
- Searching for real web images or logo files (use the `image-search` skill) |
|
19
|
- Image or video generation (use the `media-generation` skill) |
|
20
|
- Code search within the project (use grep/glob tools) |
|
21
|
|
|
22
|
## Available Functions |
|
23
|
|
|
24
|
### Single web search — webSearch(query) |
|
25
|
|
|
26
|
**Parameters:** |
|
27
|
|
|
28
|
- `query` (str, required): Natural language search query phrased as a complete question |
|
29
|
|
|
30
|
**Returns:** Dict with `searchAnswer` and `resultPages` (list of title/url/snippet dicts) |
|
31
|
|
|
32
|
**Example:** |
|
33
|
|
|
34
|
```javascript |
|
35
|
const results = await webSearch({ query: "OpenAI API rate limits 2026" }); |
|
36
|
for (const page of results.resultPages) { |
|
37
|
console.log(`${page.title}: ${page.url}`); |
|
38
|
} |
|
39
|
``` |
|
40
|
|
|
41
|
### Multiple web searches — webSearch({ queries }) |
|
42
|
|
|
43
|
Run multiple searches concurrently (max 10). |
|
44
|
|
|
45
|
**Parameters:** |
|
46
|
|
|
47
|
- `queries` (list[str]): List of natural language search queries phrased as complete questions |
|
48
|
|
|
49
|
**Returns:** List of result dicts, each with `searchAnswer` and `resultPages` (list of title/url/snippet dicts) |
|
50
|
|
|
51
|
**Example:** |
|
52
|
|
|
53
|
```javascript |
|
54
|
const results = await webSearch({ |
|
55
|
queries: ["OpenAI API rate limits 2026", "Anthropic API rate limits 2026"] |
|
56
|
}); |
|
57
|
``` |
|
58
|
|
|
59
|
### webFetch(url) |
|
60
|
|
|
61
|
Fetch and extract content from a URL as markdown. |
|
62
|
|
|
63
|
**Parameters:** |
|
64
|
|
|
65
|
- `url` (str, required): Full HTTPS URL to fetch |
|
66
|
|
|
67
|
**Returns:** Dict with `markdown` key containing page content |
|
68
|
|
|
69
|
**Example:** |
|
70
|
|
|
71
|
```javascript |
|
72
|
const content = await webFetch({ url: "https://platform.openai.com/docs/guides/rate-limits" }); |
|
73
|
console.log(content.markdown.slice(0, 1000)); |
|
74
|
``` |
|
75
|
|
|
76
|
## Best Practices |
|
77
|
|
|
78
|
1. **Use natural language queries**: write queries as complete questions with context. |
|
79
|
2. **Chain search and fetch**: search first, then fetch specific pages for details. |
|
80
|
3. **Be specific**: include dates, versions, or other specifics in queries. |
|
81
|
4. **Verify with fetch**: don't rely only on search snippets for critical information. |
|
82
|
5. **Use branding for design matching**: when replicating a site's visual style, use `extractBranding` to get exact colors, fonts, and spacing. |
|
83
|
6. **Use screenshot for visual reference**: when you need to see what a site looks like before replicating its design. |
|
84
|
|
|
85
|
## Example Workflow |
|
86
|
|
|
87
|
```javascript |
|
88
|
// Find information about a topic |
|
89
|
const searchResult = await webSearch({ query: "FastAPI dependency injection tutorial 2026" }); |
|
90
|
|
|
91
|
// Get full content from the most relevant result |
|
92
|
if (searchResult.resultPages.length > 0) { |
|
93
|
const bestUrl = searchResult.resultPages[0].url; |
|
94
|
const fullContent = await webFetch({ url: bestUrl }); |
|
95
|
console.log(fullContent.markdown); |
|
96
|
} |
|
97
|
``` |
|
98
|
|
|
99
|
## Limitations |
|
100
|
|
|
101
|
- Cannot access social media platforms (LinkedIn, Twitter, Instagram, Facebook, Reddit, YouTube) |
|
102
|
- Cannot download media files (images, videos, audio) |
|
103
|
- Paywalled or authenticated content may be inaccessible |
|
104
|
|
|
105
|
## Copyright |
|
106
|
|
|
107
|
- Respect copyright for media content from websites. |
|
108
|
- You can reference or link to public content. |
|
109
|
- Do not copy media files (images, videos, audio) directly from websites. |
|
110
|
- Use the `media-generation` skill for images and videos instead. |