Dashboard
Products / Residential Proxies

Advanced Filters

Combine targeting options in one username. The gateway reads the filters from the username, so you don't change anything else in your code.

Available filters

ParameterTypeDescriptionExample
__cc_String, 2 lettersExit country, lowercase ISO 3166-1 alpha-2. See Location Settings.__cc_de
__city_StringCity, lowercase English name, underscores for spaces. Use with __cc_.__city_munich
__st_StringUS state with us_ prefix.__st_us_texas
__sid_String, 1–32 letters or digitsKeeps the same exit IP across connections. See Session Control.__sid_job01

Rules

  • Use each filter once.
  • Order: __cc_, __city_, __st_, then __sid_ last.
  • Use either __city_ or __st_, not both.
  • The password never changes.
  • Unknown filters or the wrong order return 400.

Query with filters

A sticky German IP. Every request with session job01 leaves from the same German residential IP.

curl -x http://proxy.crawlhub.ai:8000 \
  -U "crh_USERNAME__cc_de__sid_job01:PASSWORD" \
  https://ipinfo.io/json
import requests

username = "crh_USERNAME__cc_de__sid_job01"
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__sid_job01: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__sid_job01: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__sid_job01: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__sid_job01", "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__sid_job01", "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__sid_job01", "PASSWORD"]

Net::HTTP.start(uri.host, uri.port, *proxy, use_ssl: true, read_timeout: 30) do |http|
  puts http.get(uri.path).body
end

Example response

Values are illustrative.

JSON
{
  "ip": "84.142.67.19",
  "city": "Hamburg",
  "region": "Hamburg",
  "country": "DE",
  "org": "AS3320 Deutsche Telekom AG",
  "timezone": "Europe/Berlin"
}

More combinations

GoalUsername
Random IP, any countrycrh_USERNAME
Random IP in the UScrh_USERNAME__cc_us
Sticky IP, any countrycrh_USERNAME__sid_abc123
Sticky IP in the UKcrh_USERNAME__cc_gb__sid_abc123
Random IP in Londoncrh_USERNAME__cc_gb__city_london
Sticky IP in Texascrh_USERNAME__st_us_texas__sid_abc123
Need help?Contact supportProxy checkerhello@crawlhub.ai
Copied