Links
Comment on page

Send a request

A request for a web resource requires your account name, pipeline and its password, and follows this syntax:
cURL
Python
Node.js
Go
curl -x http://account-accountName-pipeline-pipelineName:[email protected]:7000 https://ipinfo.io
import requests
proxies = {
'http': 'http://account-accountName-pipeline-pipelineName:[email protected]:7000',
'https': 'https://account-accountName-pipeline-pipelineName:[email protected]:7000'
}
url = 'https://ipinfo.io'
response = requests.get(url, proxies=proxies)
print(response.status_code)
print(response.text)
const axios = require('axios');
const targetAddress = "http://ipinfo.io/json";
const getProxy = async () => {
return {
proxy: {
host: "account-accountName-pipeline-pipelineName:[email protected]",
port: 7000
}
}
}
const run = async () => {
const res = await axios(targetAddress, getProxy());
return res.data;
}
(async () => {
var response = await run()
console.log(response);
console.log("DONE!")
})();
package main
import (
"fmt"
"io/ioutil"
"net/http"
"net/url"
)
func main() {
proxyURL, err := url.Parse("http://account-accountName-pipeline-pipelineName:[email protected]:7000")
if err != nil {
fmt.Println(err)
return
}
client := &http.Client{
Transport: &http.Transport{
Proxy: http.ProxyURL(proxyURL),
},
}
url := "https://ipinfo.io"
req, err := http.NewRequest("GET", url, nil)
if err != nil {
fmt.Println(err)
return
}
resp, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer resp.Body.Close()
fmt.Println(resp.StatusCode)
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Additional parameters can be added by chaining them to the username portion of the request, for example:
cURL
Python
Node.js
Go
curl -x http://account-accountName-pipeline-pipelineName-country-US-state-NY-city-new_york-session-randomString:[email protected]:7000 https://ipinfo.io
import requests
proxies = {
'http': 'http://account-accountName-pipeline-pipelineName-country-US-state-NY-city-new_york-session-randomString:[email protected]:7000',
'https': 'https://account-accountName-pipeline-pipelineName-country-US-state-NY-city-new_york-session-randomString:[email protected]:7000'
}
url = 'https://ipinfo.io'
response = requests.get(url, proxies=proxies)
print(response.status_code)
print(response.text)
const axios = require('axios');
const targetAddress = "http://ipinfo.io/json";
const getProxy = async () => {
return {
proxy: {
host: "account-accountName-pipeline-pipelineName-country-US-state-NY-city-new_york-session-randomString:[email protected]",
port: 7000
}
}
}
const run = async () => {
const res = await axios(targetAddress, getProxy());
return res.data;
}
(async () => {
var response = await run()
console.log(response);
console.log("DONE!")
})();
package main
import (
"fmt"
"io/ioutil"
"net/http"
"net/url"
)
func main() {
proxyURL, err := url.Parse("http://account-accountName-pipeline-pipelineName-country-US-state-NY-city-new_york-session-randomString:[email protected]:7000")
if err != nil {
fmt.Println(err)
return
}
client := &http.Client{
Transport: &http.Transport{
Proxy: http.ProxyURL(proxyURL),
},
}
url := "https://ipinfo.io"
req, err := http.NewRequest("GET", url, nil)
if err != nil {
fmt.Println(err)
return
}
resp, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer resp.Body.Close()
fmt.Println(resp.StatusCode)
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
Your account name and pipeline credentials will be provided by your account manager when your account is opened.

Request Parameters

All requests inherit their default parameters from their target pipeline. Requests made with username and password authentication may modify these parameters by transmitting alternate values via the username portion of the request. Request parameters include:
Parameter
Purpose
Required
Description
account
Authentication
Yes
Your account name
pipeline
Authentication
Yes
Your target pipeline name
pipeline password
Authentication
Yes
Your target pipeline password
country
Geotargeting
Optional
Two-letter country code, e.g. US, DE, BR (ISO 3166). Use "All" to randomly select a country on the request.
state
Geotargeting
Optional
For targeting US states (does not include regions or territories in other countries). Two-letter state code, e.g. NY, IL, AZ
city
Geotargeting
Optional
For targeting large cities and metro areas around the globe. When targeting major US cities, you must include state as well. See our Admin API for a method to retrieve supported cities.
session
IP Rotation
Optional
Random string to ID your session, allowing you to keep the same IP for multiple requests. IP will change when new ID is used or in case session expires after 10 minutes of idle time. String should only use alphanumeric characters (0-9, A-z).
Request parameters such as country, state or city can be set with default values in a pipeline without the need to include them in each request.