Free SQL API for Stock Market Data
Free SQL API wey let you query 22 years of US equities, dividends, and fundamentals. You get 100 queries daily, and no credit card dey needed.
Free SQL API for stock market data dey exist, and this page dey document am. Free market data APIs dey everywhere. But API wey accept your own SQL, run am against 22 years of US equities history, and return result as JSON na different thing. Strasmore free tier na exactly that: 100 queries per day, na you write dem, and no credit card.
Free data APIs common. Free SQL no common.
Typical free data API dey give you fixed endpoints. One URL for each dataset, parameters wey vendor choose, and every question wey you ask must fit endpoint wey person don already build. Once your question cross two datasets, like “dividend growth for companies wey short interest fall,” you go download CSVs and join dem yourself.
SQL remove that limit. The query na the endpoint. Joins, window functions, aggregations, and date arithmetic run where the data dey. You download the answer instead of the raw material. Every panel for this blog work like that, and the SQL dey one click under each chart.
Wetin the warehouse hold
The queryable surface na ClickHouse warehouse of US market data. E get daily and minute price aggregates from 2003, dividends and splits, quarterly fundamentals, valuation ratios, short interest and short volume, IPOs, market news, plus options dataset with end-of-day greeks and implied volatility from 2014. The panels below run three real queries against am. Each one na query shape wey fixed-endpoint API dey struggle with.
Twenty-year dividend record fit come from one GROUP BY. Coca-Cola pay 1 per share across 2004 and 2.04 across 2025, and the 22 yearly rows for the years between dem draw the full history. For deeper single-name analysis, see Microsoft dividend record.
| year | total cash per share |
|---|---|
| 2004 | 1 |
| 2005 | 1.12 |
| 2006 | 1.24 |
| 2007 | 1.36 |
| 2008 | 1.52 |
| 2009 | 1.64 |
| 2010 | 1.76 |
| 2011 | 1.88 |
| 2012 | 1.53 |
| 2013 | 1.12 |
| 2014 | 1.22 |
| 2015 | 1.32 |
| 2016 | 1.4 |
| 2017 | 1.48 |
| 2018 | 1.56 |
| 2019 | 1.6 |
| 2020 | 1.64 |
| 2021 | 1.68 |
| 2022 | 1.76 |
| 2023 | 1.84 |
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 yearOptions volatility term structure, calculated in one pass. Na SPY average end-of-day implied volatility by expiry bucket, 11 buckets from the front of the curve reach beyond one year. The front bucket read 22.8% as of the latest session. This dataset, wey get greeks and implied volatility, dey paid tiers. The seven-day trial wey come with free account cover am fully.
| DTE bucket days | avg IV (%) |
|---|---|
| 0 | 22.8 |
| 30 | 18 |
| 60 | 21.5 |
| 90 | 28.5 |
| 120 | 23.8 |
| 150 | 17.6 |
| 180 | 22.1 |
| 210 | 19.3 |
| 270 | 21.8 |
| 300 | 18.4 |
| 360 | 22.1 |
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_daysValuation screen across the biggest names. Every company wey market cap pass $500 billion and get positive P/E, ranked by size. The biggest one, NVDA, dey trade at 28.6 times earnings as of the latest session.
| ticker | P/E ratio |
|---|---|
| NVDA | 28.6 |
| AAPL | 37.2 |
| GOOGL | 17.2 |
| GOOG | 17 |
| MSFT | 28.3 |
| AMZN | 20.6 |
| AVGO | 58 |
| META | 22.8 |
| TSLA | 390.8 |
| BRK.A | 17.3 |
| BRK.B | 17.3 |
| MU | 21.4 |
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 12Wetin the free tier include
The free account na real SQL surface with clear limits. Na these be the exact limits:
- 100 queries per day, written in SQL or plain English. The terminal translate English to SQL and show you the query before e run am.
- Two years of price history for free tier. The full 22 years open for paid tiers.
- Daily and minute aggregates, dividends, splits, fundamentals, ratios, short interest, IPOs, and news dey queryable for free. Tick-level trades and quotes, plus the greeks/IV dataset, na paid features.
- Every new account start with seven-day trial of Quotes tier. No card dey on file, and the trial unlock the full history plus the gated datasets while you evaluate.
- All access dey read-only through SQL gate. SELECT and WITH go run; nothing else go run.
No scraping-tier tricks. The limits above na the actual product configuration, and the gate apply dem the same way for browser session and API call.
Try am before you sign up
The keyless companion to the SQL surface na free demo API: catalog of fixed queries, no account needed, and each response carry the SQL wey produce am. E dey there so you, or your AI agent, fit see the data shapes with one curl before you decide whether the SQL tier worth giving email address. The catalog at https://ai.strasmore.com/api/demo/catalog list every key.
FAQ
Free API really dey accept SQL?
Yes. Free Strasmore account fit run up to 100 of your own SQL queries per day against the US equities warehouse. Access na read-only, with two years of history. No payment details dey involved.
Which SQL dialect e use?
ClickHouse SQL. Standard SELECT syntax with window functions, plus ClickHouse aggregate combinators. The blog panels also serve as worked examples, with the exact SQL wey you fit expand under each chart.
I fit use am without writing SQL?
Yes. The terminal accept plain-English questions, write the SQL for you, and show you the query before e run am. You fit edit the generated SQL, so e be quick way to learn the schema.
Wetin be the exact limits for free tier?
100 queries per day, two years of history, read-only access, while tick-level and greeks datasets remain for paid tiers. Seven-day full trial start when you sign up, and no card dey required.
Anything dey wey no need signup at all?
The demo API. Na catalog of fixed queries over the same warehouse, with open CORS and no key. E no accept custom SQL. Na instant evaluation and AI agents e dey support.
The panels above na stored queries wey anybody fit read. The same warehouse fit take questions wey you write yourself on the Strasmore terminal.