Backconnect parameters
Residential proxy parameter specification to control your connection
Smartproxy offers proxy access through a single backconnect endpoint:
gate.smartproxy.com:7000
In this case, you need to pass all parameters alongside your proxy username.
Here is a list of all available parameters with a description and use:
country
– country code. Please provide it in a two-symbol ISO format. You can check most of the ISO country codes here.city
– city name. Adding this parameter to the username will let you specify the city of the IP you want to use. Please use this parameter together with the country parameter.zip
– 5-digit ZIP code. Adding this parameter to the username will let you specify the ZIP code location you want to target. It is only applicable for targeting the US and should be used with thecountry-us
parameter.state
– US state. Supports the USA location when you pickus
as the country parameter. It will allow you to specify the US state of the IP you want to use. Format:us_state_name
(e.g.us_california
).continent
– continent level filtering. You can find the continent codes on the Building a backconnect proxy page.session
– a random string to create a session to keep the same IP for more than one request. The session automatically expires after 10 minutes. After that, a new IP will be assigned to this session’s ID.sessionduration
– used withsession
. Specifies the sticky session time in minutes – can be set to any number between 1 and 1440. A session lasts for 10 minutes by default if this parameter is not indicated.asn
– target ASN number of a specific carrier.
ASN filtering
- You must choose between
city
targeting andasn
targeting, as they can’t be used simultaneously.- The same logic would apply for the
continent
,state
andcountry
parameters.- You can look up carrier numbers by searching online, for example here.
Using the backconnect entry node in applications
The backconnect entry node can be used in various applications as well. In such a case, you will need to pass every parameter for your session alongside the username in the username field like this:
user-SPusername-country-country_code-city-city_name-session-randomstring
In the example above SPusername
represents your proxy username which you would need to get from the authentication section. In the password
field, you only need to enter the password of the proxy user.
The session ID can be defined by any string of your choice (simply replace the "randomstring123" from the examples). Use a Session ID only if you want a sticky session. Otherwise, just ignore that part to receive a rotating proxy.
Use underscores when a city or state name consists of multiple words. E.g:
las_vegas
,us_new_york
orus_rhode_island
.
cURL examples
To use these commands just replace SPusername
and SPpassword
with your proxy user credentials and run them in your Terminal or Command Prompt.
Get an IP from a random location with a rotating session
curl -U SPusername:SPpassword -x gate.smartproxy.com:7000 https://ip.smartproxy.com/json
Get an IP from a specific country (in this example Italy) with a rotating session
curl -U user-SPusername-country-it:SPpassword -x gate.smartproxy.com:7000 https://ip.smartproxy.com/json
Get an IP from a specific country (in this example Italy) with a 30-minute session duration
curl -U user-SPusername-country-it-sessionduration-30:SPpassword -x gate.smartproxy.com:7000 https://ip.smartproxy.com/json
Get an IP from Portugal with a session ID
curl -U user-SPusername-country-pt-session-randomstring123:SPpassword -x gate.smartproxy.com:7000 https://ip.smartproxy.com/json
Get an IP from a specific city (in this example New York City) with a session ID
curl -U user-SPusername-country-us-city-new_york-session-randomstring123:SPpassword -x gate.smartproxy.com:7000 https://ip.smartproxy.com/json
Get an IP from a specific US state (in this example California)
curl -U user-SPusername-country-us-state-us_california:SPpassword -x gate.smartproxy.com:7000 https://ip.smartproxy.com/json
Get an IP from a specific US state (in this example the New York State)
curl -U user-SPusername-country-us-state-us_new_york:SPpassword -x gate.smartproxy.com:7000 https://ip.smartproxy.com/json
Get an IP from a specific US state and city (in this example Austin) with a session ID and a 30-minute session duration
curl -U user-SPusername-country-us-state-us_texas-city-austin-session-randomstring123-sessionduration-30:SPpassword -x gate.smartproxy.com:7000 https://ip.smartproxy.com/json
Get an IP from a specific US location using ZIP code (in this example New York) with a session ID and a 30-minute session duration
curl -U user-SPusername-country-us-zip-10001-session-randomstring123-sessionduration-30:SPpassword -x gate.smartproxy.com:7000 https://ip.smartproxy.com/json
Updated about 2 months ago