# Cnbc News Feed Scraper (`romy/cnbc-news-feed-scraper`) Actor

Get news feed, trending, and breaking-news content 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-news-feed-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 $1.20 / 1,000 news item 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 News Feed Scraper do?

**CNBC News Feed Scraper** pulls CNBC's news section feeds, trending news/videos, breaking news alerts, special reports, and the "most popular" rail for an article — all in a single batch run — and pushes one self-describing row per feed to the dataset.

It talks directly to the same internal GraphQL backends the official [CNBC](https://www.cnbc.com/) Android app uses (`webql.cnbcfm.com`, the native app backend, plus `webql-redesign.cnbcfm.com`, the website backend, for the most-popular rail), reverse-engineered by live MITM capture against a real device — real Apollo-style persisted-query hashes captured live, never guessed. No CNBC account, no API key, no scraping setup. This is the news-feed slice of [CNBC All-in-One API](https://apify.com/romy/cnbc-all-in-one-api), split out as its own focused Actor covering `/news`, `/trending`, `/breaking-news`, `/special-reports`, and `/most-popular`.

### Why use CNBC News Feed Scraper?

- **Real, live CNBC data** — the same feeds the app's Home screen, Trending tab, and breaking-news banner show, straight from CNBC's own backend
- **One run, many feeds** — request any combination of section feeds, trending news/videos, breaking news, special reports, and a most-popular rail in a single call, each landing as its own clearly-labeled dataset row
- **No account needed** — every read here works fully anonymously, confirmed by inspecting real captured request headers (no auth token, no cookie)
- **Use cases:** news aggregation, market-moving-headline monitoring, media research, building a finance news dashboard

### Input

| Field                    | Type      | Description                                                                                                     |
| ------------------------ | --------- | --------------------------------------------------------------------------------------------------------------- |
| `sectionIds`             | integer\[] | CNBC numeric section ids for `/news`, e.g. `[105230142]` (the app's Home feed default). One dataset row per id. |
| `sectionCount`           | integer   | Items to fetch per section id. Default `30`.                                                                    |
| `trending`               | string    | `news` | `videos` | `both` — pull the trending feed(s).                                                       |
| `trendingCount`          | integer   | Trending news entries to fetch. Default `13`. News side only.                                                   |
| `trendingStartPeriod`    | string    | Trending videos time window. Default `2h`. Videos side only, no confirmed enum of other values.                 |
| `trendingSortBy`         | string    | Trending videos sort order. Default `engaged_minutes`. Videos side only.                                        |
| `includeBreakingNews`    | boolean   | Pull the current breaking-news alert(s). Default `false`.                                                       |
| `breakingNewsProduct`    | string    | Breaking news product scope. Default `web`.                                                                     |
| `includeSpecialReports`  | boolean   | Pull the current special reports list. Default `false`.                                                         |
| `specialReportsPageSize` | integer   | Special reports page size. Default `30`.                                                                        |
| `mostPopularArticleId`   | integer   | If set, also pulls the "most popular" rail shown on that article's page.                                        |

At least one of `sectionIds`, `trending`, `includeBreakingNews`, `includeSpecialReports`, `mostPopularArticleId` must be set, or the run fails fast with a clear error.

Example:

```json
{
    "sectionIds": [105230142],
    "trending": "both",
    "includeBreakingNews": true,
    "includeSpecialReports": true
}
```

### Output

One dataset row per requested feed, each labeled with a `type` field so the dataset stays self-describing even when mixing feed types in one run:

```json
{
    "type": "news",
    "sectionId": 105230142,
    "data": { "...": "CNBC's raw sectionsEntries payload" }
}
```

```json
{
    "type": "trending-news",
    "data": { "...": "CNBC's raw mostPopularEntries payload" }
}
```

Other rows: `{ "type": "trending-videos", "data": ... }`, `{ "type": "breaking-news", "data": ... }`, `{ "type": "special-reports", "data": ... }`, `{ "type": "most-popular", "articleId": ..., "data": ... }`.

### Known limitations

- `trendingStartPeriod` and `trendingSortBy` are passthrough values captured live from one real app session — there's no in-app UI to enumerate every valid option, so treat non-default values as best-effort.
- `mostPopularArticleId` is required to fetch the most-popular rail — its behavior when omitted was not confirmed live, so it isn't offered as an optional global rail here.
- Full article bodies, video assets, TV schedule, market quotes, and other CNBC endpoints are separate spin-off Actors — this one is feed-listing only. See [CNBC All-in-One API](https://apify.com/romy/cnbc-all-in-one-api) for the full endpoint set.

### Pricing

Pay per event. Charged `news-item` ($0.002 on the FREE plan) once per dataset row pushed — one per section, trending list, breaking-news pull, special-reports pull, or most-popular rail. See the Actor's Pricing tab for current rates.

# Actor input Schema

## `sectionIds` (type: `array`):

One or more CNBC numeric section ids, e.g. \[105230142] (the app's Home feed default). One dataset row is pushed per section id.

## `sectionCount` (type: `integer`):

How many entries to fetch per section id.

## `trending` (type: `string`):

Pull trending news, trending videos, or both.

## `trendingCount` (type: `integer`):

How many trending news entries to fetch. Only applies to the news side of the trending feed.

## `trendingStartPeriod` (type: `string`):

Only applies to the videos side of the trending feed. Captured live default: '2h'. No confirmed enum of other valid values.

## `trendingSortBy` (type: `string`):

Only applies to the videos side of the trending feed. Captured live default: 'engaged_minutes'.

## `includeBreakingNews` (type: `boolean`):

Pull the current breaking news alert(s).

## `breakingNewsProduct` (type: `string`):

Captured live default: 'web'.

## `includeSpecialReports` (type: `boolean`):

Pull the current special reports list.

## `specialReportsPageSize` (type: `integer`):

Number of special reports to return.

## `mostPopularArticleId` (type: `integer`):

If set, also pulls the "most popular" rail shown on that article's page.

## Actor input object example

```json
{
  "sectionIds": [
    105230142
  ],
  "sectionCount": 30,
  "trendingCount": 13,
  "trendingStartPeriod": "2h",
  "trendingSortBy": "engaged_minutes",
  "includeBreakingNews": false,
  "breakingNewsProduct": "web",
  "includeSpecialReports": false,
  "specialReportsPageSize": 30
}
```

# 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 = {
    "sectionIds": [
        105230142
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("romy/cnbc-news-feed-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 = { "sectionIds": [105230142] }

# Run the Actor and wait for it to finish
run = client.actor("romy/cnbc-news-feed-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 '{
  "sectionIds": [
    105230142
  ]
}' |
apify call romy/cnbc-news-feed-scraper --silent --output-dataset

```

## MCP server setup

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