# Python and JavaScript SDKs

> Read the same five daily bars in either client. A limited price request reads one page.

Canonical URL: https://quantset.dev/docs/integrations/sdks
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.

Query **90,000+ symbols across 67 countries**, **36,000+ companies with standardized financial statements**, **127M+ SEC EDGAR XBRL facts**, and **4,899 ETF look-through holdings** in typed Pandas/Polars DataFrames, zero-dependency TypeScript/Edge runtimes, or pre-wired agent tools for **PydanticAI, LangGraph, CrewAI, Agno, AutoGen, Vercel AI SDK, and Mastra**.

    

**Explore every connector:** Looking for Claude/Cursor MCP, Google Sheets (`=QUANTSET()`), Excel Power Query, Notion, or FMP/yfinance migrations? Visit the top-level [QuantSet Integrations & Ecosystem Hub →](/integrations)

    

## 1. Python SDK (pip install quantset)

    

Works out of the box with zero signup via `mw_demo` on sample US, UK, Tokyo, India, ETF, S&P 500, and crypto tickers, or reads `QUANTSET_API_KEY` from your environment (250 free credits on signup):
    
```
pip install "quantset[pandas]"   # or: pip install "quantset[polars]" / pip install quantset
```

    
```
import quantset as qs

# 1. Batch quotes across New York, London, Tokyo & Crypto in 1 HTTP call
quotes_df = qs.quotes(["us:NVDA", "us:AAPL", "global:SHEL.L", "global:1301.T", "crypto:BTCUSDT"]).to_df()

# 2. Daily OHLCV + 3-way evidence-verified split & dividend adj_close
page = qs.prices("NVDA", limit=5)
for bar in page.data:
    print(bar["date"], bar["close"], bar["quote_currency"])

# 3. Reconciled discrete quarterly 10-Q/10-K statements + forward consensus EPS
inc_df = qs.income(["us:NVDA"], period="quarterly", limit_per_instrument=8).to_df()
est_df = qs.estimates("us:NVDA", metric="eps").to_df()
```

    

## 2. Python AI Agent Toolkits (quantset.tools)

    

`quantset>=0.1.8` ships **8 pre-wired, docstring-typed financial agent tools** (`quantset_quotes`, `quantset_price_history`, `quantset_company_context`, `quantset_financial_statements`, `quantset_estimates_and_earnings`, `quantset_etf_lookthrough`, `quantset_sec_ownership_and_segments`, and `quantset_screen_stocks`) ready for every major Python agent framework:

    

### PydanticAI, Google ADK, AutoGen & OpenAI Agents SDK (Zero Extra Dependencies)

    
```
from pydantic_ai import Agent
from quantset.tools import build_agent_functions

agent = Agent("openai:gpt-4o", tools=build_agent_functions())
result = agent.run_sync("Compare NVDA and AAPL trailing operating margins and top 13F holders.")
print(result.output)
```

    

### Agno (formerly Phidata — Drop-In Replacement for YFinanceTools)

    
```
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from quantset.tools import build_agent_functions

agent = Agent(model=OpenAIChat(id="gpt-4o"), tools=build_agent_functions(), markdown=True)
agent.print_response("Run a fundamental & ETF exposure teardown on us:NVDA and global:SHEL.L")
```

    

### LangChain & LangGraph (pip install "quantset[langchain]")

    
```
from langgraph.prebuilt import create_react_agent
from quantset.tools import langchain_tools

agent = create_react_agent("openai:gpt-4o", tools=langchain_tools())
out = agent.invoke({"messages": [("user", "Screen US stocks with ROIC > 20% and EV/FCF 

    

### CrewAI Multi-Agent Crews (pip install "quantset[crewai]")

    
```
from crewai import Agent
from quantset.tools import crewai_tools

analyst = Agent(
    role="Senior Equity Research Analyst",
    goal="Produce primary-source valuation & forensic teardowns",
    backstory="Institutional analyst grounded in SEC XBRL filings and N-PORT fund data.",
    tools=crewai_tools(),
)
```

    

## 3. TypeScript & JavaScript SDK (npm install quantset)

    

Zero-dependency ESM client built on standard `fetch`—runs on Node.js 20+, Bun, Deno, Cloudflare Workers, and Vercel Edge, and includes the `npx quantset init` machine setup CLI:
    
```
npm install quantset
```

    
```
import { Quantset } from "quantset";

const client = new Quantset(); // reads QUANTSET_API_KEY or starts immediately in mw_demo sandbox
const page = await client.prices("NVDA", { limit: 5 });
for (const bar of page.data) console.log(bar.date, bar.close, bar.quote_currency);

// One-call research context pack + async pagination
const ctx = await client.get("context", { ticker: "us:NVDA" });
for await (const slice of client.paginate("screener", { min_roic: 20, max_ev_to_fcf: 25, limit: 50 }, 2)) {
  console.log(slice.snapshot_id, slice.data.length);
}
```

    

## 4. Vercel AI SDK & Mastra Tools (quantset/tools)

    

Import `createQuantsetTools()` from `"quantset/tools"` to equip Next.js **Vercel AI SDK** routes (`generateText` / `streamText`), **Mastra** agents, or **LangChain.js** chains with zero extra wrapper packages:
    
```
import { generateText } from "ai";
import { openai } from "@ai-sdk/openai";
import { createQuantsetTools } from "quantset/tools";

const { text } = await generateText({
  model: openai("gpt-4o"),
  tools: createQuantsetTools(),
  prompt: "Unpack IVV top holdings and compare NVDA vs MSFT forward EPS estimates.",
});
```

    

Read [cursor pagination](/docs/guides/pagination) before assembling multiple pages, [price adjustments](/docs/guides/adjusted-close-splits-api) before comparing closes across corporate actions, and browse all connectors on the [Integrations Hub](/integrations).

---

## 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.
