# Convert a web page into clean markdown your model can read

Pass a page URL and get its content back as markdown, with headings as # lines, links as [text](url) and the markup, scripts and styles removed. The title, meta description and language come with it. Use it to put a page into a prompt, a RAG index or a notes folder without writing an HTML parser.

HTML page: https://www.routergrowth.com/tools/web-scraping/website-to-markdown
Part of: [Web search and scraping tools](https://www.routergrowth.com/tools/web-scraping.md)

## The call

[`web.scrape`](https://www.routergrowth.com/catalog/web.scrape): Clean markdown of a page or site for agent context.

Price on this network: $0.0056 per page. The exact quote is shown before every run.

## What a real run returned

Run on 2026-10-26: 1 records in 0.6 s for $0.0064. Personal fields are masked. One call on a Cloudflare Learning Center URL: 5,039 characters of markdown with 19 headings and 3 links; the rows are headings as the markdown carries them.

| level | heading |
|---|---|
| h2 | Learning Center |
| h5 | Learn about DDoS attacks |
| h5 | Learn about CDNs |

## How to do it

1. **Pick the page.** Use the exact URL. If it redirects, the markdown is of the page it lands on, as here.
2. **Call web.scrape.** Send the url. The response holds markdown, title, description, language and status_code.
3. **Trim the furniture.** Drop menu and footer lines you do not need, so the model reads the body.
4. **Chunk by heading.** Split on # lines to keep each section whole when you index or summarize it.

## Ask it like this

- Turn these ten documentation pages into markdown files and build a table of contents from their headings. (`web.scrape`)
- Search for three well cited guides on zero trust networking, convert each to markdown and compare them side by side. (`web.search`, `web.scrape`)

## Connect

MCP server: `https://api.routergrowth.com/mcp`

```bash
claude mcp add --transport http routergrowth https://api.routergrowth.com/mcp
```

```bash
npm install -g routergrowth && routergrowth setup
routergrowth run -c web.scrape -i '{"url": "https://www.cloudflare.com/learning/what-is-cloudflare/"}'
```

```bash
curl -X POST https://api.routergrowth.com/v1/run \
  -H "Authorization: Bearer $ROUTERGROWTH_API_KEY" \
  -d '{"capability": "web.scrape", "input": {"url": "https://www.cloudflare.com/learning/what-is-cloudflare/"}}'
```

## Worth knowing

- **One page, not a site.** Each call converts one URL. For a site, list its pages and run one call per page.
- **Images stay as links.** Images come through as markdown image links, not as files or descriptions of the picture.
- **Layout is flattened.** Columns, tabs and styling become plain reading order, so a visual grid reads as a sequence of blocks.

## Questions

### Is the output plain text or markdown?

Markdown: headings, lists, links and image links keep their markdown syntax.

### Does it strip navigation and footers?

Not always. Menu and footer text can come through; filter those lines before chunking.

### Does it work on pages that load content with JavaScript?

Yes. The page is rendered before it is converted, so text a public visitor sees is included.

### Can I convert a whole website at once?

Not in one call. Pass each URL; a sitemap or a site: search gives you the list.

## Related

- [Search the web from code and get citable sources back as JSON](https://www.routergrowth.com/tools/web-scraping/web-search-api.md)
- [Ground an agent in sources from the domains you trust](https://www.routergrowth.com/tools/web-scraping/web-search-api-for-llm.md)
- [Turn a public page into agent ready text with a single request](https://www.routergrowth.com/tools/web-scraping/api.md)
- [Scrape public pages from a Python script with one POST request](https://www.routergrowth.com/tools/web-scraping/api-python.md)
- [Get the latest headlines on a listed company from its name and ticker](https://www.routergrowth.com/tools/web-scraping/stock-news-api.md)
- [Pull news articles on any topic into your code as JSON](https://www.routergrowth.com/tools/web-scraping/news-api.md)
- [Fetch news articles into a Python script with one POST](https://www.routergrowth.com/tools/web-scraping/news-api-python.md)
- [Get the articles Google News lists for a query, in one API call](https://www.routergrowth.com/tools/web-scraping/google-news-api.md)
- [Read a public Amazon product page from your agent, with no scraper to maintain](https://www.routergrowth.com/tools/web-scraping/amazon.md)
