Lesson 11: WebSearch & WebFetch

websearch-webfetch


What this lesson is about

Claude Code has two powerful tools that allow it to reach out to the internet for current information: WebSearch and WebFetch. In this lesson you will learn what each tool does, when to use one versus the other, and how to combine them into a practical research workflow. You will also learn how to evaluate whether the results Claude returns are actually trustworthy.


Core concept: the expert who has been offline for a year

Imagine you hire a brilliant consultant — someone who has read millions of books, reports, articles, and research papers. They know an enormous amount. But there is one catch: they have been sitting in a room with no internet connection, no newspapers, and no phone calls for the past year. Everything they know is accurate up to the day they went into that room. Anything that happened after that date is simply unknown to them.

That is Claude’s situation. It was trained on a large amount of text up to a certain point in time — this is called the knowledge cutoff (the date after which Claude has no built-in information). If you ask Claude about something recent — a new product launch, a change in legislation, a competitor’s latest pricing — it may give you outdated or incorrect information, simply because that information did not exist when it was trained.

WebSearch and WebFetch are how Claude steps out of that room and checks what is happening in the world right now. These tools allow Claude to retrieve live information from the internet during your conversation, so that its answers are based on current reality rather than on whatever it last learned before its cutoff date.


WebSearch: when you are looking for something

What WebSearch does

WebSearch works much like typing a question into Google. You give Claude a topic or a question, Claude formulates a search query (the words typed into a search engine), sends it to a search engine, and reads the results that come back. It then uses those results to answer your question.

Use WebSearch when:

  • You want to find current information and you do not already have a specific web address (called a URL — think of it as a street address for a webpage)
  • You are researching a topic and want Claude to gather several sources
  • You want to know what is available on a subject before going deeper

Example prompt

Search the web for the current VAT rate in South Africa and tell me
whether there have been any announced changes for the 2025/2026 tax year.

Claude will run the search, read the top results, and give you a summary with the most current information it finds — far more reliable than asking from memory.


WebFetch: when you already know where to go

What WebFetch does

WebFetch is more precise than WebSearch. Instead of asking Claude to look something up, you give it the exact URL of a specific page, and Claude reads that page directly — like handing someone a specific book and saying “read chapter three.” It does not search; it goes straight to the source.

When to use WebFetch

Use WebFetch when:

  • You already have a link you want Claude to read and summarise
  • You want Claude to extract specific details from a known webpage (for example, a competitor’s pricing page or a government notice)
  • You want to make sure Claude is reading that exact source rather than whatever Google returns

Example prompt

Fetch the page at https://www.sars.gov.za/individuals/tax-season/
and summarise the key deadlines for individual taxpayers this year.

The difference between WebSearch and WebFetch

WebSearchWebFetch
What you provideA topic or questionAn exact URL
What Claude doesSearches and picks sourcesReads a specific page you chose
Best forExploring, discovering, comparingExtracting detail from a known source
AnalogyAsking a librarian to recommend books on a topicHanding the librarian a specific book to read
Example use“What accounting software is popular in South Africa?”“Read this page and tell me what the pricing tiers are”

Rule of thumb: Use Search when you are looking. Use Fetch when you know the destination.


Content restrictions: why some pages cannot be fetched

Not every page on the internet can be fetched by Claude. There are good reasons for this:

  • Paywalled content — some websites require a paid subscription to read their articles (for example, certain newspapers). Claude cannot bypass a paywall — it sees the same “subscribe to continue” message you would.
  • Login-protected pages — if a page requires you to sign in, Claude cannot access it because it has no account or session (a session is the temporary connection a website maintains after you log in).
  • Sites that block automated access — some websites detect when a program rather than a human is reading them and block the request.
  • Legal and policy limits — Anthropic’s usage policy prohibits Claude from circumventing website terms of service.

What to do when a page cannot be fetched

If Claude tells you a page cannot be fetched, the correct response is to:

  1. Copy the relevant text from the page yourself and paste it into the conversation
  2. Ask Claude to search for the same information on a different source
  3. Look for an official PDF or public version of the document

Do not ask Claude to use bash (command-line) workarounds such as curl or wget to retrieve content it cannot fetch — this can violate site terms of service and is not a supported workflow in this course. If a site is restricted, it is restricted for a reason.


Building a practical research workflow

The real power of these tools is in combining them into a repeatable workflow. Here is the recommended sequence:

Search → Fetch the most useful result → Summarise → Save to a file

This means:

  1. Use WebSearch to find what is out there
  2. Identify the most relevant result and use WebFetch to read it properly
  3. Ask Claude to summarise the key points
  4. Save the summary to a markdown file (a plain text file with light formatting, ending in .md) for future reference

Full workflow example

The following is a sequence of prompts you would type one after another in Claude Code:

Step 1 — Search:
Search the web for "best payroll software South Africa small business 2025"
and list the top five options with a one-sentence description of each.

Step 2 — Fetch the most relevant result:
Fetch the page at [URL from the result you found most interesting]
and give me a detailed breakdown of their pricing tiers and features.

Step 3 — Summarise:
Based on what you just read, write a concise two-paragraph summary
comparing this product to the others you found in the search.

Step 4 — Save to a file:
Save the full summary, including the list of options and the detailed
breakdown, to a file called "payroll-software-research.md" in a
folder called "research".

Each step builds on the previous one. You are not just getting answers — you are creating a documented research artefact you can share with a colleague or return to later.


Real example: researching a competitor’s offering

Let us say you run a small digital marketing agency and you want to understand what a competitor is offering so you can position your own services more clearly. Here is how the full workflow looks in practice:

1. Search the web for "[Competitor Name] digital marketing services
   South Africa pricing 2025" and summarise what you find.

2. Fetch their services page at [https://www.competitorwebsite.co.za/services]
   and extract every service they list, along with any pricing or
   package information you can find.

3. Write a comparison table showing their services versus the services
   I offer, based on this brief: [paste your own service list here].

4. Save the comparison table and your notes to a file called
   "competitor-analysis-[CompetitorName].md" inside a folder
   called "business/competitors".

When you are done, you have a structured, saved document that took minutes rather than hours — and it is based on current information from their live website, not Claude’s memory.


How to evaluate the quality of search results

Claude can get things wrong, particularly in two situations:

  • Recent events — if something happened very recently, the search results may be incomplete or conflicting. Claude will do its best, but you should verify important facts yourself.
  • Niche or local topics — South African-specific regulations, local business news, or industry-specific details may not be well-represented in search results. Claude might return results that are accurate for other countries but not applicable locally.

Questions to ask when evaluating results

After Claude returns research findings, consider asking:

How confident are you in these results? Are there any gaps or areas
where the information might be outdated or region-specific?
Which sources did you use? Can you give me the URLs so I can verify
the most important claims myself?
Is there any conflicting information across the sources you found?
If so, what are the different views?

Signs that results may be unreliable

  • Claude gives you a confident answer but cannot cite (name or link to) a specific source
  • The information sounds plausible but does not match what you already know to be true
  • Claude says things like “as of my last update” — this signals it is drawing on its built-in knowledge rather than live search results

The golden rule: Use WebSearch and WebFetch to do the heavy lifting, but for decisions that matter — financial, legal, regulatory — always verify with the original source or a qualified professional.


Practical Exercise

In this exercise you will run a real research workflow from start to finish.

a. Open Claude Code and type the following prompt, replacing the topic with something relevant to your own business or industry:

Search the web for the latest changes to South African labour law
regarding remote work in 2025 and give me a brief overview of the
key points.

b. Read the summary Claude returns. Identify the source that looks most authoritative (for example, a government department website, a well-known law firm, or a major news outlet). Then type:

Fetch the page at [paste the URL here] and extract the specific
sections that relate to employer obligations for remote workers.

c. Once Claude has read the page and returned the details, type:

Summarise everything we have found into a clear, plain-English
briefing document and save it as "remote-work-law-briefing.md"
in a folder called "legal-notes". Include the URLs of the sources
at the bottom of the document.

When the exercise is complete, open your file manager and navigate to the legal-notes folder. You should find a ready-to-use briefing document containing current, sourced information — created in minutes.


Common problems and how to fix them

Claude says it cannot access the internet

By default, Claude Code does not always have web tools active. If Claude tells you it cannot search the web or fetch a page, check that WebSearch and WebFetch are enabled in your Claude Code settings or operator configuration. If you are using Claude Code through a company system, ask your administrator to confirm that web access is switched on.

The fetch returns a “blocked” or “access denied” message

This means the website has prevented automated access. Do not attempt workarounds. Instead, copy the relevant text from the page yourself and paste it into the conversation with the note: “Here is the content from that page — please summarise it.”

Claude returns outdated information even after searching

This can happen if the search results themselves are outdated, or if Claude is blending live results with its built-in knowledge. Ask Claude explicitly: “Please rely only on what you found in the search results, not on your training data.” Then ask it to list its sources so you can check the publication dates.

Claude confidently cites a source that does not exist

This is called a hallucination — when an AI generates a plausible-sounding but false piece of information. If a URL Claude gives you returns a “page not found” error, do not assume the information is correct. Ask Claude to search again or find an alternative source. Always verify important claims independently.

The saved file appears in the wrong location

If you asked Claude to save to a folder called research but the file ended up somewhere else, ask: “Where did you save the file? Please show me the full file path.” A file path is the full address of where a file lives on your computer — for example, /Users/yourname/Documents/research/payroll-software-research.md. Once you know the path, you can navigate to it directly.


What you have learned in this lesson

  • Claude’s knowledge has a cutoff date, and WebSearch and WebFetch allow it to access current information from the live internet
  • WebSearch is for finding information when you do not have a specific URL; WebFetch is for reading a specific page you already know
  • Some pages cannot be fetched due to paywalls, login requirements, or site policies — and the correct response is to copy the content yourself, not to use workarounds
  • The recommended research workflow is: Search → Fetch → Summarise → Save to a file
  • You can use this workflow to research competitors, regulations, pricing, and industry trends — and save the results as a reusable document
  • Claude can make mistakes on recent or niche topics, so always ask it to name its sources and verify important claims yourself
  • Hallucinations (confidently stated but false information) can occur — a broken URL is a strong warning sign that something should be verified independently