Free stock market data API sources for AI agents: what we actually used

Updated on

Educational only, not investment advice.

This is a short list of free stock market data API sources for AI agents. It covers only the sources our own research notes ran on, what each one gave the agent, and where each one fell short. Sources we have not run are listed separately with their own description, not ours.

What we used in our own research notes

Between 2026-10-20 and 2026-10-21 an AI research agent (Claude Code) produced five research notes for this site using free data only. The table lists which free source each note used and what it pulled. Each row comes from the note's own method box and source list.

Research noteSEC EDGAR / XBRLFREDPricesOther
Microsoft DCF model 10-K filings for historicals, balance sheet and shares; the 8-K EX-99.1 press release for working capital lines 10-year Treasury yield (DGS10) as the risk-free rate; CPI-U (CPIAUCSL) Yahoo Finance chart data (unofficial): MSFT price and weekly MSFT and SPY history for beta Consensus and call guidance from the web, tagged [WEB], used only as cross-checks
Manhattan Associates comparable companies 10-K, 10-Q, DEF 14A peer group and 8-K filings; LTM figures from XBRL companyfacts None used Yahoo Finance chart data (unofficial) No web-sourced figures
NVIDIA Q2 FY2027 earnings review 8-K EX-99.1 and EX-99.2; 10-Q XBRL tags cross-checked against the release None used Yahoo Finance chart data (unofficial) One consensus source from the web, tagged [WEB]
SpaceX Q3 2026 earnings review 8-K EX-99.1 earnings release None used Yahoo Finance chart data (unofficial) Call remarks and consensus from news coverage, tagged [WEB]
Best S&P 500 stock each year backtest None used None used Yahoo Finance split- and dividend-adjusted prices (unofficial) Year-end S&P 500 membership from the open fja05680/sp500 dataset on GitHub

Three things stood out across the runs.

SEC EDGAR and XBRL

SEC EDGAR is the free source for what US-listed companies report. SEC says anyone can access and download EDGAR information for free, and its data.sec.gov APIs "do not require any authentication or API keys" (EDGAR APIs). The JSON APIs cover a company's filing history (submissions) and its XBRL financial data (companyconcept, companyfacts and frames).

Two rules matter before an agent calls it. Automated tools should declare a User-Agent with a name and contact email, and requests should stay inside SEC's fair-access guideline (Accessing EDGAR Data).

We cover the endpoints, a working Python script and the User-Agent setup in SEC EDGAR API in Python. For pulling the text of a 10-K (Risk Factors and MD&A) for an agent to read, see Read a 10-K with AI.

What our runs learned about it: XBRL tags do not cover everything. In the Manhattan Associates note, the tool found no debt XBRL tag for some companies and treated debt as zero, which the note flags as unverified. In the Microsoft note, the free tools did not normalize "other current assets" and some current-liability lines, so the agent took them from the press release attached to the 8-K.

FRED

FRED is the Federal Reserve Bank of St. Louis's economic data service. Its API lets programs retrieve economic data series, such as observations for a series, series search and release dates (FRED API).

It needs a key. FRED's documentation says "All web service requests require an API key to identify requests," and you have to sign in to a FRED account to request one (FRED API Keys).

Read the terms before you ship anything on it. Two lines from the FRED API Terms of Use matter most for an agent project:

How we used it: the Microsoft DCF took its risk-free rate from the 10-year Treasury yield series DGS10 and its inflation reference from CPI-U (CPIAUCSL). The note shows the observation date it used and how much the result moves with that rate.

Yahoo Finance (unofficial)

Yahoo Finance prices are the one source here without an official API. Our notes used Yahoo's chart data, which is the data behind its website's price charts. We did not find any official documentation or service terms for using that endpoint as an API, so treat it as something that can change or stop working without notice.

What our notes took from it: the latest close for each company (Microsoft, Manhattan Associates and its peers, NVIDIA, SpaceX), weekly price history for Microsoft's beta, and split- and dividend-adjusted daily and monthly prices for the S&P 500 backtest. Every note labels the price as "Yahoo Finance chart data (unofficial)" with the close date and the retrieval date.

What it could not give: history for many acquired or delisted companies. In the backtest, about 125 former index members had no Yahoo history, which is why the note publishes only the #1 stock for each year.

The backtest's index membership came from a different free source, the open fja05680/sp500 dataset, which describes itself as "Current and Historical Lists of S&P 500 components since 1996." It is a data file in a GitHub repository, not an API.

Other free sources we have not tested

These come up often in "free stock API" lists. None of them were used in our research notes. Each line below is the provider's own description, not our result.

What free data can't give you

Our notes ran into the same gaps each time.

For how we check an AI agent's research output, see How we test.

FAQ

Is there a free stock market data API that needs no key?

SEC's data.sec.gov APIs need no authentication or API key, and our research notes used them for filings and XBRL financials. FRED requires an API key. The Yahoo Finance chart data our notes used is unofficial, and we found no published terms for using it as an API.

Can free data give me analyst consensus estimates?

Not in our runs. Our research notes found no consensus estimates or forward multiples in free SEC and Yahoo data. The notes that show consensus took it from news coverage and tagged it as web-sourced.

Is this investment advice?

No. This page describes data sources and how our research notes used them. It does not recommend buying or selling any security.

Related on bests.one

Sources: EDGAR Application Programming Interfaces (APIs), Accessing EDGAR Data, FRED API Keys, FRED API Terms of Use, fja05680/sp500 on GitHub, Alpha Vantage API documentation, Twelve Data stock API. Checked on 2026-10-27.

Follow the tests