Skip to main content
This guide provides a quick overview for getting started with BeautifulSoup4 document loader. For detailed documentation of all __ModuleName__Loader features and configurations head to the API reference.

Overview

Integration details

Loader features

Setup

To access BSHTMLLoader document loader you’ll need to install the langchain-community integration package and the bs4 python package.

Credentials

No credentials are needed to use the BSHTMLLoader class. To enable automated tracing of your model calls, set your LangSmith API key:

Installation

Install langchain-community and bs4.

Initialization

Now we can instantiate our model object and load documents:
  • TODO: Update model instantiation with relevant params.

Load

Lazy Load

Adding separator to BS4

We can also pass a separator to use when calling get_text on the soup

API reference

For detailed documentation of all BSHTMLLoader features and configurations head to the API reference: python.langchain.com/api_reference/community/document_loaders/langchain_community.document_loaders.html_bs.BSHTMLLoader.html
Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.