# Name your spreadsheet columns, then fill them from any web page

Decide the columns first and write them as a JSON schema, with the list under a records array. web.extract reads the page and returns one object per row with those fields, plus the source URL. Save the records as CSV and open it in Excel or Sheets. The call returns JSON: it does not write a spreadsheet file for you.

HTML page: https://www.routergrowth.com/tools/web-scraping/website-to-excel
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: 4 records in 2.3 s for $0.032. Personal fields are masked. A five-column schema on Linear's pricing page gave four records, one per plan; each also got source_url and an empty source_date, and key_feature held one line per plan, not the full list.

| plan | price | billing_period | members_limit |
|---|---|---|---|
| Free | $0 | Free for everyone | Unlimited |
| Basic | $10 per user/month | Billed yearly | Unlimited |
| Enterprise | Custom | Annual billing only | Unlimited |

## How to do it

1. **List your columns.** Each column in the sheet becomes one property under records.items in the schema. Strings are the safe type when a page mixes text and numbers.
2. **Say what a row is.** Use prompt for the rule, such as one record per pricing plan. It decides how many rows you get.
3. **Call web.extract.** Send url, schema and prompt. The rows are in result.records.
4. **Write the CSV.** Convert result.records to CSV in your script, or ask your agent to save it, then open the file in Excel.
5. **Check a few rows.** Compare the sheet with the page. source_url on each row shows where it came from.

## Ask it like this

- Pull the plans and prices from these five competitors' pricing pages into one CSV with one row per plan. (`web.extract`)
- Extract the speakers' companies and session topics from this event page and save them as a spreadsheet. (`web.extract`)
- Find the pricing pages of the top three tools in this category, extract each plan and give me a comparison sheet. (`web.search`, `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://linear.app/pricing", "schema": {"type": "object", "properties": {"records": {"type": "array", "items": {"type": "object", "properties": {"plan": {"type": "string"}, "price": {"type": "string"}, "billing_period": {"type": "string"}, "members_limit": {"type": "string"}, "key_feature": {"type": "string"}}}}}}, "prompt": "One record per pricing plan on the page."}'
```

```bash
curl -X POST https://api.routergrowth.com/v1/run \
  -H "Authorization: Bearer $ROUTERGROWTH_API_KEY" \
  -d '{"capability": "web.extract", "input": {"url": "https://linear.app/pricing", "schema": {"type": "object", "properties": {"records": {"type": "array", "items": {"type": "object", "properties": {"plan": {"type": "string"}, "price": {"type": "string"}, "billing_period": {"type": "string"}, "members_limit": {"type": "string"}, "key_feature": {"type": "string"}}}}}}, "prompt": "One record per pricing plan on the page."}}'
```

## Worth knowing

- **The schema is the spreadsheet.** Field names become column headers, so name them as you want them to read in the sheet. source_url and source_date are added to every row.
- **One field holds one value.** A single string column gets a single value. key_feature returned one line per plan in the example; ask for an array or several columns if you need the whole list.
- **Numbers can arrive as text.** A price like $10 per user/month stays text. Ask for separate amount and unit fields, or split the column in Excel.

## Questions

### Do I get an .xlsx file?

No. The call returns JSON records; turning them into CSV or .xlsx is one step in your script or agent.

### Can it pull a table across many pages?

One call reads one page. For paged tables, run it on each page URL and join the rows.

### What if the page has no date?

source_date stays empty, as it did on the pricing page in the example.

### How many rows can one page give?

As many as the extractor finds in that page; the example returned four because the page has four plans. The call is billed per page, not per row.

## 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)
- [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)
- [Turn one web page into records, each with the sentence that proves it](https://www.routergrowth.com/tools/web-scraping/extract-data-from-website.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)
