This is how to get market capitalization with Alpha Vantage API:
Market cap is part of the company overview dataset, which you can access using function=OVERVIEW
.
Other two parameters for the overview API URL are symbol
(the stock symbol, e.g. "AAPL") and apikey
(your Alpha Vantage API key).
The complete URL is:
https://www.alphavantage.co/query?function=OVERVIEW&symbol=IBM&apikey=demo
The API URL returns JSON format.
Market cap is under the key MarketCapitalization
.
The company overview also includes total number of shares (SharesOutstanding
key), which you can multiply by current share price to get market cap alternatively.