Skip to content
--:--:--LOCAL ·--:--UTC
    US EQUITIESLAST CLOSE
    AAPL$344.63-1.23%
    MSFT$521.91-1.55%
    GOOGL$279.84-1.40%
    AMZN$240.35-1.41%
    NVDA$204.64-4.22%
    META$614.99-1.53%
    TSLA$399.81-0.87%
    NFLX$62.08+0.05%
    BRK.B$542.49+0.10%
    AVGO$326.08-5.48%
    DIS$110.94+0.03%
    SBUX$103.67-1.74%
    MCD$258.12+0.29%
    NKE$38.67+0.65%
    COST$1012.28+1.63%
    WMT$123.51+1.86%
    HD$329.20+0.07%
    KO$94.08+1.36%
    PG$161.57+0.61%
    ORCL$130.67-6.37%
    CRM$229.17-0.75%
    ADBE$250.23+0.85%
    AMD$504.80-10.88%
    INTC$65.76-28.58%
    QCOM$164.79-11.12%
    CSCO$104.51-3.76%
    IBM$257.81-0.18%
    UBER$65.25-0.75%
    ABNB$164.39-1.24%
    SHOP$157.49-5.63%
    PYPL$57.01+0.11%
    COIN$143.54-10.62%
    PLTR$184.11-6.27%
    HOOD$84.99-7.21%
    JPM$337.04-1.90%
    V$413.59+0.74%
    MA$638.01+0.36%
    BAC$50.01-2.21%
    GS$894.55-3.58%
    LLY$1417.54+3.19%
    UNH$406.97-0.96%
    JNJ$273.20-0.73%
    PFE$30.52+1.90%
    XOM$187.25+2.16%
    BA$171.55-0.64%
    BABA$98.04-1.51%
    TSM$406.13-5.95%
    US EQUITIESLAST CLOSE
    AAPL$344.63-1.23%
    MSFT$521.91-1.55%
    GOOGL$279.84-1.40%
    AMZN$240.35-1.41%
    NVDA$204.64-4.22%
    META$614.99-1.53%
    TSLA$399.81-0.87%
    NFLX$62.08+0.05%
    BRK.B$542.49+0.10%
    AVGO$326.08-5.48%
    DIS$110.94+0.03%
    SBUX$103.67-1.74%
    MCD$258.12+0.29%
    NKE$38.67+0.65%
    COST$1012.28+1.63%
    WMT$123.51+1.86%
    HD$329.20+0.07%
    KO$94.08+1.36%
    PG$161.57+0.61%
    ORCL$130.67-6.37%
    CRM$229.17-0.75%
    ADBE$250.23+0.85%
    AMD$504.80-10.88%
    INTC$65.76-28.58%
    QCOM$164.79-11.12%
    CSCO$104.51-3.76%
    IBM$257.81-0.18%
    UBER$65.25-0.75%
    ABNB$164.39-1.24%
    SHOP$157.49-5.63%
    PYPL$57.01+0.11%
    COIN$143.54-10.62%
    PLTR$184.11-6.27%
    HOOD$84.99-7.21%
    JPM$337.04-1.90%
    V$413.59+0.74%
    MA$638.01+0.36%
    BAC$50.01-2.21%
    GS$894.55-3.58%
    LLY$1417.54+3.19%
    UNH$406.97-0.96%
    JNJ$273.20-0.73%
    PFE$30.52+1.90%
    XOM$187.25+2.16%
    BA$171.55-0.64%
    BABA$98.04-1.51%
    TSM$406.13-5.95%
    Plug stock market data into your AI agent — one command: Get your free API key →
    LoginGet API Key

    Stock market data infrastructure

    Request company profiles with JavaScript

    Use server-side JavaScript fetch to load a company profile with a protected API key, timeout, and explicit exchange context.

    Documentation revised

    Keep the credential on the server

    This Node.js example uses built-in fetch and AbortSignal.timeout. Run it in a server environment with STOCKMARKET_API_KEY configured. A browser bundle would expose the key to visitors, so a public application should call its own server endpoint instead.

    const key = process.env.STOCKMARKET_API_KEY;
    if (!key) throw new Error("Set STOCKMARKET_API_KEY");
    const url = new URL("https://stockmarketapi.ai/api/v1/companies/AAPL");
    url.searchParams.set("exchange", "NASDAQ");
    const response = await fetch(url, {
      headers: { "X-API-Key": key },
      signal: AbortSignal.timeout(30000),
    });
    if (!response.ok) throw new Error(`API returned ${response.status}`);
    const company = await response.json();
    console.log({ ticker: company.ticker, exchange: company.exchange,
      hasPrices: company.has_price_data,
      latestFinancials: company.latest_financials_date });

    Render nullable fields honestly

    Check for null or absent profile values before displaying employees, website, or description. Do not turn an unknown headcount into zero. Use the returned ticker and exchange together when linking to other dataset requests.

    Fetch dependent datasets conditionally

    A profile response is not a complete company export. Check has_price_data and available reporting dates, then request prices or financials separately. If using profile_markdown_url, treat it as temporary and refresh the parent response when it expires.