# US Stock Market API | Real-Time Data | $2 / 1k (`fatihtahta/us-stock-market-api`) Actor

Get real-time stock data with the US Stock Market API. Fetch live prices, market caps, volumes, earnings, and analyst ratings for NASDAQ and NYSE tickers. Perfect for dashboards, fintech apps, trading models, and market research. Fast, reliable, and always up to date. $2 per 1,000 results.

- **URL**: https://apify.com/fatihtahta/us-stock-market-api.md
- **Developed by:** [Fatih Tahta](https://apify.com/fatihtahta) (community)
- **Categories:** Developer tools, Automation, Other
- **Stats:** 19 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

$1.99 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## US Stock Market API | Real-Time Data | $2 / 1k

### Overview

The **US Stock Market API** actor delivers real-time (typically within 20–30 seconds) intelligence for equities listed on the New York Stock Exchange and NASDAQ. Monitor price action, intraday highs and lows, market capitalization, volume trends, earnings, and analyst sentiment without managing data feeds yourself. Real-time visibility into the two most liquid US exchanges helps you track market-moving events the moment they happen and react with confidence. Automated scheduling keeps datasets fresh, while fully managed execution ensures consistent performance run after run.

### Why Use This Actor

- **Investment research** – Build timely dashboards, alerts, or trading tools with always-fresh metrics and corporate fundamentals.
- **Market intelligence** – Power analyst briefings and financial journalism with structured snapshots of companies and exchange-traded products.
- **Product development** – Enrich fintech apps, prototyping projects, or academic models with reliable, up-to-date price and fundamentals data.
- **Lead generation & partnerships** – Surface companies within specific sectors or market cap ranges to support outreach programs.
- **Directory building** – Maintain curated lists of equities, ETFs, and REITs enriched with descriptions, leadership, and earnings calendars.

### Input Parameters

| Parameter | Type | Description | Default |
| --- | --- | --- | --- |
| `tickers` | array of strings | One or more symbols for stocks, ETFs, or REITs listed on NASDAQ or NYSE. Symbols are case-insensitive. | `["AAPL", "TSLA", "SPY", "pld", "vt"]` |
| `analystRating` | boolean | Toggle to enrich the dataset with analyst rating summaries and advisories. | `true` |
| `earningReports` | boolean | Toggle to include recent and upcoming earnings report details. | `true` |

### Example Input

```json
{
  "tickers": ["AAPL", "TSLA", "SPY"],
  "analystRating": true,
  "earningReports": true
}
```

### Example Output

**Stock instrument**

```json
{
  "symbol": "AAPL",
  "name": "Apple Inc. Common Stock",
  "simpleName": "Apple",
  "description": "Apple, Inc. engages in the design, manufacture, and sale of smartphones, personal computers, tablets, wearables and accessories, and other varieties of related services...",
  "sector": "Electronic Technology",
  "industry": "Telecommunications Equipment",
  "headquartersCity": "Cupertino",
  "headquartersState": "California",
  "ceo": "Timothy Donald Cook",
  "yearFounded": 1976,
  "marketDate": "2025-11-10",
  "open": 269.01,
  "high": 273.73,
  "low": 267.455,
  "volume": 27632823,
  "averageVolume": 53614722.1,
  "marketCap": 3975147127999.9995,
  "peRatio": 35.963831,
  "dividendYield": 0.379931,
  "price": 269.02,
  "previousClose": 268.47,
  "instrumentType": "stock",
  "ratingsSummary": {
    "num_buy_ratings": 31,
    "num_hold_ratings": 17,
    "num_sell_ratings": 4
  },
  "ratingsDetails": [
    {
      "published_at": "2025-11-01T06:43:46Z",
      "type": "buy",
      "text": "Apple offers an expansive ecosystem of tightly integrated hardware, software, and services..."
    }
  ],
  "earnings": [
    {
      "year": 2025,
      "quarter": 1,
      "estimateEps": 2.34,
      "actualEps": 2.4,
      "reportDate": "2025-01-30",
      "reportTiming": "pm",
      "callDatetime": "2025-01-30T22:00:00Z",
      "callReplayUrl": "http://mmm.wallstreethorizon.com/u.asp?u=174639"
    }
  ]
}
```

- `symbol`, `name`, `simpleName` – Company identifiers used for display and cross-referencing.
- `description`, `sector`, `industry` – Business overview and classification for context.
- `marketDate`, `open`, `high`, `low`, `price`, `previousClose`, `volume` – Real-time trading data points captured during the run.
- `averageVolume`, `marketCap`, `peRatio`, `dividendYield` – Market statistics to evaluate liquidity and valuation.
- `ratingsSummary`, `ratingsDetails` – Analyst sentiment counts and excerpts when `analystRating` is enabled.
- `earnings` – Historical and upcoming earnings information when `earningReports` is enabled.

**Fund / ETF instrument**

```json
{
  "symbol": "SPY",
  "name": "SPDR S&P 500 ETF Trust",
  "simpleName": "SPDR S&P 500 ETF",
  "description": "SPY tracks a market cap-weighted index of US large- and mid-cap stocks selected by the S&P Committee.",
  "sector": "Miscellaneous",
  "industry": "Investment Trusts Or Mutual Funds",
  "marketDate": "2025-11-10",
  "open": 677.24,
  "high": 682.08,
  "low": 675.03,
  "volume": 57628846,
  "averageVolume": 76971205.4,
  "marketCap": 704853162031.98,
  "peRatio": 28.696999,
  "dividendYield": 1.1023,
  "price": 681.655,
  "previousClose": 670.97,
  "instrumentType": "etp",
  "etpDetails": {
    "aum": 693688838064,
    "secYield": 1.04,
    "expenseRatio": 0.0945,
    "prospectusUrl": "https://viewer.saytechnologies.com/cusips/78462F103",
    "quarterEndPerformance": {
      "market": {
        "1Y": 17.51364,
        "5Y": 16.37364
      }
    },
    "holdings": [
      {
        "name": "NVIDIA",
        "symbol": "NVDA",
        "weight": 8
      }
    ]
  },
  "ratingsSummary": null,
  "ratingsDetails": [],
  "earnings": []
}
```

- `instrumentType` – Differentiates equities (`stock`) from exchange-traded products (`etp`).
- `etpDetails` – Fund-specific enrichment covering assets under management, yields, expenses, and performance snapshots.
- `holdings` – Sample of underlying securities with weights for quick portfolio insight.
- Empty `ratingsSummary`, `ratingsDetails`, or `earnings` arrays show that certain enrichments may not apply to funds.

### Notes & Limitations

- Data is refreshed in real time, yet individual quotes may trail the live exchange feed by 20–30 seconds.
- Use this actor in accordance with the applicable terms of service and legal requirements for the data you collect.

### Support

Questions or custom needs? Open an issue on the **Issues** tab of the actor page in Apify Console and it will be resolved around the clock.

Happy Scraping,

- Fatih

# Actor input Schema

## `tickers` (type: `array`):

Enter tickers for stocks, ETFs or REITs listed on NASDAQ or NYSE.

## `analystRating` (type: `boolean`):

When enabled, the actor includes analyst rating summaries and advisories in the output.

## `earningReports` (type: `boolean`):

When enabled, the actor includes earnings data in the output.

## Actor input object example

```json
{
  "tickers": [
    "AAPL",
    "TSLA",
    "SPY",
    "pld",
    "vt"
  ],
  "analystRating": true,
  "earningReports": true
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "tickers": [
        "AAPL",
        "TSLA",
        "SPY",
        "pld",
        "vt"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("fatihtahta/us-stock-market-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "tickers": [
        "AAPL",
        "TSLA",
        "SPY",
        "pld",
        "vt",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("fatihtahta/us-stock-market-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "tickers": [
    "AAPL",
    "TSLA",
    "SPY",
    "pld",
    "vt"
  ]
}' |
apify call fatihtahta/us-stock-market-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=fatihtahta/us-stock-market-api",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/MmiWKTRUVw50qKibk/builds/B7fUWnmSBFrICQ4l7/openapi.json
