# Turn one web page into records, each with the sentence that proves it

Give web.extract a page URL and a template (press release, leadership page, official bio, org chart or job posting) and get structured records back. Each record carries the sentence on the page that supports it, the page date and the source URL, so a person or an agent can check any value against the page.

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

## The call

[`web.extract`](https://www.routergrowth.com/catalog/web.extract): One page in, dated records out: a leadership page, an official bio, an org chart, a press release or a job listing extracted against a template (or your own JSON schema), each record with the sentence on the page that supports it, the page date and the source URL. Watch-friendly: records key on the person or posting, so a weekly refresh reports who joined, left or changed title.

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

## What a real run returned

Run on 2026-11-02: 3 records in 4.3 s for $0.032. Personal fields are masked. Press release template on a Cloudflare acquisition announcement: three records with the supporting sentence and page date 2025-11-17; the acquisition is labelled contract, and event_date came back empty.

| event_type | name | title | organization | counterparty |
|---|---|---|---|---|
| contract | Cloudflare | N/A | Cloudflare, Inc. | Replicate |
| mention | Ma*** | co-founder and CEO | Cloudflare |  |
| mention | Be*** | co-founder and CEO | Replicate |  |

## How to do it

1. **Name the page type.** Pick the template closest to the page: press_release, leadership_page, official_bio, org_chart or job_posting. The template decides the record shape.
2. **Send the URL.** Call web.extract with url and template. Add prompt if the page needs extra guidance, such as which section matters.
3. **Check the evidence.** Read evidence_text on each record. It is the sentence the value came from, quoted from the page.
4. **Clean the empties.** Some fields come back blank or as N/A when the page does not state them. Treat both as unknown.

## Ask it like this

- Read this press release and tell me who the deal is with, quoting the sentence that says so. (`web.extract`)
- Find the latest funding announcement from this company, then extract the parties and the date from it. (`web.search`, `web.extract`)
- Extract the leadership page of each company in this list and put the titles in a table. (`web.extract`)

## 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.extract -i '{"url": "https://www.cloudflare.com/press/press-releases/2025/cloudflare-to-acquire-replicate-to-build-the-most-seamless-ai-cloud-for-developers/", "template": "press_release"}'
```

```bash
curl -X POST https://api.routergrowth.com/v1/run \
  -H "Authorization: Bearer $ROUTERGROWTH_API_KEY" \
  -d '{"capability": "web.extract", "input": {"url": "https://www.cloudflare.com/press/press-releases/2025/cloudflare-to-acquire-replicate-to-build-the-most-seamless-ai-cloud-for-developers/", "template": "press_release"}}'
```

## Worth knowing

- **Evidence comes with every record.** evidence_text holds the sentence behind the record and source_url the page, so a wrong read is quick to spot.
- **Labels are the template's.** event_type is the template's closest fit, not the page's word. In the example an acquisition reads as contract, so check the sentence before you rely on the label.
- **One page per call.** It does not crawl a site or follow links. To cover a section, list the URLs and run one call for each.

## Questions

### Do I have to write selectors?

No. You send a URL and a template or a JSON schema; there are no CSS selectors or XPath to keep up.

### Can I define my own fields?

Yes. Pass schema instead of template, with the list under a records array.

### Am I charged if nothing is extracted?

A no match is not billed. The call is priced per page, and the price shows on this page.

### Does it return the raw page too?

In the example run the response held the page as markdown next to the records. For the page alone, web.scrape is the call.

### Can I see what changed on a page later?

Records key on the person or posting, so a watch on the same page reports who joined, left or changed title.

## Related

- [Search the web from code and get citable sources back as JSON](https://www.routergrowth.com/tools/web-scraping/web-search-api.md)
- [Pull news articles on any topic into your code as JSON](https://www.routergrowth.com/tools/web-scraping/news-api.md)
- [Name your spreadsheet columns, then fill them from any web page](https://www.routergrowth.com/tools/web-scraping/website-to-excel.md)
- [What a web search costs here: one quoted charge per search](https://www.routergrowth.com/tools/web-scraping/google-custom-search-api-price.md)
- [Search only the sites you choose and get web results as JSON](https://www.routergrowth.com/tools/web-scraping/google-custom-search-api.md)
- [Convert a web page into clean markdown your model can read](https://www.routergrowth.com/tools/web-scraping/website-to-markdown.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)
- [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)
