APIYard
Back to APIs
FinanceAPI KeyFree tier

Finnhub

Access real-time stock quotes, fundamental data, earnings calendars, company news, and alternative data for 50,000+ securities.

Base URL

https://finnhub.io/api/v1
stocksearningsmarket newsfundamental datacrypto

Endpoints

GET/quote

Get real-time quote data for a stock symbol.

const response = await fetch("https://finnhub.io/api/v1/quote?symbol=AAPL&token=YOUR_API_KEY", {
  method: "GET",
  headers: {
  "Content-Type": "application/json",
  "X-API-Key": "YOUR_API_KEY"
  }
});

const data = await response.json();
console.log(data);

Response Preview

{
  "c": 189.30,
  "d": 2.15,
  "dp": 1.15,
  "h": 190.12,
  "l": 187.54,
  "o": 187.60,
  "pc": 187.15,
  "t": 1714564800
}
GET/company-news

Get latest news articles for a company.

const response = await fetch("https://finnhub.io/api/v1/company-news?symbol=AAPL&from=2024-05-01&to=2024-05-07&token=YOUR_API_KEY", {
  method: "GET",
  headers: {
  "Content-Type": "application/json",
  "X-API-Key": "YOUR_API_KEY"
  }
});

const data = await response.json();
console.log(data);

Response Preview

[
  {
    "category": "company news",
    "headline": "Apple Reports Record Q2 Earnings",
    "source": "Reuters",
    "summary": "Apple Inc. reported quarterly earnings that exceeded analyst expectations...",
    "datetime": 1714600000,
    "url": "https://reuters.com/..."
  }
]