
Almost every serious investment process starts in a spreadsheet. You download a CSV, paste in some closing prices, build a few formulas, and it works. That’s not a bad thing – it’s a perfectly good way to start (it’s how most of us started). But manual processes have a quiet failure mode: they work beautifully for 5 tickers and fall apart at 500. The downloads eat an evening, a ticker changes its symbol, a split slips through unadjusted, and one day you realize you’re spending more time feeding the spreadsheet than doing research. That’s usually the moment people go looking for a stock API.
We’ve been making high-end market data accessible and affordable since 2014, and in that time I’ve watched thousands of people make this exact jump – from manual downloads to an automated, repeatable data process. The jump is smaller than it looks.
Let me explain.
What a stock API is (and what it isn’t)
A stock API is a documented HTTP endpoint that returns structured market data on demand. Your code sends a request (“give me daily prices for AAPL”) and gets back JSON – machine-readable data it can use directly. No browser, no downloads folder, no copy-paste.
Two words in that definition do the heavy lifting.
Structured means the data arrives in a consistent, predictable shape every single time. The script you write today parses the response you get next year.
Documented means the provider publishes exactly what each endpoint returns and treats that as a promise. The data does not silently change shape underneath you.
Compare that to the alternatives. Scraping a website means your process depends on a page layout nobody promised to keep – it breaks silently the day someone redesigns a template. Downloading files by hand means a human has to click, save, rename, and import, correctly, every single time. In a manual process, you are the integration layer.
You don’t scale. Software does.
How a stock API works (your first call takes minutes)
The mechanics are simpler than the phrase “API integration” makes them sound. Four ideas cover almost everything:
- REST over HTTPS. You request a URL, exactly like a browser does – you just get JSON back instead of a webpage.
- An API token. A key string that identifies your account, passed along with the request. It’s how the provider knows the request is yours.
- JSON responses. Structured data your language of choice (Python, R, JavaScript, even Excel these days) parses in one line.
- Date ranges and rate limits. You can ask for exactly the window of history you need, and every provider caps how many requests you can make per hour or day. Rate limits aren’t stinginess – they keep one runaway script from degrading the service for everyone.
Here’s a real first call – end-of-day prices for a ticker, using our API:
curl "https://api.tiingo.com/tiingo/daily/aapl/prices?token=YOUR_TOKEN"
Or in Python:
import requests
url = "https://api.tiingo.com/tiingo/daily/aapl/prices?token=YOUR_TOKEN"
prices = requests.get(url).json()
That returns a list of daily bars for the ticker – open, high, low, close, and volume – as JSON your code can work with immediately. Swap the ticker, loop over a list, write the results to a database, and you’ve replaced the download-and-paste ritual with a script that runs while you sleep. The end-of-day documentation covers date ranges and the full response format.
That’s it. That’s the whole trick. The first pull genuinely takes minutes – the interesting work is what you build on top of it.
What to look for when choosing a stock market data API
Not every provider fits every process. Six things worth checking before you commit:
- Coverage. Which assets and which geographies? If your universe is US equities and ETFs today but mutual funds or international markets tomorrow, pick for where you’re headed, not just where you are.
- History depth. Backtests need history across multiple market regimes, not just the last bull run. The further back the data goes, the more your out-of-sample tests are worth.
- Licensing and redistribution rights. If your work will ever leave your own laptop – a newsletter, a client dashboard, a product – you need data you’re licensed to use that way. Check this before you build, not after.
- Rate limits and the pricing model. Understand how cost scales with usage. Per-call metered pricing is workable at small scale but makes next month’s bill hard to predict; flat-rate pricing is easier to budget as you grow.
- Documentation quality. You’ll live in the docs your first week. Clear examples and fully documented responses make everything downstream easier.
- Vendor stability. An API is a dependency you’re building your process on. Ask how long the provider has been around and how they handle breaking changes.
Patterns that actually make it scale
Getting the first call working takes minutes. Making it a process you trust for years takes a little engineering – light engineering, but real. These five patterns are most of it.
Pull your universe on a schedule, not ad hoc
Don’t fetch data in the middle of your research whenever you happen to need it. Run one scheduled job – nightly, after the close – that pulls your entire symbol universe into a local store, and have your research code read from that store. This separates data collection from analysis, which is the real scaling unlock: failures happen at 2am in a log file you check over coffee, not mid-idea when you’re trying to think.
Cache locally and never refetch the same bars twice
Yesterday’s bar isn’t going to change (one caveat below), so store everything you pull – SQLite, Postgres, even flat files all work – and only request the dates you don’t already have. Your backtests run at local-disk speed instead of network speed, and you stay comfortably inside your rate limits.
Respect rate limits and back off politely
Know your plan’s limits and pace your requests below them. When a request fails, wait and retry with increasing delays (exponential backoff) instead of hammering the endpoint. A polite client isn’t just good manners – it’s a more reliable client, because it degrades gracefully instead of cascading one hiccup into a failed run.
Store both raw and adjusted prices
Raw prices are what actually printed on the tape. Adjusted prices fold in splits and dividends so return calculations work correctly across them. You want both – raw for “what happened that day,” adjusted for “what an investor actually earned.” Storing only one almost always leads to a painful re-download later.
Plan for corporate actions before they surprise you
Here’s the caveat from earlier: splits and dividends change adjusted history retroactively. When a new dividend lands, the entire adjusted series shifts. So treat adjusted history as refreshable, not immutable – periodically re-pull it rather than assuming it’s frozen. In my experience this is the single most common answer to “why doesn’t my backtest match anymore?”
None of this is exotic. One scheduled script, a local database, and a little politeness toward the rate limiter will carry a research process from 5 symbols to thousands.
Where Tiingo fits
Since you’re reading this on our blog, a word on where we fit (I’m biased, so I’ll stick to numbers).
Tiingo has been around since 2014, with no outside investors – we’re the oldest accessible retail market-data API still around. From the start, the question we’ve built around is “how much can we give and get away with it?” rather than “how much can we charge.” In practice, that means flat-rate pricing: no per-symbol metering, no surprise overage math. When your universe grows from 50 symbols to 5,000, your data cost stays a number you already know. That matters more than it sounds, because per-call anxiety quietly warps research – you start rationing requests instead of asking questions.
| Plan | Price | Unique symbols/month | Requests | Bandwidth |
|---|---|---|---|---|
| Starter | $0 | 500 | 50/hour, 1,000/day | 1GB/month |
| Power | $30/month ($300/year) | About 108,980 | 10,000/hour, 100,000/day | 40GB/month |
| Commercial | $50/month ($499/year) | About 108,980 | 10,000/hour, 100,000/day | 40GB/month |
The free Starter tier is a real tier, not a demo: 30+ years of price history and 5 years of fundamentals, which is enough to build and test the entire pipeline described above at $0. Power ($30/month, for individual non-commercial use) raises you to about 108,980 unique symbols a month (an oddly specific number, I know), 15+ years of fundamentals, and enough headroom – 10,000 requests an hour, 40GB a month – that the nightly-job pattern runs very comfortably. Commercial ($50/month) has the same technical limits plus a commercial-use license, for when your work leaves your own laptop. Full details are on the pricing page.
Underneath it all: 80,000+ assets across US equities, ETFs, mutual funds, and Chinese A-shares, with end-of-day history back to 1962 – that’s every market regime you’d realistically want to backtest. There’s also real-time equities via IEX, crypto across 150+ exchanges, 140+ forex pairs, and 70M+ news articles spanning 20+ years, all licensed and redistribution-friendly. The stock API product page has the full rundown.
And because an API is a dependency you build a process on, our Developer Program commits to at least one year’s notice before any breaking change. Your nightly job shouldn’t break because we redesigned something on a Tuesday.
The bottom line
Spreadsheets are a fine place to start – every process I respect started in one. But when maintaining the data starts crowding out the actual research, a stock API is the fix: one script, run nightly, feeding a local store your analysis can trust. Structured, documented, repeatable.
You can find out in an afternoon whether it’s for you. Grab a free API token at tiingo.com, point the curl command above at a ticker you care about, and watch the bars come back.
We’d love to see what you build.