# WebSearch vs web_search: Functional Differences Between Claude Code and Cursor

> Discover the functional differences between Claude Code WebSearch and Cursor web_search. Learn which AI tool is best for your research or in-editor assistance needs.

- Repository: [Lucas Valbuena/system-prompts-and-models-of-ai-tools](https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools)
- Tags: deep-dive
- Published: 2026-02-25

---

**Claude Code's `WebSearch` is a research-oriented tool with structured category filtering and rich result payloads, while Cursor's `web_search` is a lightweight lookup utility optimized for rapid in-editor assistance.**

Both Claude Code and Cursor expose web search capabilities to their AI agents, but they serve fundamentally different workflows. According to the system prompt definitions in the `x1xhlol/system-prompts-and-models-of-ai-tools` repository, these tools differ in schema complexity, parameter richness, and result granularity.

## Tool Definitions and JSON Schemas

### Claude Code: websearch--web_search

In `Lovable/Agent Tools.json` (lines 352‑380), Claude Code defines its tool as `websearch--web_search`, exposed to the user as "Web Search". The schema emphasizes **structured research parameters**:

- **`query`** (required): The search string
- **`category`**: Filters like "news", "github", or "pdf"
- **`numResults`**: Specific result count limits
- **`links`**: Number of link references to return
- **`imageLinks`**: Image URL retrieval count

### Cursor: web_search

In `Cursor Prompts/Agent Tools v1.0.json` (lines 250‑260), Cursor defines a minimal `web_search` tool focused on **speed and simplicity**:

- **`search_term`** (required): The query string
- **`explanation`** (optional): One-sentence rationale for the search

Notably absent are category filters, result limits, and image retrieval options.

## Parameter Comparison

The functional divergence begins at the parameter level. **Claude Code requires explicit research configuration**, allowing the agent to request specific source types (GitHub repositories, PDF documents, news articles) and control result volume. This precision reduces noise in research-heavy workflows.

**Cursor optimizes for zero-friction lookups**. By accepting only a search term and optional explanation, the tool eliminates configuration overhead. This design suits rapid context gathering during active coding sessions where the developer needs quick answers without tuning search parameters.

## Result Payloads and Data Richness

The tools return fundamentally different data structures. According to the schema definitions:

**Claude Code WebSearch** returns rich result objects containing:
- Text snippets with contextual excerpts
- URLs for citation
- Image URLs (when `imageLinks` is specified)
- Category-filtered results matching specific source types

**Cursor web_search** returns a simple list of search results comprising:
- Text snippets
- URLs

No explicit category filtering, image links, or structured metadata accompanies Cursor results. This makes Claude Code's implementation superior for **attributed research** requiring citations, while Cursor's suits **quick reference lookups**.

## Guidance and Query Optimization

Claude Code embeds **detailed search guidelines** directly in the tool description. These include:
- Site-specific filters (`site:github.com`)
- Exact-phrase quoting techniques
- Exclusion operators (`-term`)
- Domain targeting strategies

This guidance trains the agent to construct precise, high-signal queries.

Cursor provides **minimal guidance**—only the optional `explanation` field prompting the agent to justify the search. The absence of query optimization instructions reflects the tool's purpose as a simple fetch utility rather than a research instrument.

## Practical Use Cases

### When to Use Claude Code WebSearch

Deploy Claude Code's `websearch--web_search` when you need:
- **Cited, up-to-date information** from specific source types (news, official documentation, PDFs)
- **Controlled result volumes** for comprehensive research tasks
- **Image references** for visual documentation or UI comparisons
- **Structured filtering** by category (e.g., isolating GitHub repositories or academic papers)

This tool excels in research-heavy workflows where attribution and source diversity matter.

### When to Use Cursor web_search

Use Cursor's `web_search` for:
- **Quick look-ups** while writing or debugging code
- **Rapid context gathering** without configuration overhead
- **Concise answers** where full citation chains or category filtering are unnecessary

This tool fits the in-editor assistance paradigm where speed trumps research depth.

## Implementation Examples

### Claude Code WebSearch Example

```json
{
  "name": "websearch--web_search",
  "parameters": {
    "query": "latest TensorFlow release notes 2026",
    "category": "github",
    "numResults": 3,
    "links": 2,
    "imageLinks": 0
  }
}

```

*Source: `Lovable/Agent Tools.json`, lines 352‑380*

This request targets GitHub specifically, limits results to three entries, and requests two links per result—ideal for researching specific repository updates.

### Cursor web_search Example

```json
{
  "name": "web_search",
  "parameters": {
    "explanation": "Find the official React 19 release blog post to cite in the documentation.",
    "search_term": "React 19 release blog"
  }
}

```

*Source: `Cursor Prompts/Agent Tools v1.0.json`, lines 250‑260*

This minimal invocation suits a quick documentation reference without requiring category filters or result limits.

## Summary

- **Claude Code WebSearch** (`websearch--web_search` in `Lovable/Agent Tools.json`) is a **research-grade tool** with category filtering, result limits, image retrieval, and detailed query guidance. Use it for cited, structured information gathering from specific source types.

- **Cursor web_search** (`web_search` in `Cursor Prompts/Agent Tools v1.0.json`) is a **lightweight lookup utility** with minimal parameters (`search_term` and optional `explanation`). Use it for rapid, in-editor context gathering without configuration overhead.

## Frequently Asked Questions

### What is the exact tool name for web search in Claude Code?

The internal tool name is `websearch--web_search`, defined in `Lovable/Agent Tools.json` (lines 352‑380). It is exposed to users as "Web Search" and accepts parameters like `query`, `category`, `numResults`, and `imageLinks`.

### Can Cursor's web_search filter results by category like Claude Code can?

No. According to the schema in `Cursor Prompts/Agent Tools v1.0.json` (lines 250‑260), Cursor's `web_search` only accepts `search_term` and an optional `explanation`. It does not support category filters (e.g., "news", "github", "pdf") or result limits like Claude Code's implementation.

### When should I use Claude Code WebSearch instead of Cursor web_search?

Use Claude Code WebSearch when you need **structured, cited research** with specific source filtering (such as GitHub repositories or PDF documents), controlled result volumes, or image URLs. Use Cursor web_search for **quick, unfiltered lookups** during active coding sessions where minimal latency and zero configuration are priorities.