# Premarket & After-Hours Stock Prices: Gaps Before the Open (`scrapemint/premarket-after-hours-prices`) Actor

Keyless US extended session prices. Scan a universe you define for the biggest premarket or after-hours gaps, or track a watchlist. Each row carries the price, the gap from the previous close, session volume, and the session high and low with the time each printed. Pay per row.

- **URL**: https://apify.com/scrapemint/premarket-after-hours-prices.md
- **Developed by:** [Ken M](https://apify.com/scrapemint) (community)
- **Categories:** Business, News
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$4.00 / 1,000 quote rows

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

## Premarket & After-Hours Stock Prices: Gaps Before the Open

The regular session is only half the trading day. Earnings land after the close and news lands before the open, so by 09:30 the move has already happened.

This reads the extended sessions: what a stock is trading at before the bell, how far it has gapped from the previous close, how much volume is behind that gap, and the high and low of the session with the time each printed. No key, no login, no proxy.

### What you get

| Field | Meaning |
| --- | --- |
| `symbol`, `companyName`, `sector`, `industry`, `marketCap` | The stock |
| `session` | `premarket` or `after_hours` |
| `sessionDate`, `isLiveSession`, `marketStatus` | Which session this is, and whether it is running right now |
| `lastPrice`, `change`, `percentChange`, `previousClose` | The gap |
| `direction`, `changeSource` | Which way it moved, and where the change came from |
| `sessionVolume` | Volume behind the move, the number that separates a real gap from a thin one |
| `sessionHigh`, `sessionHighTime`, `sessionLow`, `sessionLowTime`, `sessionRangePercent` | The session range |
| `regularSessionLast`, `regularSessionVolume`, `regularSessionPercentChange` | The regular session for context |

### Two modes

**Scan** builds a universe from your filters (price, volume, market cap, sector), checks the most active names in it, and ranks the results by the size of the gap. This is the morning gapper list. A `maxPrice` of 20 or so aims it at the small caps that move hardest.

**Watchlist** checks the symbols you name, in the session or sessions you pick.

`session: auto` follows the exchange clock: premarket before the bell, after-hours once the market has closed.

### Example input

```json
{
  "mode": "scan",
  "session": "auto",
  "minPrice": 1,
  "maxPrice": 50,
  "minVolume": 1000000,
  "universeSize": 40
}
```

Your own names, both sessions:

```json
{
  "mode": "watchlist",
  "symbols": ["NVDA", "TSLA", "SPY"],
  "session": "both"
}
```

### Three things worth knowing

**A scan is a universe scan, not a whole market scan.** The source publishes extended-session prices one symbol at a time and offers no market wide premarket list, so there is nothing to read that ranks every stock at 07:00. This checks the universe you define, ranked by the most recent regular session's volume, on the reasoning that the names carrying volume and news are the ones that gap. Raising `universeSize` reaches further down the list and costs one request per stock.

**The after-hours gap is computed, and only when it is sound.** The source publishes a bare price for the after-hours session, with no change and no previous close. That gap is therefore worked out here against the same day's regular session close, and rows carry `changeSource` so you can see which number came from the source and which was computed. Read the after-hours session in the middle of the next trading day and it still holds the previous evening's prices; rather than measure those against a moving intraday price and invent a gap, the row returns no percent and says why in `gapUnavailableReason`.

**A stock that did not trade is not a stock that was unchanged.** Symbols with no extended-session prints are skipped rather than reported flat, and they are never charged.

### Pricing

Pay per quote row, `$0.004`. The first 2 rows of every run are free. Symbols that did not trade in the session, unknown symbols, and note rows are never charged.

### Related actors

- **US Stock Market Movers & Screener** for the regular session
- **Stock Trading Halts: Why a Stock Is Halted and When It Resumes** for the names that froze on the way up
- **Stock Earnings Estimates** and **Stock Analyst Ratings** for the catalysts that cause the gaps

# Actor input Schema

## `mode` (type: `string`):

scan = check a universe you define and rank it by the size of the gap, the morning gapper list. watchlist = check only the symbols you name.

## `session` (type: `string`):

auto follows the exchange clock: premarket before the opening bell, after-hours once the market closes. Pick both to return a row for each.

## `symbols` (type: `array`):

Tickers to check, e.g. NVDA, TSLA, SPY. Required in watchlist mode, ignored in scan mode.

## `minPrice` (type: `integer`):

Scan mode. Drop stocks trading below this, which keeps sub-dollar names out of the list.

## `maxPrice` (type: `integer`):

Scan mode. 0 means no ceiling. A low ceiling focuses the scan on the small caps that gap hardest.

## `minVolume` (type: `integer`):

Scan mode. The universe is ranked by this, so it decides which stocks are worth a lookup.

## `minMarketCap` (type: `integer`):

Scan mode. 0 means no floor.

## `sectors` (type: `array`):

Scan mode. Keep only these sectors, e.g. Health Care, Technology. Matches on part of the name.

## `universeSize` (type: `integer`):

Scan mode. The most active stocks matching your filters are checked, one request each, so this is the main cost and speed lever.

## `minGapPercent` (type: `integer`):

Keep only stocks that moved at least this far from the previous close, in either direction. 0 returns everything that traded.

## `minSessionVolume` (type: `integer`):

Keep only stocks with at least this much volume in the extended session, which filters out gaps set by a handful of shares.

## `maxRows` (type: `integer`):

Cap on rows returned. Controls total cost.

## Actor input object example

```json
{
  "mode": "scan",
  "session": "auto",
  "symbols": [],
  "minPrice": 1,
  "maxPrice": 50,
  "minVolume": 1000000,
  "minMarketCap": 0,
  "sectors": [],
  "universeSize": 40,
  "minGapPercent": 0,
  "minSessionVolume": 0,
  "maxRows": 100
}
```

# 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 = {
    "minPrice": 1,
    "maxPrice": 50,
    "minVolume": 1000000,
    "universeSize": 40
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapemint/premarket-after-hours-prices").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 = {
    "minPrice": 1,
    "maxPrice": 50,
    "minVolume": 1000000,
    "universeSize": 40,
}

# Run the Actor and wait for it to finish
run = client.actor("scrapemint/premarket-after-hours-prices").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "minPrice": 1,
  "maxPrice": 50,
  "minVolume": 1000000,
  "universeSize": 40
}' |
apify call scrapemint/premarket-after-hours-prices --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapemint/premarket-after-hours-prices"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

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