Integrations / AI and automation

Use Proxys with LangChain

Load web pages through Proxys in LangChain.

Steps

  1. Pass proxies to the loader's requests settings.
Python
from langchain_community.document_loaders import WebBaseLoader

proxy = "http://USERNAME-country-us:PASSWORD@gw.proxys.co:8000"
loader = WebBaseLoader("https://example.com", proxies={"http": proxy, "https": proxy})
docs = loader.load()

Before you start

Replace USERNAME and PASSWORD with a sub-user's credentials from the dashboard. Change -country-us to the country you need, or remove it for a random location. See targeting options for city, ASN and sticky sessions.

Try 1 GB for $1