# Cnbc Markets Ticker Scraper (`romy/cnbc-markets-ticker-scraper`) Actor

Get the market index ticker banner from Cnbc. Talks directly to CNBC's own mobile app API, no login needed. Split from the mature, published cnbc-all-in-one-api for a focused, single-purpose workflow.

- **URL**: https://apify.com/romy/cnbc-markets-ticker-scraper.md
- **Developed by:** [Romy](https://apify.com/romy) (community)
- **Categories:** News
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 ticker snapshot chargeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What does CNBC Markets Ticker Scraper do?

**CNBC Markets Ticker Scraper** fetches [CNBC](https://www.cnbc.com/)'s market index ticker banner — a DJIA / S\&P 500 / NASDAQ-style summary of index levels, points change, and percent change — and pushes it as a single dataset row.

It talks directly to the same internal GraphQL backend the CNBC mobile app uses (`webql.cnbcfm.com`), reverse-engineered by live capture against the real CNBC Android app — a real persisted-query operation (`marketsBanner`, exact hash captured live, never guessed). No CNBC account, no API key, no scraping setup. This is the markets-banner slice of [CNBC All-in-One API](https://apify.com/romy/cnbc-all-in-one-api), split out as its own focused Actor.

### Why use CNBC Markets Ticker Scraper?

- **Live index snapshot in one call** — no need to run the full parent Actor just to poll the market ticker
- **No account needed** — every request works fully anonymously
- **Use cases:** dashboards and status widgets, scheduled market-open/close snapshots, feeding a broader financial data pipeline, quick health checks before triggering heavier scrapes

### How to use CNBC Markets Ticker Scraper

1. (Optional) Leave the input empty to get the default "US" home-screen banner, or set `id` to a different banner preset and/or `securityCount` to change how many securities are returned.
2. Run the Actor.
3. The banner is pushed to the dataset as a single row.
4. Download the result as JSON, CSV, or Excel from the Output tab.

### Input

| Field           | Type    | Description                                                                                                                            |
| --------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `id`            | integer | Banner preset id. Default `100769431` — the "US" banner shown on the CNBC app's home screen, the only preset confirmed live. Optional. |
| `securityCount` | integer | Number of ticker securities to return in the banner. Default `3`. Optional.                                                            |

Example (all fields optional — this is equivalent to no input at all):

```json
{
    "id": 100769431,
    "securityCount": 3
}
```

### Output

One dataset row per run:

```json
{
    "banner": [
        {
            "symbol": "DJIA",
            "name": "Dow Jones Industrial Average",
            "last": "41250.50",
            "change": "125.30",
            "changePct": "0.30"
        },
        { "symbol": ".SPX", "name": "S&P 500", "last": "5580.10", "change": "12.40", "changePct": "0.22" },
        { "symbol": ".IXIC", "name": "Nasdaq Composite", "last": "17800.75", "change": "-30.10", "changePct": "-0.17" }
    ]
}
```

Actual field names and count depend on the live CNBC response for the requested `id`/`securityCount`.

### Known limitations

- Only banner preset id `100769431` (the "US" home-screen banner) has been confirmed live. Other real banner ids likely exist — e.g. per-region presets — but are not guaranteed to work.
- This Actor covers only `/markets`. For articles, news feeds, video, search, and other CNBC endpoints, see the parent [CNBC All-in-One API](https://apify.com/romy/cnbc-all-in-one-api).

### Pricing

Pay per event. Charged `ticker-snapshot` ($0.002 on the FREE plan) once per run. See the Actor's Pricing tab for current rates.

# Actor input Schema

## `id` (type: `integer`):

Selects which banner preset to fetch. 100769431 is the "US" banner shown on the CNBC app's home screen — the only preset id confirmed live. Other real banner ids likely exist (e.g. per-region presets) but were not confirmed.

## `securityCount` (type: `integer`):

Number of ticker securities to return in the banner.

## Actor input object example

```json
{
  "id": 100769431,
  "securityCount": 3
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("romy/cnbc-markets-ticker-scraper").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("romy/cnbc-markets-ticker-scraper").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 '{}' |
apify call romy/cnbc-markets-ticker-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,romy/cnbc-markets-ticker-scraper"
        }
    }
}
```

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/AEjZNaHfw76U2YQ8i/builds/AM3NnRdAByZ7RKATR/openapi.json
