{"id":21340,"library":"finvizfinance","title":"finvizfinance","description":"A Python library to download financial data from Finviz, including stock screeners, quotes, news, insider trades, and ETF holders. Current version 1.3.0, requires Python >=3.9. Released under MIT license with moderate release cadence (major updates every few months).","status":"active","version":"1.3.0","language":"python","source_language":"en","source_url":"https://github.com/lit26/finvizfinance","tags":["finviz","stock","finance","screener","data"],"install":[{"cmd":"pip install finvizfinance","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"HTTP requests to Finviz","package":"requests","optional":false},{"reason":"HTML parsing","package":"beautifulsoup4","optional":false},{"reason":"XML/HTML parser","package":"lxml","optional":true}],"imports":[{"note":"The old deep import path is unnecessary; the top-level module re-exports the class.","wrong":"from finvizfinance.finvizfinance import FinvizFinance","symbol":"FinvizFinance","correct":"from finvizfinance import FinvizFinance"},{"note":"Direct import from submodule.","symbol":"Screener","correct":"from finvizfinance.screener import Screener"},{"note":"Direct import from submodule.","symbol":"Quote","correct":"from finvizfinance.quote import Quote"}],"quickstart":{"code":"from finvizfinance.quote import Quote\n\n# Get fundamental data for a ticker\nfinviz = Quote()\n# Replace 'AAPL' with any stock symbol\ndata = finviz.ticker_outer_rating('AAPL')\nprint(data)","lang":"python","description":"Fetches outer rating (broker ratings) for a stock ticker. No API key required."},"warnings":[{"fix":"Check return types: use `type(result)` and adjust code to handle dicts or use `pd.DataFrame(result)` if pandas needed.","message":"v1.0.0 changed the internal structure: `finvizfinance` objects now return dicts instead of pandas DataFrames in some methods. Code relying on DataFrame methods may break.","severity":"breaking","affected_versions":"<1.0.0 -> >=1.0.0"},{"fix":"Use proxies, add delays between requests, and avoid scraping at high frequency. Consider rotating user agents.","message":"Finviz may block automated requests if rate-limited. The library uses a simple sleep between requests, but heavy use can lead to IP bans or CAPTCHAs.","severity":"gotcha","affected_versions":"all"},{"fix":"Always check if the result is non-empty before indexing. Handle empty results gracefully.","message":"The `ticker_outer_rating` method may return an empty list or missing data for some tickers (e.g., ETFs or less-covered stocks). This is not an error but reflects Finviz's limited coverage.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `ticker_outer_rating` instead of `outer_rating`.","message":"The `ticker_outer_rating` method was renamed from an older `outer_rating` method in v0.14.x. The old name may still work but is deprecated.","severity":"deprecated","affected_versions":"<0.14.7"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run `pip install finvizfinance` in the correct environment.","cause":"Library not installed or wrong Python environment.","error":"No module named 'finvizfinance'"},{"fix":"Use `from finvizfinance import FinvizFinance` if you need the legacy class, or better import specific submodules like `from finvizfinance.quote import Quote`.","cause":"Importing the class incorrectly or using a very old version (pre-0.14).","error":"AttributeError: module 'finvizfinance' has no attribute 'FinvizFinance'"},{"fix":"Check if the dict contains the expected keys using `.get('Rating', 'N/A')` or verify the data structure first.","cause":"Trying to access a key that doesn't exist in the returned dict (e.g., for a ticker with no ratings).","error":"KeyError: 'Rating'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}