skillfed

beautifulsoup4

Screen-scraping library

beautifulsoup4 Permissive license MIT License Active v4.15.0 released

Install

beautifulsoup4 on PyPI

pip

pip install beautifulsoup4

uv

uv add beautifulsoup4

poetry

poetry add beautifulsoup4

Package facts

License MIT License (permissive)
Python support supports the current Python release (>=3.7.0)
Install friction low — pure-Python wheel
Runtime dependencies 2 — soupsieve, typing-extensions
Maintenance actively maintained — 67 days since the last release
First released
Popularity one of the 100 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: beautifulsoup4-4.15.0-py3-none-any.whl

Keywords: HTML, XML, parse, soup

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Topic :: Software Development :: Libraries :: Python ModulesTopic :: Text Processing :: Markup :: HTMLTopic :: Text Processing :: Markup :: SGMLTopic :: Text Processing :: Markup :: XML

About beautifulsoup4

from the package's own PyPI description — quoted content, verbatim

Beautiful Soup is a library that makes it easy to scrape information from web pages. It sits atop an HTML or XML parser, providing Pythonic idioms for iterating, searching, and modifying the parse tree.

Quick start

>>> from bs4 import BeautifulSoup
>>> soup = BeautifulSoup("<p>Some<b>bad<i>HTML")
>>> print(soup.prettify())
<html>
 <body>
  <p>
   Some
   <b>
    bad
    <i>
     HTML
    </i>
   </b>
  </p>
 </body>
</html>
>>> soup.find(string="bad")
'bad'
>>> soup.i
<i>HTML</i>
#
>>> soup = BeautifulSoup("<tag1>Some<tag2/>bad<tag3>XML", "xml")
#
>>> print(soup.prettify())
<?xml version="1.0" encoding="utf-8"?>
<tag1>
 Some
 <tag2/>
 bad
 <tag3>
  XML
 </tag3>
</tag1>

To go beyond the basics, comprehensive documentation is available.

Links

Read as markdown · JSON record · Homepage

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

Beautiful Soup parses HTML and XML documents into a tree structure, providing Pythonic methods to search, iterate, and modify the parse tree for web scraping and markup extraction.

Installation is straightforward with only two lightweight runtime dependencies (soupsieve and typing-extensions). The package is actively maintained with a recent release 67 days ago, and supports Python 3.7+.

MIT License permits commercial and private use with minimal restrictions—you may use, modify, and distribute beautifulsoup4 freely provided you include the license notice.

Usage

from beautifulsoup4 import BeautifulSoup
soup = BeautifulSoup("<p>Some<b>bad<i>HTML")
print(soup.find(string="bad"))

Requires Python 3.7 or later.

Verdict: Beautiful Soup is a mature, widely-used screen-scraping library in the top 100 PyPI packages with no known vulnerabilities, permissive MIT licensing, and low install friction. It is production-ready for HTML and XML parsing tasks.

Needs verification

  • Whether an external HTML/XML parser must be installed separately or if Python's built-in parser is sufficient.
  • Performance characteristics and memory footprint for large documents.
html parsing pythonweb scraping libraryxml parser pythonhtml tree navigationmarkup extractionparse html documentsscreen scraping

Similar packages