Yahoo Finance API

Our Yahoo Finance API gives you programmatic access to Yahoo Finance data that isn't available through any official API. Get data on stock quotes, historical prices, price targets, earnings dates, analyst recommendations, dividends, fund data, and more. And the best part? You can try the Yahoo Finance API entirely for free, no credit card required.

POWERING THE WORLD'S TOP DATA-DRIVEN TEAMS

Integrate our Yahoo Finance API

Access the Yahoo Finance API using Python, JavaScript, CLI, cURL, OpenAPI, or MCP. Choose your preferred option and start extracting Yahoo Finance data in minutes.

Python

Python

JavaScript

JavaScript

HTTP

HTTP

MCP

MCP

1from apify_client import ApifyClient
2
3# Initialize the ApifyClient with your Apify API token
4# Replace '<YOUR_API_TOKEN>' with your token.
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7# Prepare the Actor input
8run_input = {
9 "tickers": [
10 "MSFT",
11 "AMZN",
12 ],
13 "proxy": { "useApifyProxy": True },
14}
15
16# Run the Actor and wait for it to finish
17run = client.actor("canadesk/yahoo-finance").call(run_input=run_input)
18
19# Fetch and print Actor results from the run's dataset (if there are any)
20print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
21for item in client.dataset(run["defaultDatasetId"]).iterate_items():
22 print(item)
23
24# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

Get data with Yahoo Finance API

Extract Yahoo Finance data by providing ticker symbols with your configured filters and parameters. The Yahoo Finance API returns structured JSON data with historical stock prices, company information, news articles, analyst recommendations, earnings dates and more.

Input

{
"delay": 3,
"proxy": {
"useApifyProxy": true
},
"period": "1y",
"process": "gh",
"tickers": [
"MSFT"
],
"interval": "1d",
"rounding": "max",
"storecsv": "no"
}

Output

[
{
"data": [
{
"low": "312.55394893846466",
"Date": "2023-10-05",
"high": "317.59611925564633",
"open": "316.7127353294032",
"close": "316.980712890625",
"volume": "16965600"
}
],
"type": "history",
"ticker": "MSFT"
}
]

How to use Yahoo Finance API

1Sign up for Apify account

Creating an account is quick and free — no credit card required. Your account gives you access to more than 5,000 scrapers and APIs.

Get started for free

2Get your Apify API token

Go to settings in the Apify console and navigate to the “API & Integrations” tab. There, create a new token and save it for later.


3Integrate Yahoo Finance API

Navigate to the Yahoo Finance API page and click on the API dropdown menu in the top right corner. In the dropdown menu, you can see API clients, API endpoints, and more.

Open Yahoo Finance API

4Get your Yahoo Finance data via API

Now, you can use the API and get the data you need from Yahoo Finance.

Why use Apify?

Never get blocked

Every plan (free included) comes with Apify Proxy, which is great for avoiding blocking and giving you access to geo-specific content.

Customers love us

We truly care about the satisfaction of our users and thanks to that we're one of the best-rated data extraction platforms on both G2 and Capterra.

Monitor your runs

With our latest monitoring features, you always have immediate access to valuable insights on the status of your web scraping tasks.

Export to various formats

Your datasets can be exported to any format that suits your data workflow, including Excel, CSV, JSON, XML, HTML table, JSONL, and RSS.

Integrate Apify to your workflow

You can integrate your Apify runs with platforms such as Zapier, Make, Keboola, Google Drive, or GitHub. Connect with practically any cloud service or web app.

Large developer community

Apify is built by developers, so you'll be in good hands if you have any technical questions. Our Discord server is always here to help!

Frequently asked questions

Yahoo Finance does not offer an official API for public use. However, we provide our own unofficial Yahoo Finance API that gets all the up-to-date financial data you need, serving as an alternative to access Yahoo Finance information programmatically for your projects and applications.

Yes, you can try our Yahoo Finance API for free! No credit card required, no strings attached. Just create an Apify account with free $5 monthly prepaid usage, get your API token, and start using the Yahoo Finance API.

Yahoo Finance API allows you to get data such as stock quotes with open/high/low/close prices, historical data with customizable periods and intervals, company information and profiles, analyst recommendations and price targets, earnings dates and schedules, fund and ETF data, dividend information, financial news articles, and volume data with formatted dates for comprehensive financial analysis.

Getting started with our Yahoo Finance API is easy — simply create a free Apify account, get your API token, and start using the Yahoo Finance API in Python, JavaScript, CLI, cURL, OpenAPI, or MCP.

Get started with Yahoo Finance API today

Get your first Yahoo Finance data in less than 5 minutes. No credit card required. No commitment. Cancel anytime.