Making Requests

Basic Query

A basic query is simple and straightforward. All you need to provide are your username and password. No additional parameters are necessary. When you execute this query, the request will be routed through a random IP address (proxy). Each subsequent request will automatically rotate and use a different proxy for a fresh connection.

In this example, a query to ip.homeip.io is performed from a random IP:

curl -x pr.oxylabs.io:7777 -U "customer-USERNAME:PASSWORD" http://ip.homeip.io

Replace USERNAME and PASSWORD with your actual proxy user credentials.

Utilizing the Backconnect Proxy for Geo-specific Requests

With HomeIP's backconnect proxy (pr.homeip.io:7777), you have the flexibility to tailor your requests based on geographic location, down to the specific country or city. This is achieved by simply adding specific parameters to your username. Additionally, this method seamlessly integrates session control to maintain the same proxy for multiple requests.

Sample Credentials

To illustrate, here's how you'd structure your credentials:

1. Basic Connection

username=USERNAME:PASSWORD

2. Targeting a Specific Country (e.g., France)

username=USERNAME+country=fr:PASSWORD

3. Targeting a Specific City (e.g., London, UK)

username=USERNAME+country=uk+state=england+city=london:PASSWORD

4. Implementing Session Control

username=USERNAME+session=YourUniqueSessionID:PASSWORD

Replace 'YourUniqueSessionID' with a unique identifier for session consistency.

Query parameters

ParameterDescription

username

Username

country

Case insensitive country code in 2-letter 3166-1 alpha-2 format. For example, DE for Germany, GB for the United Kingdom, TH for Thailand.

city

Case insensitive city name in English. This parameter must be accompanied bycountry and state for better accuracy, for example, country=uk+state=england+city=london for London, United Kingdom.

state

Case insensitive US state name with us_ in the beginning, for example, country=us+state=texas.

rotation

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.

session

The session time parameter keeps the same IP for a certain period. The maximum session time is 30 minutes.

password

Password

Last updated