Strasmore Research
Learn Matt ConnorBy Matt Connor · data as of July 18, 2026 · refreshed weekly

Free SQL API for Stock Market Data

A free SQL API for stock market data: write real SQL against 22 years of US equities, dividends, and fundamentals. 100 queries a day, no credit card.

A free SQL API for stock market data exists, and this page documents it. Free market data APIs are everywhere; an API that accepts your own SQL, runs it against 22 years of US equities history, and returns the result as JSON is a different thing. Strasmore's free tier is exactly that: 100 queries a day, written by you, no credit card.

Free data APIs are common. Free SQL is not.

A typical free data API hands you fixed endpoints. One URL per dataset, parameters chosen by the vendor, and every question you ask has to fit an endpoint someone already built. The moment your question crosses two datasets ("dividend growth for companies whose short interest fell") you are downloading CSVs and joining them yourself.

SQL removes that ceiling. The query IS the endpoint. Joins, window functions, aggregations, and date arithmetic run where the data lives, and you download the answer instead of the raw material. Every panel on this blog works that way, and the SQL sits one click under each chart.

What the warehouse holds

The queryable surface is a ClickHouse warehouse of US market data: daily and minute price aggregates from 2003, dividends and splits, quarterly fundamentals, valuation ratios, short interest and short volume, IPOs, market news, and an options dataset with end-of-day greeks and implied volatility from 2014. The panels below run three real queries against it, each a shape a fixed-endpoint API struggles with.

A twenty-year dividend record in one GROUP BY. Coca-Cola paid 1 per share across 2004 and 2.04 across 2025, and the 22 yearly rows in between draw the whole history. For a deeper single-name treatment, see Microsoft's dividend record.

QueryKO: total cash dividends per share by year
The exact SQL behind every number
SELECT toYear(ex_dividend_date) AS year,
       round(sum(cash_amount), 2) AS total_cash_per_share
FROM global_markets.stocks_dividends
WHERE ticker = 'KO'
  AND cash_amount IS NOT NULL
  AND ex_dividend_date >= '2004-01-01'
  AND toYear(ex_dividend_date) < toYear(today())
GROUP BY year
ORDER BY year

The options volatility term structure, computed in one pass. Average end-of-day implied volatility for SPY by expiry bucket, 9 buckets from the front of the curve out past a year. The front bucket reads 26.4% as of the latest session. This dataset (greeks and implied volatility) sits in the paid tiers, and the seven-day trial that comes with a free account covers it in full.

QuerySPY implied volatility by days-to-expiry bucket, latest session
The exact SQL behind every number
SELECT least(floor(days_to_expiry / 30) * 30, 360) AS dte_bucket_days,
       round(avg(implied_volatility) * 100, 1) AS avg_iv_pct
FROM global_markets.options_greeks
WHERE underlying_symbol = 'SPY'
  AND date = (SELECT max(date) FROM global_markets.options_greeks)
  AND iv_converged
  AND days_to_expiry BETWEEN 1 AND 400
GROUP BY dte_bucket_days
ORDER BY dte_bucket_days

A valuation screen across the largest names. Every company above $500 billion in market cap with a positive P/E, ranked by size. The largest, NVDA, trades at 30.8 times earnings as of the latest session.

QueryP/E ratios of US companies above $500B market cap
The exact SQL behind every number
SELECT ticker,
       round(price_to_earnings, 1) AS pe_ratio
FROM global_markets.stocks_ratios
WHERE date = (SELECT max(date) FROM global_markets.stocks_ratios)
  AND market_cap > 5e11
  AND price_to_earnings > 0
  AND ticker NOT IN ('SPCX')
ORDER BY market_cap DESC
LIMIT 12

What the free tier includes

The free account is a real SQL surface with honest limits, stated here exactly:

  • 100 queries per day, written in SQL or plain English (the terminal translates English to SQL and shows you the query before it runs).
  • Two years of price history on the free tier; the full 22 years open on paid tiers.
  • Daily and minute aggregates, dividends, splits, fundamentals, ratios, short interest, IPOs, and news are all queryable on free. Tick-level trades and quotes, plus the greeks/IV dataset, are paid features.
  • Every new account starts with a seven-day trial of the Quotes tier, no card on file, which unlocks the full history and the gated datasets while you evaluate.
  • All access is read-only through a SQL gate. SELECT and WITH run; nothing else does.

No scraping-tier tricks: the limits above are the actual product configuration, and the gate applies them the same way to a browser session and an API call.

Try it before signing up

The keyless companion to the SQL surface is the free demo API: seven fixed queries, no account at all, each response carrying the SQL that produced it. It exists so you (or your AI agent) can see the data shapes in one curl before deciding whether the SQL tier is worth an email address. The catalog at https://ai.strasmore.com/api/demo/catalog lists every key.

FAQ

Is there really a free API that accepts SQL?

Yes. A free Strasmore account runs up to 100 of your own SQL queries a day against the US equities warehouse, read-only, with two years of history. No payment details are involved.

What SQL dialect does it use?

ClickHouse SQL. Standard SELECT syntax with window functions, plus ClickHouse's aggregate combinators. The blog's panels double as worked examples, with the exact SQL expandable under each chart.

Can I use it without writing SQL?

Yes. The terminal accepts plain-English questions, writes the SQL for you, and shows the query before running it. The generated SQL is editable, which is a fast way to learn the schema.

What are the free tier's exact limits?

100 queries a day, 2 years of history, read-only, and the tick-level and greeks datasets reserved for paid tiers. A 7-day full trial starts at signup with no card.

Is there anything with no signup at all?

The demo API. Seven fixed queries over the same warehouse, open CORS, no key. It does not accept custom SQL; it exists for instant evaluation and for AI agents.

The panels above are stored queries anyone can read; the same warehouse takes questions you write yourself on the Strasmore terminal.

#sql#api#market data#clickhouse#free tier