# Cnbc Article Scraper (`romy/cnbc-article-scraper`) Actor

Get full article body text 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-article-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 article 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 Article Scraper do?

**CNBC Article Scraper** takes one or more [CNBC](https://www.cnbc.com/) article ids and pushes full article detail — id, type, brand/section, premium flag, source, and the full structured body content — one dataset row per article.

It talks directly to the same internal GraphQL backend the CNBC website's own front end uses (`webql-redesign.cnbcfm.com`), reverse-engineered by live MITM capture against the real CNBC Android app — a real Apollo-style GraphQL persisted query (`getArticleData`, exact hash captured live, never guessed). No CNBC account, no API key, no scraping setup. This is the article-detail 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 Article Scraper?

- **Full body text, not just a summary** — regular (non-premium) articles return their complete body content anonymously
- **No account needed** — every read request works fully anonymously, no CNBC login
- **Batch by id** — pass any number of article ids in one run, get one dataset row per article
- **Use cases:** news archiving, financial research pipelines, content aggregation, media monitoring, enriching an article-id feed (e.g. from [cnbc-news-feed-scraper](https://apify.com/romy/cnbc-all-in-one-api)) with full text

### How to use CNBC Article Scraper

1. Find CNBC article ids — from a CNBC article URL (the trailing numeric id), from [cnbc-all-in-one-api](https://apify.com/romy/cnbc-all-in-one-api)'s news-feed endpoints, or from a spin-off feed Actor.
2. Paste those ids into the `articleIds` input field.
3. Run the Actor. Each article's full detail is pushed to the dataset as it's fetched.
4. Download results as JSON, CSV, or Excel from the Output tab.

### Input

| Field        | Type      | Description                                                                                                           |
| ------------ | --------- | --------------------------------------------------------------------------------------------------------------------- |
| `articleIds` | integer\[] | **Required.** Numeric CNBC article ids (from a cnbc.com article URL, cnbc-news-feed-scraper, or cnbc-all-in-one-api). |

Example:

```json
{
    "articleIds": [108351154, 108350000]
}
```

### Output

One dataset row per article id:

```json
{
    "articleId": 108351154,
    "article": {
        "id": 108351154,
        "type": "cnbcnewsstory",
        "brand": "makeit",
        "premium": false,
        "section": { "id": 105444471, "color": null, "__typename": "franchise" },
        "sourceOrganization": [{ "id": 80000022, "name": "CNBC.com", "url": "https://www.cnbc.com/..." }],
        "body": {
            "isAuthenticated": false,
            "content": ["...structured body nodes (paragraphs, links, embeds) as returned by CNBC..."]
        }
    }
}
```

Real, live-verified sample from a non-premium article (`articleId: 108351154`) — `body.content` came back with 9 real structured content nodes including full paragraph text and embedded links.

### Known limitations

- **Premium articles are paywalled server-side.** Articles with `premium: true` (Investing Club / CNBC Pro content) come back with an empty `body.content` array when fetched anonymously — this is CNBC enforcing its paywall on the server, not a bug in this Actor, and there is no anonymous way around it. Regular (`premium: false`) articles — the large majority of CNBC's output — return full body text with no auth at all.
- This Actor covers only `/article`. For news feeds, search, market/quote data, 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 `article` ($0.002 on the FREE plan) once per article id successfully fetched. See the Actor's Pricing tab for current rates.

# Actor input Schema

## `articleIds` (type: `array`):

Numeric CNBC article ids (from cnbc-news-feed-scraper, cnbc-all-in-one-api, or a cnbc.com article URL).

## Actor input object example

```json
{
  "articleIds": [
    108351154
  ]
}
```

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

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

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

```

## MCP server setup

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