codestorm-official
ycnbc
Python

Get Real Time News and Market Data From CNBC Using ycnbc !!!

Last updated Jun 19, 2026
40
Stars
6
Forks
0
Issues
0
Stars/day
Attention Score
58
Language breakdown
Python 100.0%
Files click to expand
README

Download news data from CNBC! CNBC's API

IMPORTANT LEGAL DISCLAIMER


ycnbc is not affiliated, endorsed, or vetted by CNBC, It's an open source tool that uses Web Scraping and is intended for research and educational purposes.


ycnbc offers a threaded and Pythonic way to news and market data from CNBC.

Changelog »


Why ycnbc is compelling:

  • Simplicity: Easy-to-use API for quick data retrieval.
  • Directness: No retries, ensuring immediate feedback on success or failure.
  • Focus: Specifically designed for CNBC data, providing relevant and targeted information.
  • Lightweight: Minimal dependencies for a streamlined experience.

Quick Start


Requirements

  • Python >=3.8+
  • curl-cffi>=0.5.9
  • lxml>=4.9.3
  • cssselect>=1.2.0

Installation

$ pip install ycnbc --upgrade --no-cache-dir

Usage for Markets

import ycnbc

markets = ycnbc.Markets()

quotesummary = markets.quotesummary('AAPL') premarkets = markets.premarkets() usmarkets = markets.usmarkets() europemarkets = markets.europemarkets() asiamarkets = markets.asiamarkets() currencies = markets.currencies() cryptocurrencies = markets.cryptocurrencies() futuresandcommodities = markets.futuresandcommodities() bonds = markets.bonds() fundsandetfs = markets.fundsandetfs()

Usage for news

import ycnbc

news = ycnbc.News()

Get trending news

trending_news = news.trending()

Get latest news

latest_news = news.latest()

Get news by category

economy_news = news.economy() jobs_news = news.jobs() whitehousenews = news.white_house() hospitals_news = news.hospitals() transportation_news = news.transportation() media_news = news.media() internet_news = news.internet() congress_news = news.congress() policy_news = news.policy() finance_news = news.finance() life_news = news.life() defense_news = news.defense() europepoliticsnews = news.europe_politics() chinapoliticsnews = news.china_politics() asiapoliticsnews = news.asia_politics() worldpoliticsnews = news.world_politics() equityopportunitynews = news.equity_opportunity() politics_news = news.politics() wealth_news = news.wealth() worldeconomynews = news.world_economy() centralbanksnews = news.central_banks() realestatenews = news.real_estate() healthsciencenews = news.healthandscience() smallbusinessnews = news.small_business() lifeinsurancenews = news.lifeandhealth_insurance() business_news = news.business() energy_news = news.energy() industrials_news = news.industrials() retail_news = news.retail() cybersecurity_news = news.cybersecurity() mobile_news = news.mobile() technology_news = news.technology() cnbcdisruptorsnews = news.cnbc_disruptors() techguidenews = news.tech_guide() socialmedianews = news.social_media() climate_news = news.climate()

Note:

  • URL pages containing news content that have the PRO tag still cannot be retrieved using this library.

Legal Stuff

ycnbc is distributed under the Apache Software License. See the LICENSE.txt file in the release for details.


P.S.

Please drop me a note with any feedback you have.

Asep Saputra

🔗 More in this category

© 2026 GitRepoTrend · codestorm-official/ycnbc · Updated daily from GitHub