ZIP/Postal code
Residential
Rotating ISP
.webp?alt=media&token=4fc6802d-fdd7-488c-9bcd-d658ad6f6ca6)

To connect to a proxy using a ZIP code, add and specify the
postalcode
parameter with a six-digit ZIP code in the username. This parameter must be used combined with the country code parameter cc
and a case-insensitive country code in 2-letter 3166-1 alpha-2 format. Here is an example of the username:
customer-USERNAME-cc-US-postalcode-90210
Currently we support only US-based codes for ZIP code targeting.
Proxy location using ZIP code is being matched using MaxMind IP Geolocation database. There can be a mismatch between ZIP codes when checking IP addresses against other IP geo-location databases.
In this example, a query to
ip.oxylabs.io
is performed from a proxy located in the United States with a ZIP code 90210
:cURL
PHP
Python
Java
C#
Ruby
curl -x pr.oxylabs.io:7777 -U "customer-USERNAME-cc-US-postalcode-90210:PASSWORD" https://ip.oxylabs.io
<?php
$username = 'USERNAME';
$password = 'PASSWORD';
$country = 'US';
$postalcode = '90210';
$proxy = 'pr.oxylabs.io:7777';
$query = curl_init('https://ip.oxylabs.io');
curl_setopt($query, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($query, CURLOPT_PROXY, "http://$proxy");
curl_setopt($query, CURLOPT_PROXYUSERPWD, "customer-$username-cc-$country-postalcode-$postalcode:$password");
$output = curl_exec($query);
curl_close($query);
if ($output)
echo $output;
?>
import urllib.request
import random
username = 'USERNAME'
password = 'PASSWORD'
country = 'US'
postalcode = '90210'
entry = ('http://customer-%s-cc-%s-postalcode-%s:%[email protected]:7777' %
(username, country, postalcode, password))
query = urllib.request.ProxyHandler({
'http': entry,
'https': entry,
})
execute = urllib.request.build_opener(query)
print(execute.open('https://ip.oxylabs.io').read())
package example;
import org.apache.http.HttpHost;
import org.apache.http.client.fluent.*;
public class Example {
public static void main(String[] args) throws Exception {
HttpHost entry = new HttpHost("pr.oxylabs.io", 7777);
String query = Executor.newInstance()
.auth(entry, "customer-USERNAME-cc-US-postalcode-90210", "PASS")
.execute(Request.Get("https://ip.oxylabs.io").viaProxy(entry))
.returnContent().asString();
System.out.println(query);
}
}
using System;
using System.Net;
class Example
{
static void Main()
{
var client = new WebClient();
client.Proxy = new WebProxy("pr.oxylabs.io:7777");
client.Proxy.Credentials = new NetworkCredential("customer-USERNAME-cc-US-postalcode-90210", "PASSWORD");
Console.WriteLine(client.DownloadString("https://ip.oxylabs.io"));
}
}
require 'uri'
require 'net/http'
uri = URI.parse('https://ip.oxylabs.io')
proxy = Net::HTTP::Proxy('pr.oxylabs.io', 7777, 'customer-USERNAME-cc-US-postalcode-90210', 'PASSWORD')
req = Net::HTTP::Get.new(uri.path)
result = proxy.start(uri.host,uri.port) do |http|
http.request(req)
end
puts result.body
Last modified 1mo ago