skillfed

fear-and-greed

Python wrapper for CNN Fear & Greed Index.

fear-and-greed v0.4 90.4K downloads/30d#13,587 on PyPI44
Permissive license Abandoned released

What it is and what it does

fear-and-greed is a lightweight Python wrapper that scrapes CNN's Fear & Greed Index from their website and returns the current market sentiment metric as a structured named tuple. It wraps the web-scraping logic around requests and requests-cache, caching results locally for 1 minute to avoid repeated fetches.

The package is designed for developers who want programmatic access to CNN's Fear & Greed Index without building their own scraper. It returns three pieces of data: the numeric index value, a human-readable category label (ranging from "Extreme Fear" to "Extreme Greed"), and the UTC timestamp of the last update on CNN's site. However, the package has not been maintained since May 2022, so its scraper may fail if CNN's website structure has changed.

Use it for:

  • Fetch the current Fear & Greed Index value in a financial dashboard or monitoring application.
  • Log historical sentiment readings at intervals for trend analysis or backtesting trading strategies.
  • Alert traders or analysts when the index crosses into extreme fear or greed territory.
  • Combine with other market data sources to build a multi-factor sentiment analysis tool.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Fetches CNN's Fear & Greed Index from their website, parses the current value, and returns it as a named tuple with the index value, category description, and last update timestamp.

Yes, if you need quick programmatic access to CNN's Fear & Greed Index and are willing to accept the risk that the scraper may break due to site changes. The low install friction and permissive license make it a low-cost experiment. No, if you require active maintenance or a guaranteed working solution—the package is abandoned and has not been updated since May 2022. Test it first to confirm the scraper still works with the current CNN website.

Install

fear-and-greed on PyPI

pip

pip install fear-and-greed

uv

uv add fear-and-greed

poetry

poetry add fear-and-greed

Installing fear-and-greed

Before you install

Low install friction with only two runtime dependencies (requests and requests-cache). However, the package is abandoned—last updated May 2022—so no maintenance or bug fixes should be expected going forward.

License in practice

Licensed under MIT (permissive), so you can use, modify, and distribute the package freely with minimal restrictions.

Quickstart

pip install fear-and-greed

import fear_and_greed
result = fear_and_greed.get()
print(result.value, result.description, result.last_update)

CNN's website structure may have changed since the last release in May 2022; the scraper may no longer work if the page layout has been updated.

Verify before relying

  • Whether the web scraper still successfully parses CNN's Fear & Greed Index page given potential site structure changes since May 2022.
  • Whether the 1-minute cache duration for requests is still appropriate for current use cases.
  • The range of the index value (description mentions it falls into categories from 'Extreme Fear' to 'Extreme Greed').

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.0)
Install friction low — pure-Python wheel
Runtime dependencies 2 — requests, requests-cache
Maintenance abandoned — 1,547 days since the last release
Last repo commit
First released
Downloads 90,405/month — #13,587 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: fear_and_greed-0.4-py3-none-any.whl

Intended Audience :: Financial and Insurance IndustryLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

cnn fear and greed indexmarket sentiment scraperfinancial index fetcherfear greed python wrappermarket psychology datasentiment index apicnn financial data
web-scrapingfinancial-datasentiment-index

More WWW/HTTP packages