Location Settings
Choose where your exit IP is: by country, city or US state. Add the location to your username. Leave it out to get any available country.
| Parameter | Description | Example |
|---|---|---|
__cc_ | Country. Lowercase ISO 3166-1 alpha-2 code. | __cc_de |
__city_ | City. English name, lowercase, underscores for spaces. Use together with __cc_. | __cc_us__city_new_york |
__st_ | US state. Name with the us_ prefix, lowercase, underscores for spaces. | __st_us_california |
Pick one level: country, city or state. Don't combine __city_ and __st_ in one username.
Country
| Parameter | Format | Example username |
|---|---|---|
__cc_ | Lowercase ISO 3166-1 alpha-2 | crh_USERNAME__cc_gb |
Example: a random residential IP in Germany.
curl -x http://proxy.crawlhub.ai:8000 \
-U "crh_USERNAME__cc_de:PASSWORD" \
https://ipinfo.io/jsonimport requests
username = "crh_USERNAME__cc_de"
password = "PASSWORD"
proxy = f"http://{username}:{password}@proxy.crawlhub.ai:8000"
response = requests.get(
"https://ipinfo.io/json",
proxies={"http": proxy, "https": proxy},
timeout=30,
)
print(response.json())// npm install undici
import { fetch, ProxyAgent } from "undici";
const auth = Buffer.from("crh_USERNAME__cc_de:PASSWORD").toString("base64");
const agent = new ProxyAgent({
uri: "http://proxy.crawlhub.ai:8000",
token: `Basic ${auth}`,
});
const res = await fetch("https://ipinfo.io/json", { dispatcher: agent });
console.log(await res.json());<?php
$ch = curl_init("https://ipinfo.io/json");
curl_setopt($ch, CURLOPT_PROXY, "http://proxy.crawlhub.ai:8000");
curl_setopt($ch, CURLOPT_PROXYUSERPWD, "crh_USERNAME__cc_de:PASSWORD");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
echo curl_exec($ch);
curl_close($ch);package main
import (
"fmt"
"io"
"net/http"
"net/url"
"time"
)
func main() {
proxyURL, _ := url.Parse("http://crh_USERNAME__cc_de:PASSWORD@proxy.crawlhub.ai:8000")
client := &http.Client{
Transport: &http.Transport{Proxy: http.ProxyURL(proxyURL)},
Timeout: 30 * time.Second,
}
resp, err := client.Get("https://ipinfo.io/json")
if err != nil { panic(err) }
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}import java.net.*;
import java.net.http.*;
public class Main {
public static void main(String[] args) throws Exception {
// Java blocks Basic auth on HTTPS tunnels by default; allow it.
System.setProperty("jdk.http.auth.tunneling.disabledSchemes", "");
HttpClient client = HttpClient.newBuilder()
.proxy(ProxySelector.of(new InetSocketAddress("proxy.crawlhub.ai", 8000)))
.authenticator(new Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication("crh_USERNAME__cc_de", "PASSWORD".toCharArray());
}
}).build();
HttpRequest req = HttpRequest.newBuilder(URI.create("https://ipinfo.io/json")).build();
System.out.println(client.send(req, HttpResponse.BodyHandlers.ofString()).body());
}
}using System.Net;
var proxy = new WebProxy("http://proxy.crawlhub.ai:8000")
{
Credentials = new NetworkCredential("crh_USERNAME__cc_de", "PASSWORD")
};
using var client = new HttpClient(new HttpClientHandler { Proxy = proxy, UseProxy = true })
{
Timeout = TimeSpan.FromSeconds(30)
};
Console.WriteLine(await client.GetStringAsync("https://ipinfo.io/json"));require "net/http"
uri = URI("https://ipinfo.io/json")
proxy = ["proxy.crawlhub.ai", 8000, "crh_USERNAME__cc_de", "PASSWORD"]
Net::HTTP.start(uri.host, uri.port, *proxy, use_ssl: true, read_timeout: 30) do |http|
puts http.get(uri.path).body
endThe United Kingdom is gb, not uk. Codes must be lowercase.
Common country codes
| Country | Code | Username suffix |
|---|
City
Add __city_ after the country. Use the English city name in lowercase, with underscores instead of spaces: los_angeles, rio_de_janeiro.
Example: a random residential IP in Munich, Germany.
curl -x http://proxy.crawlhub.ai:8000 \
-U "crh_USERNAME__cc_de__city_munich:PASSWORD" \
https://ipinfo.io/jsonimport requests
username = "crh_USERNAME__cc_de__city_munich"
password = "PASSWORD"
proxy = f"http://{username}:{password}@proxy.crawlhub.ai:8000"
response = requests.get(
"https://ipinfo.io/json",
proxies={"http": proxy, "https": proxy},
timeout=30,
)
print(response.json())// npm install undici
import { fetch, ProxyAgent } from "undici";
const auth = Buffer.from("crh_USERNAME__cc_de__city_munich:PASSWORD").toString("base64");
const agent = new ProxyAgent({
uri: "http://proxy.crawlhub.ai:8000",
token: `Basic ${auth}`,
});
const res = await fetch("https://ipinfo.io/json", { dispatcher: agent });
console.log(await res.json());<?php
$ch = curl_init("https://ipinfo.io/json");
curl_setopt($ch, CURLOPT_PROXY, "http://proxy.crawlhub.ai:8000");
curl_setopt($ch, CURLOPT_PROXYUSERPWD, "crh_USERNAME__cc_de__city_munich:PASSWORD");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
echo curl_exec($ch);
curl_close($ch);package main
import (
"fmt"
"io"
"net/http"
"net/url"
"time"
)
func main() {
proxyURL, _ := url.Parse("http://crh_USERNAME__cc_de__city_munich:PASSWORD@proxy.crawlhub.ai:8000")
client := &http.Client{
Transport: &http.Transport{Proxy: http.ProxyURL(proxyURL)},
Timeout: 30 * time.Second,
}
resp, err := client.Get("https://ipinfo.io/json")
if err != nil { panic(err) }
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}import java.net.*;
import java.net.http.*;
public class Main {
public static void main(String[] args) throws Exception {
// Java blocks Basic auth on HTTPS tunnels by default; allow it.
System.setProperty("jdk.http.auth.tunneling.disabledSchemes", "");
HttpClient client = HttpClient.newBuilder()
.proxy(ProxySelector.of(new InetSocketAddress("proxy.crawlhub.ai", 8000)))
.authenticator(new Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication("crh_USERNAME__cc_de__city_munich", "PASSWORD".toCharArray());
}
}).build();
HttpRequest req = HttpRequest.newBuilder(URI.create("https://ipinfo.io/json")).build();
System.out.println(client.send(req, HttpResponse.BodyHandlers.ofString()).body());
}
}using System.Net;
var proxy = new WebProxy("http://proxy.crawlhub.ai:8000")
{
Credentials = new NetworkCredential("crh_USERNAME__cc_de__city_munich", "PASSWORD")
};
using var client = new HttpClient(new HttpClientHandler { Proxy = proxy, UseProxy = true })
{
Timeout = TimeSpan.FromSeconds(30)
};
Console.WriteLine(await client.GetStringAsync("https://ipinfo.io/json"));require "net/http"
uri = URI("https://ipinfo.io/json")
proxy = ["proxy.crawlhub.ai", 8000, "crh_USERNAME__cc_de__city_munich", "PASSWORD"]
Net::HTTP.start(uri.host, uri.port, *proxy, use_ssl: true, read_timeout: 30) do |http|
puts http.get(uri.path).body
endAny city can be targeted, but availability depends on which devices are online there. Big cities are well covered. Smaller ones may be briefly unavailable, so retry or fall back to the country.
State (US)
Add __st_ and the state name with the us_ prefix. No country parameter needed.
Example: a random residential IP in California.
curl -x http://proxy.crawlhub.ai:8000 \
-U "crh_USERNAME__st_us_california:PASSWORD" \
https://ipinfo.io/jsonimport requests
username = "crh_USERNAME__st_us_california"
password = "PASSWORD"
proxy = f"http://{username}:{password}@proxy.crawlhub.ai:8000"
response = requests.get(
"https://ipinfo.io/json",
proxies={"http": proxy, "https": proxy},
timeout=30,
)
print(response.json())// npm install undici
import { fetch, ProxyAgent } from "undici";
const auth = Buffer.from("crh_USERNAME__st_us_california:PASSWORD").toString("base64");
const agent = new ProxyAgent({
uri: "http://proxy.crawlhub.ai:8000",
token: `Basic ${auth}`,
});
const res = await fetch("https://ipinfo.io/json", { dispatcher: agent });
console.log(await res.json());<?php
$ch = curl_init("https://ipinfo.io/json");
curl_setopt($ch, CURLOPT_PROXY, "http://proxy.crawlhub.ai:8000");
curl_setopt($ch, CURLOPT_PROXYUSERPWD, "crh_USERNAME__st_us_california:PASSWORD");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
echo curl_exec($ch);
curl_close($ch);package main
import (
"fmt"
"io"
"net/http"
"net/url"
"time"
)
func main() {
proxyURL, _ := url.Parse("http://crh_USERNAME__st_us_california:PASSWORD@proxy.crawlhub.ai:8000")
client := &http.Client{
Transport: &http.Transport{Proxy: http.ProxyURL(proxyURL)},
Timeout: 30 * time.Second,
}
resp, err := client.Get("https://ipinfo.io/json")
if err != nil { panic(err) }
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}import java.net.*;
import java.net.http.*;
public class Main {
public static void main(String[] args) throws Exception {
// Java blocks Basic auth on HTTPS tunnels by default; allow it.
System.setProperty("jdk.http.auth.tunneling.disabledSchemes", "");
HttpClient client = HttpClient.newBuilder()
.proxy(ProxySelector.of(new InetSocketAddress("proxy.crawlhub.ai", 8000)))
.authenticator(new Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication("crh_USERNAME__st_us_california", "PASSWORD".toCharArray());
}
}).build();
HttpRequest req = HttpRequest.newBuilder(URI.create("https://ipinfo.io/json")).build();
System.out.println(client.send(req, HttpResponse.BodyHandlers.ofString()).body());
}
}using System.Net;
var proxy = new WebProxy("http://proxy.crawlhub.ai:8000")
{
Credentials = new NetworkCredential("crh_USERNAME__st_us_california", "PASSWORD")
};
using var client = new HttpClient(new HttpClientHandler { Proxy = proxy, UseProxy = true })
{
Timeout = TimeSpan.FromSeconds(30)
};
Console.WriteLine(await client.GetStringAsync("https://ipinfo.io/json"));require "net/http"
uri = URI("https://ipinfo.io/json")
proxy = ["proxy.crawlhub.ai", 8000, "crh_USERNAME__st_us_california", "PASSWORD"]
Net::HTTP.start(uri.host, uri.port, *proxy, use_ssl: true, read_timeout: 30) do |http|
puts http.get(uri.path).body
endState values
| State | Username suffix |
|---|---|
| California | __st_us_california |
| Texas | __st_us_texas |
| Florida | __st_us_florida |
| New York | __st_us_new_york |
| Illinois | __st_us_illinois |
| Pennsylvania | __st_us_pennsylvania |
| Ohio | __st_us_ohio |
| Georgia | __st_us_georgia |
| North Carolina | __st_us_north_carolina |
| Michigan | __st_us_michigan |
| New Jersey | __st_us_new_jersey |
| Virginia | __st_us_virginia |
| Washington | __st_us_washington |
| Arizona | __st_us_arizona |
| Massachusetts | __st_us_massachusetts |
Other states follow the same pattern: us_ + name, lowercase, underscores for spaces.
Availability and accuracy
- Exits depend on which devices are online. A rare country may be briefly unavailable. Retry, or fall back to a nearby country.
- Geolocation databases disagree. Check the exit IP with the database your target uses before you scale, and stick to one source when you compare results over time.