# Spreadsheets

> Pull QuantSet data into Google Sheets or Excel without writing an application.

Canonical URL: https://quantset.dev/docs/spreadsheets
Full LLM API Contract: https://api.quantset.dev/llms-full.txt

> ## For AI agents
> The QuantSet API is at https://api.quantset.dev. Send the key in the `X-API-Key` header. The sandbox key `mw_demo` needs no signup and reads the sample listings.
> No key yet? An agent can open an account on its own: https://api.quantset.dev/skill.md
> Connect an MCP client to https://api.quantset.dev/mcp. Client setup is at https://api.quantset.dev/agents.md.
> Start with https://api.quantset.dev/llms.txt or read the full reference at https://api.quantset.dev/llms-full.txt. The OpenAPI file is https://api.quantset.dev/openapi.json. Add `.md` to any docs URL to get that page as Markdown.

The same data, without writing an application. Read a CSV-enabled dataset in Google Sheets or Excel with one formula, the `=QUANTSET()` custom function, or Excel Power Query. Looking for ready-made DCF, 67-country portfolio, ETF look-through, and Notion templates? See the [Google Sheets, Excel & Notion Stock Market Templates Playbook →](/docs/guides/google-sheets-excel-notion-stock-templates)

          

## Google Sheets

          

For a CSV-enabled GET operation, add `format=csv` and pass a data-only key in `apikey`.

          

### One formula

          

Use a data-only key with screener access. Paste this formula into a cell to get up to 20 listings with a market cap of at least $10 billion.
          
            
```
=IMPORTDATA("https://api.quantset.dev/api/v1/screener?min_market_cap_b=10&limit=20&format=csv&apikey=YOUR_DATA_ONLY_KEY")
```

          
          

Try a daily price CSV with the sandbox key.
          
            
```
curl "https://api.quantset.dev/api/v1/prices?ticker=NVDA&limit=10&format=csv&apikey=mw_demo"
```

          

          

### Larger pulls with Apps Script

          

A sheet full of formulas gets slow. For a watchlist or a screen, one short script writes the rows straight into a tab. Add it under Extensions, Apps Script, then run it when the sheet opens or on a timer.
          
            
```
function refreshPrices() {
  const url = "https://api.quantset.dev/api/v1/prices?ticker=NVDA&limit=250&format=csv";
  const response = UrlFetchApp.fetch(url, {
    headers: { "X-API-Key": "mw_demo" },
    muteHttpExceptions: true,
  });
  if (response.getResponseCode() !== 200) throw new Error(response.getContentText());
  const rows = Utilities.parseCsv(response.getContentText());
  const book = SpreadsheetApp.getActiveSpreadsheet();
  const sheet = book.getSheetByName("Prices") || book.insertSheet("Prices");
  sheet.clearContents();
  sheet.getRange(1, 1, rows.length, rows[0].length).setValues(rows);
}
```

          

          

## Excel

          

Go to Data, Get Data, From Other Sources, Blank Query. Open the Advanced Editor and paste this. Keeping the address and the path apart lets Excel remember the connection, so it asks for permission once.
          
            
```
let
    Source = Csv.Document(
        Web.Contents("https://api.quantset.dev", [
            RelativePath = "api/v1/prices",
            Query = [
                ticker = "NVDA",
                format = "csv",
                limit = "250",
                apikey = "mw_demo"
            ]
        ]),
        [Delimiter = ",", Encoding = 65001, QuoteStyle = QuoteStyle.Csv]
    ),
    Rows = Table.PromoteHeaders(Source, [PromoteAllScalars = true])
in
    Rows
```

          
          

**Sharing the file?** Anyone who opens it can read the key inside the query. Ask for a separate key for shared files, so you can switch it off without touching your own.

---

## QuantSet Ecosystem & Integrations (https://quantset.dev/integrations)

- **MCP Clients & 7 Skills:** `npx quantset init` & `npx skills add quantset/skills` (Claude, Claude Code, Cursor, ChatGPT, Codex, Hermes, OpenClaw, Block Goose, Cline, Docker MCP Toolkit — `https://api.quantset.dev/mcp`)
- **Python SDK & Agent Frameworks:** `pip install "quantset[pandas]"` · `from quantset.tools import build_agent_functions, langchain_tools, crewai_tools` (PydanticAI, LangGraph, LangChain, CrewAI, Agno, AutoGen, Google ADK, OpenAI Agents SDK)
- **TypeScript SDK & Vercel AI / Mastra:** `npm install quantset` · `import { createQuantsetTools } from "quantset/tools"` (Node 20+, Bun, Deno, Cloudflare Workers, Vercel Edge)
- **Spreadsheets & Workspaces:** Google Sheets (`=QUANTSET()` & `=IMPORTDATA()`), Microsoft Excel Power Query (`?format=csv`), Notion MCP & n8n/Make webhooks (`https://quantset.dev/docs/guides/google-sheets-excel-notion-stock-templates`)
- **Drop-In Migrations & Machine Payments:** FMP `/stable/*` & `/v3/*` adapter (`https://quantset.dev/docs/switch/fmp`), `yfinance` migration (`https://quantset.dev/docs/switch/yfinance`), autonomous signup (`https://api.quantset.dev/skill.md`), and `x402` Base USDC.
