> ## Documentation Index
> Fetch the complete documentation index at: https://docs.toolip.io/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Use Toolip with BeautifulSoup

> Enhance your web scraping workflows with Toolip and BeautifulSoup. This guide walks you through integrating Toolip proxies into your Python scripts to ensure secure, reliable, and anonymous data collection.

<img src="https://mintcdn.com/toolip-d3ca8ce9/c1hZoipc-TpLQUvw/integration-guides/img/toolip_integrations/BeautifulSoup.png?fit=max&auto=format&n=c1hZoipc-TpLQUvw&q=85&s=fea7a379be22d5ac3f5121b47502c6a5" alt="title" width="720" height="200" data-path="integration-guides/img/toolip_integrations/BeautifulSoup.png" />

## What is BeautifulSoup?

**BeautifulSoup** is a Python library that simplifies extracting and organizing data from HTML and XML documents. By integrating **Toolip proxies**, you can scrape data securely and anonymously, reducing the risk of detection and blocking.

Prefer an enterprise-grade guide? Learn more about Oculus Proxies <a href="https://docs.oculusproxies.com/integration-guides/beautifulsoup" target="_blank" rel="noopener">Beautifulsoup Integration Guide</a>.

<Tip>
  Targeting search engines like Google, Bing, or Yandex requires a specialized proxy to ensure stable access and avoid blocks. **Toolip’s Search Engine ISP Proxies** are designed specifically for this, providing reliable performance where standard proxies may fail. If your proxy test isn’t working on search engines, switching to **Search Engine ISP Proxies** can resolve the issue.
</Tip>

## How to Integrate Toolip with BeautifulSoup

<Steps>
  <Step title="Install Required Dependencies">
    1\. Download and install the latest Python version from [python.org](https://www.python.org/).\\

    2\. Install BeautifulSoup and the `requests` library by running:

    ```bash theme={null}
    pip install beautifulsoup4 requests
    ```
  </Step>

  <Step title="Set Up the Proxy">
    1\. Log in to your [Toolip account](https://toolip.io/dashboard) and retrieve your proxy credentials:

    * **Host**: `proxy.toolip.io`

    * **Port**: Use the port number from your dashboard.

    * **Username**: Your Toolip username (modify it for geo-specific proxies, e.g., `your-username-country-US`).

    * **Password**: Your Toolip password.

    2\. Define your proxy details in your Python script:

    ```python theme={null}
    proxy = {
      "http": "http://[USERNAME]:[PASSWORD]@[HOST]:[PORT]",
      "https": "http://[USERNAME]:[PASSWORD]@[HOST]:[PORT]"
    }
    ```
  </Step>

  <Step title="Write a Scraper Using BeautifulSoup">
    Use the script below to integrate **Toolip proxies** with **BeautifulSoup** for secure and anonymous web scraping:

    ```python theme={null}
    import requests
    from bs4 import BeautifulSoup

    # Toolip Proxy Configuration
    proxy = {
        "http": "http://[USERNAME]:[PASSWORD]@[HOST]:[PORT]",
        "https": "http://[USERNAME]:[PASSWORD]@[HOST]:[PORT]"
    }

    # Target URL to verify the proxy
    url = "https://httpbin.org/ip"

    try:
        # Send the request using the proxy
        response = requests.get(url, proxies=proxy, timeout=10)
        response.raise_for_status()  # Handle HTTP errors

        # Parse the HTML content
        soup = BeautifulSoup(response.text, "html.parser")

        # Print the formatted page content
        print("Response Content (IP Address):")
        print(soup.prettify())

    except requests.exceptions.RequestException as e:
        print("Error occurred while using the proxy:", e)
    ```
  </Step>

  <Step title="Verify the Output">
    Run your script, and if everything is set up correctly, you should see the IP address of your **Toolip proxy** in the output:

    ```json theme={null}
    {
      "origin": "123.45.67.89"
    }
    ```

    If you see your real IP instead, double-check your **username**, **password**, and **proxy format**.
  </Step>
</Steps>

By integrating **Toolip proxies** with **BeautifulSoup**, you can collect web data securely and efficiently while maintaining anonymity. Whether you’re extracting structured data, accessing geo-restricted content, or handling large-scale scraping projects, **Toolip** ensures reliable and seamless operations. 🚀
