Datacenter Proxies
See how to use Datacenter Proxies. Find code samples, IP control information, location settings, and other details.
User credentials
To start using Oxylabs' Datacenter Proxies, you must first go to Oxylabs' dashboard and purchase a plan that fits your needs. After, you will be guided to create your proxy user. Proxy user credentials is your access to Datacenter Proxies.
Making requests
After you create a proxy user, you will be prompted to a pop up with your first test request to receive a random IP.
Copy it 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 Find more code examples in other code languages below:
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.
Last updated
Was this helpful?

