For the complete documentation index, see llms.txt. This page is also available as Markdown.

Datacenter Proxies

See how to use Datacenter Proxies. Find code samples, IP control information, location settings, and other details.

To start using Oxylabs Datacenter Proxies, you must first go to Oxylabs dashboard and create an Datacenter Proxies product instance:

1

Add a product instance

Click + Add product instance and select Datacenter proxies.

2

Set up your proxies

Choose either Pay per IP or Pay per GB, and set the instance name.

If you chose Pay per IP: Set up the IP locations and choose the number of IPs for each location.

Finish by configuring your authentication settings, and click Create instance.

3

Get credentials

Click on your Datacenter Proxies instance in the dashboard home instance table and confirm your proxy user credentials.

Making requests

Copy the code below in your preferred language and change the USERNAME and PASSWORD parameters to your proxy credentials:

curl -x dc.oxylabs.io:8000 -U "user-USERNAME:PASSWORD" https://ip.oxylabs.io/location 
#pip install requests
import requests

username = 'USERNAME'
password = 'PASSWORD'
proxy = 'dc.oxylabs.io:8000'

proxies = {
   "https": ('https://user-%s:%s@%s' % (username, password, proxy))
}

response=requests.get("https://ip.oxylabs.io/location", proxies=proxies)

print(response.content)
//npm install axios
const axios = require("axios");
const https = require("https");

const client = axios.create({
    httpsAgent: new https.Agent({
        rejectUnauthorized: false,
    }),
});
const username = 'USERNAME';
const password = 'PASSWORD'

client
    .get("https://ip.oxylabs.io/location", {
        proxy: {
            protocol: "https",
            host: "dc.oxylabs.io",
            port: 8000,
            auth: {
                username: `user-${username}`,
                password: password,
            },
        },
    })
    .then((res) => {
        console.log(res.data);
    })
    .catch((err) => console.error(err));

To get a specific proxy while making requests, refer to IP Control page.

Use ip.oxylabs.io/location to check the parameters of your IPs — this domain delivers information from four geolocation databases: MaxMind, IP2Location, DB-IP, and IPinfo.io. The parameters include IP address, provider, country, city, ZIP code, ASN, organization name, time zone, and meta (when disclosed by database).

Last updated

Was this helpful?