Making Requests
Basic query
Basic query only requires passing username
and password
. No other parameters are needed. Such a query will result in the request being made from a random IP address (proxy). Every new request will use a different proxy.
Code examples
In this example, a query to ip.oxylabs.io/location
is performed from a random IP:
A single backconnect proxy (pr.oxylabs.io:7777)
enables you to choose a specific country or city proxy via additional parameters in the username. This approach also supports session control. Here is a sample of credentials:
customer-USERNAME-cc-US-city-CITY-sessid-abcde12345:PASSWORD
customer-USERNAME-cc-US-city-CITY-sessid-abcde12345-sesstime-5:PASSWORD
Below is a breakdown of the structure:
Query parameters
Parameter | Description |
---|---|
| Username |
| Case insensitive country code in 2-letter 3166-1 alpha-2 format. For example, |
| Case insensitive city name in English. This parameter must be accompanied by |
| Case insensitive US state name with us_ in the beginning, for example, |
| Session ID to keep the same IP with upcoming queries. The session expires in 10 minutes. After that, a new IP address is assigned to that session ID. Random string, 0-9, and A-Z characters are supported. |
| The session time parameter keeps the same IP for a certain period. The maximum session time is 30 minutes. |
| Password |
- required parameter
Last updated