QVeris
Market Data Guide

Free Market Cap API
for Reliable Company Valuation

Choose a free market cap API by calculation inputs, timestamp quality, security coverage, request limits, and usage rights—not by a single headline number.

Hand-drawn free market cap API workflow showing ticker, price, shares, market cap, validation, and application output

TL;DR

Know the formula and the denominator

Equity market capitalization is a share price multiplied by the relevant shares outstanding. Confirm whether the endpoint uses a latest trade, official close, or delayed quote, and whether its denominator is basic shares, diluted shares, float, or a provider estimate. A plausible number can still represent the wrong valuation concept.

Match timestamps and corporate actions

Price and share count must represent compatible dates and the same split-adjustment basis. A live price multiplied by an old quarterly share count is an estimate, not a synchronized observation. Preserve both timestamps so consumers can decide whether the result is fresh enough for screening, reporting, or historical analysis.

Inspect coverage and usage rights

Check exchanges, countries, inactive listings, depositary receipts, multiple share classes, currencies, and identifier rules. Then review quota, caching, display, and redistribution terms. “Free” may describe the access tier without granting the rights or reliability needed for a public product.

Understand the market cap formula and fields

Start with a defined formula

The basic formula is simple: market capitalization equals price per share multiplied by total outstanding shares. The difficult part is choosing compatible inputs. An API may use the latest trade, previous close, an exchange official close, or a delayed quote. Its share count may be basic shares outstanding, diluted weighted-average shares, float, or a provider estimate. Those fields are not interchangeable.

Choose the correct share-count denominator

Basic shares outstanding usually describes issued shares currently held by investors, while diluted measures can incorporate instruments that may become common shares. The Alpha Vantage documentation lists basic and diluted quarterly shares as separate returned values. Float excludes closely held or otherwise restricted shares and is useful for tradability analysis, but it is not the standard denominator for total equity market capitalization. Weighted-average shares used in earnings-per-share calculations describe a reporting period rather than necessarily the share count at one point in time.

Handle share classes, identifiers, and currency

For companies with several listed share classes, decide whether the response is security-level capitalization or total company equity value. Multiplying each class by its own price and adding the results may be appropriate, but only if the classes and share counts are complete and not duplicated. Depositary receipts introduce another conversion ratio. Never assume that summing every ticker with a similar issuer name produces a valid company total.

Retain currency, exchange, symbol, permanent security identifier, price timestamp, share-count effective date, calculation timestamp, adjustment status, and source. For U.S. issuers, SEC EDGAR submissions and XBRL data can provide official filing identifiers and company facts that support reconciliation. These fields let downstream users explain why two providers disagree and prevent a USD result from being compared directly with an unconverted EUR or JPY result.

Keep market cap separate from enterprise value

Market cap is not enterprise value. Market cap measures the market value of common equity; enterprise value requires additional balance-sheet inputs and a declared treatment of debt, cash, preferred equity, and minority interests. If the application ranks takeover value or capital structure, a market-cap-only endpoint is insufficient.

Choose the right market-cap path

Use a returned value

Best for current watchlists, dashboards, and low-consequence enrichment when the provider documents its field and timestamp. It is the fastest path, but you inherit the provider's calculation method and update policy.

Calculate from components

Best when screening rules need one consistent formula. Store price and shares separately, align their dates, and apply corporate actions once. This route is easier to audit but gives your pipeline more responsibility.

Require point-in-time data

Best for backtests, historical rankings, and research that must avoid look-ahead bias. Current company profiles are not enough; require revision history and the date each input became publicly available.

Validate a free market cap API before use

CheckQuestionRisk
TimestampWhen were price and shares observed?Mixed dates distort value.
Security scopeOne listing, one class, or the whole company?Classes may be omitted or double counted.
QuotaIs the cap per minute, day, key, or endpoint?Large screeners can stop mid-run.
LicenseMay results be cached, displayed, or redistributed?Free access may not allow product use.
Corporate actionsAre price and shares adjusted consistently for stock splits and consolidations?A mismatched adjustment can multiply or divide value incorrectly.
CurrencyWhat is the listing currency, and is conversion explicit and dated?Cross-market rankings become incomparable.
IdentifiersCan symbol and exchange resolve to a stable security and issuer?Renames, reused symbols, and dual listings can join to the wrong company.
ProvenanceDoes the response expose source, effective date, and calculation method?Disagreements cannot be investigated or reproduced.

Run representative acceptance tests

Test a representative sample rather than one famous large-cap ticker. Include a recent IPO, a company with multiple share classes, a foreign or depositary listing, a security with a recent split, an inactive symbol, and a deliberately invalid identifier. Record the expected status for each case before the test so that a clean-looking response is not mistaken for a correct one.

Define acceptance thresholds by use case. A watchlist may tolerate delayed data with a visible timestamp; an end-of-day report may require the official close and a completed corporate-action cycle; a historical backtest needs point-in-time values that do not leak later share-count revisions. If the endpoint cannot document the required time basis, narrow the use case instead of hiding the uncertainty.

Reconcile disagreements at the input level

When two sources disagree, reconcile the inputs before comparing the final number. Align the as-of time, listing currency, price type, share class, split basis, and shares-effective date. Then calculate market cap independently from each source's components. This separates a genuine data disagreement from a difference in methodology. Use an absolute and percentage tolerance appropriate to the application, and route values outside it for review; do not automatically choose the larger or newer-looking result.

Test historical and operational fit

Current company-profile endpoints are convenient for dashboards but can be unsafe for historical research. Providers may refresh an old fiscal period with a later filing, change identifier mappings, or return today's share count beside an earlier price. SEC XBRL data retains filing facts with period and filing context, illustrating why a backtest needs point-in-time fundamentals, revision history, and an availability timestamp. “Fiscal period end” is not the same as “publicly available on.”

Also test authentication errors, rate-limit responses, timeouts, malformed symbols, partial payloads, and provider maintenance. The Alpha Vantage documentation identifies required API-key parameters and endpoint behavior. Keep keys in server-side secrets, log response status and retry decisions without credentials, and reject any dependency that cannot fail safely.

Build a reliable market cap integration

Build a traceable pipeline

Treat market cap as a derived record with lineage, not a loose number copied into a table. A durable pipeline separates security resolution, source retrieval, normalization, validation, publication, and monitoring so that each failure has a visible owner and recovery path.

  • Resolve identity: map symbol plus exchange to a permanent security and issuer ID. Keep symbol-history aliases because tickers can change, move exchanges, or be reused.
  • Store the raw response: retain an immutable copy or reproducible request reference before normalization. This preserves evidence when a provider later revises a field.
  • Store calculation inputs: keep price, shares, effective dates, currency, adjustment state, provider, and retrieval time alongside the returned or calculated market cap.
  • Normalize units and nulls: distinguish raw currency values from thousands, millions, B, or T. Treat unavailable, not applicable, and zero as separate states.
  • Apply corporate actions once: verify whether source fields are adjusted. Avoid applying a split factor to both an already adjusted price and an already adjusted share count.
  • Cache deliberately: refresh quotes more often than slowly changing share counts, but invalidate the derived value whenever either input changes. Preserve both timestamps.
  • Validate before publish: reject negative values, flag extreme day-over-day changes, and compare a sample against a second official or licensed source. Route exceptions to review rather than silently clipping them.
  • Handle quota and failures: use bounded retries with backoff, queue unfinished batches, expose stale-data status, and never convert missing responses to zero.

Monitor data quality, not only uptime

Monitor data quality separately from transport uptime. Useful signals include the proportion of requested securities with a valid result, age of price and share-count inputs, frequency of identifier misses, number of values outside reconciliation tolerance, retry volume, and quota consumption. Alert on a change from the system's own baseline rather than declaring a universal threshold. A 200 response with stale or mismatched inputs is a data-quality failure even though the HTTP request succeeded.

Expose provenance to downstream users. A screen, export, or agent response should be able to show the as-of time, currency, security scope, source, and whether the value was returned or calculated. This is especially important when market cap drives ranking cutoffs, eligibility rules, risk limits, or automated decisions. If provenance cannot travel with the number, keep the value out of high-consequence workflows.

Roll out in controlled batches

Start with a small, fixed ticker set and log the request, normalized record, validation decision, and displayed value. Once the pipeline can explain discrepancies, expand coverage in batches. For Python-specific retrieval patterns, see the free stock data API Python guide; for point-in-time research, use the separate stock data API for backtesting guide.

Use QVeris to inspect a company overview capability

QVeris helps AI agents discover and inspect external data capabilities before routing a request. For this workflow, the exact Company Overview Tool is the relevant starting point because its record describes company information, financial ratios, and key metrics for a requested equity symbol.

Inspect the Tool's required symbol, returned schema, provider identity, and documentation before using any market-cap field. Then apply the validation rules above. QVeris discovery does not prove that a field is synchronized, licensed for redistribution, or suitable for backtesting; confirm those points in the Alpha Vantage documentation and your acceptance tests.

The associated Alpha Vantage Provider Profile provides provider context. Choose this route for a current company overview and related fundamental metrics. Choose a dedicated shares-outstanding source or point-in-time fundamentals dataset when reconstructing market cap from dated inputs or preventing look-ahead bias.

FAQ

Is market cap the same as enterprise value?

No. Market cap is the market value of the equity represented by the selected share count. Enterprise value normally incorporates debt, cash, and other claims, so it needs additional balance-sheet inputs and explicit calculation rules. Do not rename a market-cap response “enterprise value” without those adjustments.

Can I calculate market cap myself?

Yes, when you have a compatible price and shares outstanding. Store the source fields and both timestamps, confirm split treatment, identify the relevant share classes, and preserve currency. A self-calculated value is often easier to audit, but it is only as reliable as its two inputs and identity mapping.

Is a free API suitable for production?

Sometimes. Quota, availability, coverage, update timing, support, caching rights, display rights, and redistribution terms must all match the workload. Monitor missing and stale records, keep a fallback or degradation policy, and do not assume that a free access tier grants commercial product rights.

References and next steps

Alpha Vantage documentation