# CNBC Scraper (`codingfrontend/cnbc-scraper`) Actor

Extract public CNBC article metadata, links, dates, authors, categories, and content from supplied pages.

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

## Pricing

from $3.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## CNBC Scraper

Collect complete publicly available CNBC articles for news monitoring, market research and media analysis. Start with an article URL, a section page, the home page or an official RSS feed. Feeds and section pages discover articles; each saved row contains the public article body.

### What you receive

Each article includes its headline, description, complete public text, authors and author links, categories, keywords, publication and update dates, image links and visible image context, canonical URL and word count when the source provides them. Publisher and public video metadata are included when present. Missing optional values are omitted or represented by empty arrays. Image links point to the original images.

The dataset contains articles only. The run summary reports saved counts, failed requests and source notices, with run times and source URLs in the key-value store. If an article is saved before a later request fails, the run keeps that article and reports partial completion. A run without any complete public articles reports failure. Subscriber pages and access challenges are not scraped.

### Start a run

1. Add public CNBC URLs in the input tab.
2. Choose the maximum number of articles; the default is 10.
3. Optionally set a publication date such as `2026-10-01` or `7 days`.
4. Enable **Only new articles** to skip URLs saved by earlier runs of this Actor.
5. Start the run, then download the dataset as JSON, CSV or Excel.

Example input:

```json
{
  "startUrls": [
    {
      "url": "https://www.cnbc.com/2026/10/06/treasury-yields-fed-fomc-minutes.html"
    }
  ],
  "maxArticlesPerCrawl": 2
}
```

### Verified output example

This record was retrieved from the public [CNBC article](https://www.cnbc.com/2026/10/06/world-bank-east-asia-growth-inflation-ai-exports-.html) on October 6, 2026. The content below shows a 14-word opening excerpt; the actual record contains the complete public text, and `wordCount` describes that complete text.

```json
{
  "articleId": "world-bank-east-asia-growth-inflation-ai-exports-",
  "url": "https://www.cnbc.com/2026/10/06/world-bank-east-asia-growth-inflation-ai-exports-.html",
  "title": "World Bank raises East Asia growth outlook to 4.5%, flags AI risks",
  "content": "The World Bank has raised its growth forecast for the East Asia and Pacific",
  "authors": [
    "Anniek Bao"
  ],
  "category": "Economy",
  "publishedAt": "2026-10-06T04:06:57.000Z",
  "updatedAt": "2026-10-06T04:07:24.000Z",
  "wordCount": 602,
  "publisher": { "name": "CNBC", "url": "https://www.cnbc.com/" },
  "authorDetails": [{ "name": "Anniek Bao", "url": "https://www.cnbc.com/anniek-bao/" }],
  "videos": [{ "name": "Sam Altman: The world should accept some bad things happening for the benefits of AI", "duration": "PT3M56S" }]
}
```

When a detail-page `sourceUrl` would repeat the canonical `url`, it is omitted. A distinct listing-page source is retained.

### Output update

`url` identifies the article. `articleId` is the article's URL filename slug (without `.html`), retained under the existing field name for compatibility; CNBC's page URL is its source. `keywords` is the sole field for the source's native keyword list, including its original order and repeated terms. The duplicate `tags` alias is removed; migrate consumers to `keywords`. The `categories` array keeps distinct native labels in source order, while `category` remains the first label for compatibility. Derived `sourceDomain` and collection details such as `extractionMethod`, `transport` and `scrapedAt` are no longer included in article rows. Run times, source URLs and timestamped source notices remain in the key-value run summaries.

### Filters and limits

`startUrls` accepts up to 50 public CNBC URLs. `urls`, `start_urls`, `url` and `maxItems` remain available as compatibility aliases. The article limit can be set from 1 to 500. Date filtering uses the source's publication timestamp when available.

Requests have a 30-second timeout and a 4 MB response limit by default. You can adjust these in the input tab. Temporary network errors receive at most one retry; access challenges stop further source requests. Only-new history retains the latest 5,000 saved article URLs.

### Cost and support

The current price appears in the Actor's pricing tab. Runtime and data transfer depend on the number and size of pages fetched. Focused article URLs and a small article limit help keep runs short.

For questions or problems, use the Actor's Issues tab and include the run URL.

# Actor input Schema

## `startUrls` (type: `array`):

Public CNBC home, section, RSS, or article URLs.

## `urls` (type: `array`):

Compatibility alias for startUrls.

## `start_urls` (type: `array`):

Compatibility alias for startUrls.

## `url` (type: `string`):

Optional single public CNBC URL.

## `maxArticlesPerCrawl` (type: `integer`):

Maximum valid public article records to save.

## `maxItems` (type: `integer`):

Compatibility alias for maxArticlesPerCrawl.

## `dateFrom` (type: `string`):

ISO date (YYYY-MM-DD) or a relative window such as 7 days.

## `onlyNewArticlesPerDomain` (type: `boolean`):

Skip article URLs saved by previous runs of this Actor in its bounded article history.

## `timeoutMs` (type: `integer`):

Maximum time for each public request.

## `maxResponseBytes` (type: `integer`):

Fail closed when a public response exceeds this byte limit.

## `userAgent` (type: `string`):

Optional transparent HTTP user-agent.

## Actor input object example

```json
{
  "urls": [],
  "start_urls": [],
  "maxArticlesPerCrawl": 10,
  "onlyNewArticlesPerDomain": false,
  "timeoutMs": 30000,
  "maxResponseBytes": 4000000
}
```

# Actor output Schema

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

No description

## `keyValueStore` (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("codingfrontend/cnbc-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("codingfrontend/cnbc-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 codingfrontend/cnbc-scraper --silent --output-dataset

```

## MCP server setup

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