Skip to content

Fetching Company Profile

Since the service will act as a first “overview” of a company by showing public sentiment & theses it makes sense to also display a basic profile of the company. This will be basic stuff like ticker, name, price, description, etc.

For that I’ll use Financial Modeling Prep a public (and free - up to 250 requests per day - 07.04.2025) API that allows the backend to fetch basic company info. It’ll just fetch the API for said info and return it. Which results in the following response for the ticker AAPL:

{
"symbol": "AAPL",
"companyName": "Apple Inc.",
"image": "https://images.financialmodelingprep.com/symbol/AAPL.png",
"website": "https://www.apple.com",
"description": "Apple Inc. designs, manufactures, and markets smartphones...",
"price": 213.49,
"exchangeShortName": "NASDAQ",
"mktCap": 3207068129000,
"industry": "Consumer Electronics",
"dcf": 149.70178547238896,
"beta": 1.178
}

Note that the image key always returns a url which should technically lead to the company’s logo. It does this when there is no logo too in which case it will link to a 404 URL. I’ll therefore only include the URL in the data if the link returns a 200 status code

We’ll then also use the yahoo finance API to fetch some additional data about the stock that the FMP API doesn’t provide for free. I’ll get Forward PE, the mean analyst rating and I’ll use the yahoo calendar to extract the next earnings call date from the dataframe the API returns.