# Cnbc Quotes Scraper (`romy/cnbc-quotes-scraper`) Actor

Get real-time quotes for stocks, indexes, bonds, crypto, and commodities 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-quotes-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 quote 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 Quotes Scraper do?

**CNBC Quotes Scraper** fetches real-time quotes, symbol/company search results, and per-symbol news from CNBC — one dataset row per symbol.

It talks directly to CNBC's own internal mobile-app APIs (reverse-engineered by live MITM capture against the real Android app), not the public website. `/quote` is a REST call to `quote.cnbc.com`; symbol search and per-symbol news are native GraphQL persisted-query calls to `webql.cnbcfm.com` — the exact same calls the CNBC app itself makes. No CNBC account, no API key, no scraping setup. This is the quotes-and-search 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 Quotes Scraper?

- **Real-time quotes for any asset class CNBC covers** — stocks, indexes, bonds, crypto, commodities/futures, and forex, all through the same endpoint
- **One batch call for quotes** — pass a whole symbol list and get it back split into one clean row per symbol
- **Symbol search** — resolve a company name or partial ticker (e.g. "TESLA") into real tradable symbols
- **Per-symbol news** — the same symbol-scoped news feed shown on CNBC's own quote page
- **No account needed** — every read request works fully anonymously
- **Use cases:** portfolio/watchlist dashboards, market-data pipelines, symbol lookup/autocomplete, news monitoring per ticker

### How it connects to the parent

[CNBC All-in-One API](https://apify.com/romy/cnbc-all-in-one-api) is a Standby-mode Actor exposing CNBC's full reverse-engineered API surface (news, video, TV schedule, markets banner, fundamentals, articles, and more) behind a single REST-style HTTP interface. This Actor takes only the `/quote`, `/quote-search`, and `/quote-news` endpoints from that surface and repackages them as a plain batch-input Actor that writes to an Apify dataset, for cases where you just want quote/search/news data on a schedule without running a Standby server yourself.

### Input

| Field           | Type     | Description                                                                                                              |
| --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------ |
| `symbols`       | string\[] | Quote lookup. One dataset row per symbol, fetched as a single batch call. See symbol formats below.                      |
| `searchSymbols` | string\[] | Symbol/company search. One dataset row per query, e.g. `"TESLA"` -> matching tickers.                                    |
| `newsSymbols`   | string\[] | Per-symbol news lookup. One dataset row per symbol.                                                                      |
| `newsSection`   | string   | Optional section id shared across all `newsSymbols` lookups. Confirmed real param; exact effect not fully characterized. |

At least one of `symbols`, `searchSymbols`, or `newsSymbols` is required.

**Symbol formats CNBC accepts:**

| Format            | Example   | Meaning                      |
| ----------------- | --------- | ---------------------------- |
| Plain ticker      | `AAPL`    | Stock                        |
| Index             | `.DJI`    | Dow Jones Industrial Average |
| Bond              | `US10Y`   | US 10-Year Treasury yield    |
| Crypto            | `BTC.CM=` | Bitcoin                      |
| Futures/commodity | `@CL.1`   | Crude oil front-month future |

Example input:

```json
{
    "symbols": ["AAPL", ".DJI", "US10Y", "BTC.CM=", "@CL.1"],
    "searchSymbols": ["TESLA"],
    "newsSymbols": [".DJI"]
}
```

### Output

One dataset row per symbol/query, tagged with a `type` field:

```json
{
    "type": "quote",
    "symbol": "AAPL",
    "data": {
        "symbol": "AAPL",
        "name": "Apple Inc.",
        "last": "313.36",
        "changetype": "DOWN",
        "change": "-3.47",
        "change_pct": "-1.10%",
        "exchange": "NASDAQ"
    }
}
```

```json
{
    "type": "quote-search",
    "symbol": "TESLA",
    "results": [{ "...": "matching symbol entries" }]
}
```

```json
{
    "type": "quote-news",
    "symbol": ".DJI",
    "news": [{ "...": "news article entries" }]
}
```

If CNBC's `/quote` response shape for a run doesn't match what's expected (a change on CNBC's side), the Actor pushes a single `{ "type": "quote", "symbols": [...], "data": <raw response> }` row instead of guessing at a split — check the logs for a warning when this happens.

### Known limitations

- Broader CNBC coverage (news feed, articles, video, TV schedule, markets banner, fundamentals) is available in the parent [CNBC All-in-One API](https://apify.com/romy/cnbc-all-in-one-api) — this Actor is intentionally narrow.
- `newsSection`'s exact filtering effect was captured live but not fully characterized against every possible value.
- CNBC's internal APIs are unofficial and undocumented; response shapes can change without notice.

### Pricing

Pay per event. Charged `quote` ($0.001 on the FREE plan) once per dataset row produced — one row per symbol/query across `symbols`, `searchSymbols`, and `newsSymbols`. See the Actor's Pricing tab for current rates.

# Actor input Schema

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

Real-time quote lookup, one dataset row per symbol. Accepts plain tickers (AAPL), indexes (.DJI), bonds (US10Y), crypto (BTC.CM=), and futures (@CL.1). Fetched as a single batch call.

## `searchSymbols` (type: `array`):

Symbol/company search, one dataset row per query (e.g. "TESLA" -> matching tickers).

## `newsSymbols` (type: `array`):

Per-symbol news lookup, one dataset row per symbol.

## `newsSection` (type: `string`):

Optional section id shared across all newsSymbols lookups. Confirmed real param; exact effect not fully characterized.

## Actor input object example

```json
{
  "symbols": [
    "AAPL",
    ".DJI",
    "US10Y"
  ],
  "searchSymbols": [
    "TESLA"
  ]
}
```

# 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 = {
    "symbols": [
        "AAPL",
        ".DJI",
        "US10Y"
    ],
    "searchSymbols": [
        "TESLA"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("romy/cnbc-quotes-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 = {
    "symbols": [
        "AAPL",
        ".DJI",
        "US10Y",
    ],
    "searchSymbols": ["TESLA"],
}

# Run the Actor and wait for it to finish
run = client.actor("romy/cnbc-quotes-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 '{
  "symbols": [
    "AAPL",
    ".DJI",
    "US10Y"
  ],
  "searchSymbols": [
    "TESLA"
  ]
}' |
apify call romy/cnbc-quotes-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,romy/cnbc-quotes-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/9bMs8EGtqgSQm6kWs/builds/ZJBM4gqhqomoZ3OTJ/openapi.json
