# LangChain

LangChain is a popular framework for building LLM-powered applications and agents. This guide shows how to route your LangChain requests through GoProxies, which is particularly useful for web scraping tools, search integrations, and agent workflows.

#### Requirements

Before getting started, ensure that:

* No other VPN or proxies are active.
* You have your GoProxies endpoint ready, e.g. `proxy.goproxies.com:1080`
* Your GoProxies subuser (also called API User) username and password.
* Python is installed on your machine.

#### Proxy Setup

LangChain picks up proxy settings from environment variables. Set these before running your application:

```
HTTP_PROXY=http://customer-your_username_here:your_password@proxy.goproxies.com:1080
HTTPS_PROXY=http://customer-your_username_here:your_password@proxy.goproxies.com:1080
```

Or set them directly in your Python script before importing LangChain:

python

```python
import os
os.environ["HTTP_PROXY"] = "http://customer-your_username_here:your_password@proxy.goproxies.com:1080"
os.environ["HTTPS_PROXY"] = "http://customer-your_username_here:your_password@proxy.goproxies.com:1080"
```

{% hint style="info" %}
To target a specific country, append `-country-country_abbreviation` after your username, e.g. `customer-exampleuser-country-us`, as covered in our [proxy parameters article](https://docs.goproxies.com/proxies/rotating-residential-proxies/proxy-parameters).
{% endhint %}

#### Verify the Connection

Add a quick request to `https://ip.goproxies.com` in your script using LangChain's `RequestsGetTool` or a simple `requests` call — if the returned IP reflects your proxy location, you're all set.
