Send Your First Request

Proxies

Send your first request through Rotating Datacenter Proxies with copy-paste examples.

You need your proxy Username, Password, and Host (IP or DNS) from the Proxy configuration tab. Add targeting flags to the username as shown in Configure.

Replace the placeholders before you run any example:

PlaceholderWhere to get it
YOUR_USERNAMEDashboard username
YOUR_PASSWORDDashboard password
YOUR_PROXY_HOSTGenerated endpoint host (IP or DNS)
PORTPort from the endpoint (for example 9000 for rotating HTTP/HTTPS)

The examples below use Germany + Baden-Württemberg targeting (-country-de-state-badenwurttemberg) on a rotating HTTP port.

Code examples

curl -x "http://YOUR_USERNAME-country-de-state-badenwurttemberg:YOUR_PASSWORD@YOUR_PROXY_HOST:PORT" \
  "http://ip-api.com/json"
import pprint
import requests

host = "YOUR_PROXY_HOST"
port = 9000
username = "YOUR_USERNAME-country-de-state-badenwurttemberg"
password = "YOUR_PASSWORD"

proxy_url = f"http://{username}:{password}@{host}:{port}"

proxies = {
    "http": proxy_url,
    "https": proxy_url,
}

url = "http://ip-api.com/json"
response = requests.get(url, proxies=proxies, timeout=60)
pprint.pprint(response.json())
import axios from "axios";
import { HttpsProxyAgent } from "https-proxy-agent";

const host = "YOUR_PROXY_HOST";
const port = 9000;
const username = "YOUR_USERNAME-country-de-state-badenwurttemberg";
const password = "YOUR_PASSWORD";

const proxyUrl = `http://${username}:${password}@${host}:${port}`;
const agent = new HttpsProxyAgent(proxyUrl);

const { data } = await axios.get("http://ip-api.com/json", {
  httpAgent: agent,
  httpsAgent: agent,
  proxy: false,
  timeout: 60000,
});

console.log(data);
<?php
$host = "YOUR_PROXY_HOST";
$port = 9000;
$username = "YOUR_USERNAME-country-de-state-badenwurttemberg";
$password = "YOUR_PASSWORD";

$proxy = "http://{$username}:{$password}@{$host}:{$port}";

$ch = curl_init("http://ip-api.com/json");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
package main

import (
	"fmt"
	"io"
	"net/http"
	"net/url"
)

func main() {
	proxyURL, err := url.Parse("http://YOUR_USERNAME-country-de-state-badenwurttemberg:YOUR_PASSWORD@YOUR_PROXY_HOST:9000")
	if err != nil {
		panic(err)
	}

	client := &http.Client{
		Transport: &http.Transport{Proxy: http.ProxyURL(proxyURL)},
	}

	resp, err := client.Get("http://ip-api.com/json")
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	body, err := io.ReadAll(resp.Body)
	if err != nil {
		panic(err)
	}

	fmt.Println(string(body))
}

Output

{
  "status": "success",
  "country": "Germany",
  "countryCode": "DE",
  "region": "BW",
  "regionName": "Baden-Wurttemberg",
  "city": "Calw",
  "zip": "75365",
  "lat": 48.709,
  "lon": 8.7399,
  "timezone": "Europe/Berlin",
  "isp": "1&1 Versatel GmbH",
  "org": "VT-DYNAMICPOOL South",
  "as": "AS8881 1&1 Versatel GmbH",
  "query": "87.123.246.95"
}

query is the exit IP. City and ISP can vary within the selected country and state.

Was this page helpful?

On this page