Skip to main content
Static IP addresses allow your sessions to maintain the same IP address across multiple runs, which is useful for allowlisting, rate limiting, and maintaining consistent identity.

Using External Proxies with Static IPs

Configure sessions to use your own static IP proxies:
from notte_sdk import NotteClient
from notte_sdk.types import ExternalProxy

client = NotteClient()

# Use your static IP proxy
static_proxy = ExternalProxy(
    server="http://your-static-ip-proxy.com:8080",
    username="your_username",
    password="your_password"
)

with client.Session(proxies=[static_proxy]) as session:
    page = session.page
    page.goto("https://api.ipify.org")
    ip = page.locator("body").inner_text()
    print(f"Using static IP: {ip}")

Reusing the Same IP

Maintain the same IP across multiple sessions:
from notte_sdk import NotteClient
from notte_sdk.types import ExternalProxy

client = NotteClient()

static_proxy = ExternalProxy(
    server="http://static-ip.example.com:8080",
    username="user",
    password="pass"
)

# Session 1
with client.Session(proxies=[static_proxy]) as session:
    page = session.page
    page.goto("https://example.com")
    # Do some work

# Session 2 (same IP)
with client.Session(proxies=[static_proxy]) as session:
    page = session.page
    page.goto("https://example.com")
    # Continue work with same IP

IP Pools

Rotate between a pool of static IPs:
from notte_sdk import NotteClient
from notte_sdk.types import ExternalProxy
import random

client = NotteClient()

# Pool of static IPs
ip_pool = [
    ExternalProxy(server="http://ip1.example.com:8080", username="user", password="pass"),
    ExternalProxy(server="http://ip2.example.com:8080", username="user", password="pass"),
    ExternalProxy(server="http://ip3.example.com:8080", username="user", password="pass")
]

# Select an IP from the pool
proxy = random.choice(ip_pool)

with client.Session(proxies=[proxy]) as session:
    page = session.page
    page.goto("https://example.com")

Static IP Per User

Assign specific static IPs to different users or workflows:
from notte_sdk import NotteClient
from notte_sdk.types import ExternalProxy

client = NotteClient()

# Map users to static IPs
user_ips = {
    "admin": ExternalProxy(server="http://admin-ip.example.com:8080", username="user", password="pass"),
    "scraper": ExternalProxy(server="http://scraper-ip.example.com:8080", username="user", password="pass"),
    "tester": ExternalProxy(server="http://tester-ip.example.com:8080", username="user", password="pass")
}

user_type = "admin"
proxy = user_ips[user_type]

with client.Session(proxies=[proxy]) as session:
    page = session.page
    page.goto("https://example.com")

Verify Static IP

Confirm your session is using the correct static IP:
from notte_sdk import NotteClient
from notte_sdk.types import ExternalProxy

client = NotteClient()

expected_ip = "203.0.113.1"

proxy = ExternalProxy(
    server="http://static-ip.example.com:8080",
    username="user",
    password="pass"
)

with client.Session(proxies=[proxy]) as session:
    page = session.page

    # Check IP
    page.goto("https://api.ipify.org")
    actual_ip = page.locator("body").inner_text().strip()

    if actual_ip == expected_ip:
        print(f"✅ Using correct static IP: {actual_ip}")
    else:
        print(f"❌ IP mismatch! Expected: {expected_ip}, Got: {actual_ip}")

Use Cases

1. IP Allowlisting

Access systems that require allowlisted IPs:
# Your server's IP is 203.0.113.1 and it's allowlisted
proxy = ExternalProxy(server="http://203.0.113.1:8080", username="user", password="pass")

with client.Session(proxies=[proxy]) as session:
    page = session.page
    page.goto("https://admin.example.com")
    # Access granted due to allowlisted IP

2. Rate Limiting

Distribute requests across static IPs to avoid rate limits:
import time

for ip_proxy in ip_pool:
    with client.Session(proxies=[ip_proxy]) as session:
        page = session.page
        page.goto("https://api.example.com/data")
        # Each IP has its own rate limit
    time.sleep(1)

3. Consistent Identity

Maintain the same IP for a workflow:
# Day 1: Setup account
with client.Session(proxies=[static_proxy], cookie_file="account.json") as session:
    page = session.page
    page.goto("https://example.com/register")
    # Register account

# Day 2: Use account (same IP)
with client.Session(proxies=[static_proxy], cookie_file="account.json") as session:
    page = session.page
    page.goto("https://example.com/dashboard")
    # Account recognizes same IP + cookies

4. Geographic Targeting

Use static IPs in specific regions:
# US static IP
us_proxy = ExternalProxy(server="http://us-static.example.com:8080", username="user", password="pass")

# EU static IP
eu_proxy = ExternalProxy(server="http://eu-static.example.com:8080", username="user", password="pass")

# Access region-specific content
with client.Session(proxies=[us_proxy]) as session:
    page = session.page
    page.goto("https://us.example.com")

Best Practices

1. Monitor IP Health

Check if your static IPs are blocked:
def check_ip_health(proxy):
    try:
        with client.Session(proxies=[proxy], timeout_minutes=2) as session:
            page = session.page
            page.goto("https://example.com", timeout=10000)
            return True
    except Exception as e:
        print(f"IP health check failed: {e}")
        return False

# Check all IPs in pool
for proxy in ip_pool:
    if not check_ip_health(proxy):
        print(f"Warning: IP {proxy.server} may be blocked")

2. Rotate IPs

Don’t overuse a single static IP:
# Track usage per IP
ip_usage = {ip.server: 0 for ip in ip_pool}

def get_least_used_ip():
    return min(ip_pool, key=lambda ip: ip_usage[ip.server])

# Use least-used IP
proxy = get_least_used_ip()
ip_usage[proxy.server] += 1

with client.Session(proxies=[proxy]) as session:
    pass

3. Combine with Profiles

Use static IPs with browser profiles:
# Each profile has its own static IP
profiles = {
    "user1": {"ip": us_proxy, "cookies": "user1.json"},
    "user2": {"ip": eu_proxy, "cookies": "user2.json"}
}

for user, config in profiles.items():
    with client.Session(
        proxies=[config["ip"]],
        cookie_file=config["cookies"]
    ) as session:
        page = session.page
        page.goto("https://example.com")

Static vs Rotating Proxies

FeatureStatic IPsRotating Proxies
IP ConsistencySame IP across sessionsDifferent IP each time
Allowlisting✅ Easy❌ Difficult
Rate LimitingPer IPDistributed
CostHigherLower
Blocking RiskHigher (same IP)Lower (constantly changing)
Use CaseAllowlisted access, consistent identityWeb scraping, high volume

Next Steps