Call the SEC API from Python, JavaScript and agent frameworks
There's no SDK to install: the REST API is plain JSON over HTTPS and the MCP server speaks the standard protocol, so the clients you already use work. Every sample reads the key from QUANTISNOW_API_KEY; make one on the keys page.
curl
curl -X POST https://www.quantisnow.com/api/v1/insider-trades \
-H "Authorization: Bearer $QUANTISNOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "formType:4 AND transactionCodes:P AND purchased.valueUsd:>1000000", "size": 10, "sort": "purchased.valueUsd:desc"}'Python with requests
import os, requests
res = requests.post(
"https://www.quantisnow.com/api/v1/8-k/events",
headers={"Authorization": f"Bearer {os.environ['QUANTISNOW_API_KEY']}"},
json={"query": 'items.item:"4.01" AND filedAt:[2026-01-01 TO 2026-11-23]', "size": 50, "sort": "filedAt:desc"},
timeout=30,
)
res.raise_for_status()
for f in res.json()["data"]:
print(f["filedAt"][:10], f["ticker"], f["companyName"])Python with httpx, async
import asyncio, os, httpx
async def main():
headers = {"Authorization": f"Bearer {os.environ['QUANTISNOW_API_KEY']}"}
async with httpx.AsyncClient(base_url="https://www.quantisnow.com/api/v1", headers=headers, timeout=30) as client:
tickers = ["AAPL", "MSFT", "NVDA"]
pages = await asyncio.gather(*[
client.post("/financials", json={"query": f"ticker:{t} AND fiscalPeriod:FY", "size": 1, "sort": "fiscalYear:desc"})
for t in tickers
])
for t, r in zip(tickers, pages):
s = r.json()["data"][0]["incomeStatement"]
print(t, s["revenue"], s["netIncome"])
asyncio.run(main())Plans allow from 2 to 50 requests a second; keep parallel requests under yours, or a burst gets 429 rate_limited.
Python into pandas
import os, requests, pandas as pd
res = requests.post(
"https://www.quantisnow.com/api/v1/13f/holdings",
headers={"Authorization": f"Bearer {os.environ['QUANTISNOW_API_KEY']}"},
json={"query": "issuer.ticker:NVDA AND change:new", "size": 50, "sort": "valueUsd:desc"},
)
df = pd.json_normalize(res.json()["data"])
print(df[["manager.name", "shares", "valueUsd"]].head(10))JavaScript and TypeScript
const res = await fetch("https://www.quantisnow.com/api/v1/full-text", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.QUANTISNOW_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({ query: '"material weakness" AND "not effective"', formTypes: ["10-K"], size: 10 }),
});
const { total, data } = await res.json();
console.log(total.value, data.map((f) => f.ticker));Python client with paging and retries and typed JavaScript client go further.
OpenAI Agents SDK
import asyncio, os
from agents import Agent, Runner
from agents.mcp import MCPServerStreamableHttp
async def main():
async with MCPServerStreamableHttp(
name="quantisnow",
params={
"url": "https://www.quantisnow.com/api/v1/mcp",
"headers": {"Authorization": f"Bearer {os.environ['QUANTISNOW_API_KEY']}"},
},
) as sec:
agent = Agent(
name="Filings analyst",
instructions="Answer with SEC data from the quantisnow tools. Link each filing.",
mcp_servers=[sec],
)
result = await Runner.run(agent, "Which insiders bought more than $1M of stock this week?")
print(result.final_output)
asyncio.run(main())Claude API MCP connector
The Messages API can connect to the server itself, so your code makes one request and Claude calls the tools on Anthropic's side:
import os
import anthropic
client = anthropic.Anthropic()
response = client.beta.messages.create(
model="claude-opus-5-5",
max_tokens=16000,
betas=["mcp-client-2025-11-20"],
mcp_servers=[{
"type": "url",
"url": "https://www.quantisnow.com/api/v1/mcp",
"name": "quantisnow",
"authorization_token": os.environ["QUANTISNOW_API_KEY"],
}],
tools=[{"type": "mcp_toolset", "mcp_server_name": "quantisnow"}],
messages=[{"role": "user", "content": "Which companies changed auditors this year?"}],
)
for block in response.content:
if block.type == "text":
print(block.text)LangChain and LangGraph
import asyncio, os
from langchain_mcp_adapters.client import MultiServerMCPClient
from langgraph.prebuilt import create_react_agent
async def main():
client = MultiServerMCPClient({
"quantisnow": {
"transport": "streamable_http",
"url": "https://www.quantisnow.com/api/v1/mcp",
"headers": {"Authorization": f"Bearer {os.environ['QUANTISNOW_API_KEY']}"},
}
})
tools = await client.get_tools()
agent = create_react_agent(model, tools) # model: any LangChain chat model you already use
out = await agent.ainvoke({"messages": [("user", "Which funds opened a new Nvidia position last quarter?")]})
print(out["messages"][-1].content)
asyncio.run(main())Vercel AI SDK
import { createMCPClient } from "@ai-sdk/mcp";
import { generateText, stepCountIs } from "ai";
const mcp = await createMCPClient({
transport: {
type: "http",
url: "https://www.quantisnow.com/api/v1/mcp",
headers: { Authorization: "Bearer " + process.env.QUANTISNOW_API_KEY },
},
});
try {
const { text } = await generateText({
model, // any AI SDK model you already use
tools: await mcp.tools(),
stopWhen: stepCountIs(5),
prompt: "Find 8-Ks from this week where a CFO is leaving.",
});
console.log(text);
} finally {
await mcp.close();
}Every tool call the agent makes is one call against your plan, and listing tools is free. For the raw protocol, OAuth discovery and the MCP TypeScript SDK, see raw JSON-RPC.