NewConnect Claude, Gemini, ChatGPT, and other AI agents to API Ninjas via our MCP server →

Market Cap API

The Market Cap API provides access to up-to-date market cap data for companies in all major exchanges.

Premium members get live market cap data, while free users receive the market cap at the close of the most recent completed trading session.

Online
(4.4)

From 8,733 users

2,100+

Applications using this API

API Status

Online - All Systems Operational

API Response Times

Average
P50
P75
P90
P95
384ms414ms433ms841ms1117ms

Didn't find what you were looking for? Suggest an improvement

https://api.api-ninjas.com/v1/marketcap

Returns the current market cap data for any given company ticker. Premium members get live market cap data, while free users receive the market cap at the close of the most recent completed trading session.

Parameters

  • ticker  required

    Stock ticker symbol (e.g., NVDA).

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

The /v1/marketcap endpoint returns a JSON object with the following fields, or an error if the request is unsuccessful.

  • ticker

    Stock ticker symbol (e.g., NVDA).

  • name

    Company name.

  • market_cap

    Market cap in the local currency of the stock exchange.

  • currency

    Currency code (e.g., USD).

  • updated

    Timestamp of the market cap data in Unix format (in seconds). For free users this is the close of the trading session the figure is from.

Live Demo

Live demo · no API key required
Query parameters
ticker

Get a free API key to get started — no credit card required.

Headers
X-Api-KeyLog in or sign up to get your API key
GET
https://api.api-ninjas.com/v1/marketcap?ticker=NVDA
Sample response
{
"ticker": "NVDA",
"name": "NVIDIA Corporation",
"market_cap": 3329211600000,
"currency": "USD",
"updated": 1729108801
}

Code Examples

curl -X GET "https://api.api-ninjas.com/v1/marketcap?ticker=AAPL" \ -H "X-Api-Key: YOUR_API_KEY"

If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.

Frequently Asked Questions

  • Yes, but you must have a premium subscription. Commercial use of the Market Cap API is not permitted on the free tier. See our pricing page to choose a plan that fits your needs.
  • Sign up for a free account to instantly get your API key, then pass it in the X-Api-Key header on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.
  • Your API requests will simply be denied once you hit your monthly quota — you will never be charged more than the plan you signed up for. To increase your quota, you can upgrade your plan any time on our pricing page.
  • The API responds with a standard HTTP status code and a JSON error message describing the problem. See our error codes reference for the full list of codes and how to resolve each one, or contact support if you need help.
  • Send a GET request to the /v1/marketcap endpoint with the required ticker parameter set to the stock symbol (e.g. NVDA or AAPL). You can pair it with the Ticker API to first resolve a company name into its symbol.
  • Each response is a JSON object containing ticker, name (company name), market_cap (in the exchange's local currency), currency (e.g. USD), and updated (a Unix timestamp in seconds). If the request is unsuccessful you'll receive an error instead.
  • The updated field gives the Unix timestamp of the returned data, and freshness depends on your plan: premium members get live market cap data while free users receive the market cap at the close of the most recent completed trading session (see the pricing page for plans). For real-time per-share quotes, see the Stock Price API.
  • It's ideal for ranking companies by size, building stock screeners, or tracking valuation changes across major global exchanges using the market_cap and currency fields. It pairs well with the ETF API and Stock Price API for broader financial dashboards.