How to work with Residential and Mobile Proxies via API
Before using the API tool, make sure that your IP is not on your service's whitelist. IP whitelists are prioritized over regular proxy lists and API tool logins.
Basic usage
- Proxy host:
pool.infatica.io
- Proxy port:
10000
- Proxy type:
HTTPS/SOCKS5 (autodetected)
- Proxy user:
xxx
- Proxy password:
xxx
Please note that pool.infatica.io
is a geo-location-based DNS record that automatically adjusts based on your server's location.
If you prefer to manually select a gateway for Residential proxies, use the following:
poolus.infatica.io
– for North and South America;pooleu.infatica.io
– for all regions except the Americas.
Also, except http & socks5 we also have https, but we do not recommend to use it for performance reasons.
For simultaneous requests, use different ports in the range 10000-10999.
Important note: Each IP address port corresponds to a unique IP address (e.g. pool.infatica.io:10005 and pool.infatica.io:10006 are different IPs).
How to find your proxy login for API
The API tool uses only 1 login in your plan, which you can find in your Infatica account. Your other proxy logins from the proxy lists will not be used for the API.
- Go to
My Services
on the left side menu:
- Scroll down to the
Generate Proxy List
section and click theAPI Tool
button:
- You will then be taken to a page for working with the API.
Your proxy login and password are in the Proxy User
and Proxy Password
fields. Use only this login and password to work with the API.
Host formats:
Domain:
- HTTPS proxy URL:
http://xxx:xxx@pool.infatica.io:10000
- SOCKS5 proxy URL:
socks5://xxx:xxx@pool.infatica.io:10000
Curl command line sample:
curl -v -x xxx:xxx@pool.infatica.io:10000 https://www.google.com
For each request, a new exit IP address is allocated from the global IP pool.
Restrict exit IPs to a specific country
You can add country data to the login info as follows:
xxx_c_US
Where US is a two-letter uppercase country code according to ISO 3166-1:
Country codes (click here to expand)
Code | Country name | Code | Country name | Code | Country name |
---|---|---|---|---|---|
AD | Andorra | GL | Greenland | NO | Norway |
AE | United Arab Emirates | GM | Gambia | NP | Nepal |
AF | Afghanistan | GN | Guinea | NR | Nauru |
AG | Antigua and Barbuda | GP | Guadeloupe | NU | Niue |
AI | Anguilla | GQ | Equatorial Guinea | NZ | New Zealand |
AL | Albania | GR | Greece | OM | Oman |
AM | Armenia | GS | South Georgia and the South Sandwich Islands | PA | Panama |
AO | Angola | GT | Guatemala | PE | Peru |
AQ | Antarctica | GU | Guam | PF | French Polynesia |
AR | Argentina | GW | Guinea-Bissau | PG | Papua New Guinea |
AS | American Samoa | GY | Guyana | PH | Philippines |
AT | Austria | HK | Hong Kong | PK | Pakistan |
AU | Australia | HM | Heard Island and McDonald Islands | PL | Poland |
AW | Aruba | HN | Honduras | PM | Saint Pierre and Miquelon |
AX | Åland Islands | HR | Croatia | PN | Pitcairn |
AZ | Azerbaijan | HT | Haiti | PR | Puerto Rico |
BA | Bosnia and Herzegovina | HU | Hungary | PS | Palestine, State of |
BB | Barbados | ID | Indonesia | PT | Portugal |
BD | Bangladesh | IE | Ireland | PW | Palau |
BE | Belgium | IL | Israel | PY | Paraguay |
BF | Burkina Faso | IM | Isle of Man | QA | Qatar |
BG | Bulgaria | IN | India | RE | Réunion |
BH | Bahrain | IO | British Indian Ocean Territory | RO | Romania |
BI | Burundi | IQ | Iraq | RS | Serbia |
BJ | Benin | IR | Iran (Islamic Republic of) | RU | Russian Federation |
BL | Saint Barthélemy | IS | Iceland | RW | Rwanda |
BM | Bermuda | IT | Italy | SA | Saudi Arabia |
BN | Brunei Darussalam | JE | Jersey | SB | Solomon Islands |
BO | Bolivia (Plurinational State of) | JM | Jamaica | SC | Seychelles |
BQ | Bonaire, Sint Eustatius and Saba | JO | Jordan | SD | Sudan |
BR | Brazil | JP | Japan | SE | Sweden |
BS | Bahamas | KE | Kenya | SG | Singapore |
BT | Bhutan | KG | Kyrgyzstan | SH | Saint Helena, Ascension and Tristan da Cunha |
BV | Bouvet Island | KH | Cambodia | SI | Slovenia |
BW | Botswana | KI | Kiribati | SJ | Svalbard and Jan Mayen |
BY | Belarus | KM | Comoros | SK | Slovakia |
BZ | Belize | KN | Saint Kitts and Nevis | SL | Sierra Leone |
CA | Canada | KP | Korea (Democratic People's Republic of) | SM | San Marino |
CC | Cocos (Keeling) Islands | KR | Korea, Republic of | SN | Senegal |
CD | Congo, Democratic Republic of the | KW | Kuwait | SO | Somalia |
CF | Central African Republic | KY | Cayman Islands | SR | Suriname |
CG | Congo | KZ | Kazakhstan | SS | South Sudan |
CH | Switzerland | LA | Lao People's Democratic Republic | ST | Sao Tome and Principe |
CI | Côte d'Ivoire | LB | Lebanon | SV | El Salvador |
CK | Cook Islands | LC | Saint Lucia | SX | Sint Maarten (Dutch part) |
CL | Chile | LI | Liechtenstein | SY | Syrian Arab Republic |
CM | Cameroon | LK | Sri Lanka | SZ | Eswatini |
CN | China | LR | Liberia | TC | Turks and Caicos Islands |
CO | Colombia | LS | Lesotho | TD | Chad |
CR | Costa Rica | LT | Lithuania | TF | French Southern Territories |
CU | Cuba | LU | Luxembourg | TG | Togo |
CV | Cabo Verde | LV | Latvia | TH | Thailand |
CW | Curaçao | LY | Libya | TJ | Tajikistan |
CX | Christmas Island | MA | Morocco | TK | Tokelau |
CY | Cyprus | MC | Monaco | TL | Timor-Leste |
CZ | Czechia | MD | Moldova, Republic of | TM | Turkmenistan |
DE | Germany | ME | Montenegro | TN | Tunisia |
DJ | Djibouti | MF | Saint Martin (French part) | TO | Tonga |
DK | Denmark | MG | Madagascar | TR | Türkiye |
DM | Dominica | MH | Marshall Islands | TT | Trinidad and Tobago |
DO | Dominican Republic | MK | North Macedonia | TV | Tuvalu |
DZ | Algeria | ML | Mali | TW | Taiwan, Province of China |
EC | Ecuador | MM | Myanmar | TZ | Tanzania, United Republic of |
EE | Estonia | MN | Mongolia | UA | Ukraine |
EG | Egypt | MO | Macao | UG | Uganda |
EH | Western Sahara | MP | Northern Mariana Islands | UM | United States Minor Outlying Islands |
ER | Eritrea | MQ | Martinique | US | United States of America |
ES | Spain | MR | Mauritania | UY | Uruguay |
ET | Ethiopia | MS | Montserrat | UZ | Uzbekistan |
FI | Finland | MT | Malta | VA | Holy See |
FJ | Fiji | MU | Mauritius | VC | Saint Vincent and the Grenadines |
FK | Falkland Islands (Malvinas) | MV | Maldives | VE | Venezuela (Bolivarian Republic of) |
FM | Micronesia (Federated States of) | MW | Malawi | VG | Virgin Islands (British) |
FO | Faroe Islands | MX | Mexico | VI | Virgin Islands (U.S.) |
FR | France | MY | Malaysia | VN | Viet Nam |
GA | Gabon | MZ | Mozambique | VU | Vanuatu |
GB | United Kingdom of Great Britain and Northern Ireland | NA | Namibia | WF | Wallis and Futuna |
GD | Grenada | NC | New Caledonia | WS | Samoa |
GE | Georgia | NE | Niger | YE | Yemen |
GF | French Guiana | NF | Norfolk Island | YT | Mayotte |
GG | Guernsey | NG | Nigeria | ZA | South Africa |
GH | Ghana | NI | Nicaragua | ZM | Zambia |
GI | Gibraltar | NL | Netherlands | ZW | Zimbabwe |
Curl command line sample:
curl -v -x xxx_c_US:xxx@pool.infatica.io:10000 https://www.google.com
Restrict exit IPs to a specific subdivision
You can add subdivision data to the login info as follows : xxx_sd_ID
The list with ID of subdivisions you can find here.
Curl command line sample:
curl -v -x xxx_sd_1906:xxx@pool.infatica.io:10000 https://www.google.com
Restrict exit IPs to a specific city
You can add city data to the login info as follows:
xxx_city_Paris
You can specify both country and city at the same time like:
xxx_c_US_city_New-York
.
Curl command line sample:
curl -v -x xxx_city_Paris:xxx@pool.infatica.io:10000 https://www.google.com
Spaces in city names (e.g. New York) must be replaced with the minus sign (-). For example:
curl -v -x xxx_city_New-York:xxx@pool.infatica.io:10000 https://www.google.com
Restrict exit IPs to a specific ISP
You can add ISP data to the login info as follows : xxx_isp_ID
The list with ID of ISPs you can find here.
Curl command line sample:
curl -v -x xxx_isp_51811:xxx@pool.infatica.io:10000 https://www.google.com
Restrict exit IPs to a specific ASN
You can add ASN data to the login info as follows : xxx_asn_12389
Curl command line sample:
curl -v -x xxx_asn_12389:xxx@pool.infatica.io:10000 https://www.google.com
Restrict exit IPs to a specific ZIP code
You can add ZIP code to the login info as follows : xxx_c_US_zip_10001
The ZIP code works only in combination with the country code.
Curl command line sample:
curl -v -x xxx_c_US_zip_10001:xxx@pool.infatica.io:10000 https://www.google.com
Session control
Session ID
If you need to initiate requests from the same IP more than once (reuse the same IP), you can add a session ID to the login as follows: xxx_s_100
In this case, 100 is your session ID. You can use any alpha-numeric string as a session ID.
If you repeat the session ID in the subsequent requests, you’ll get the same exit IP as long as it stays online.
Time limit for inactive sessions - 60 minutes.
Curl command line sample:
curl -v -x xxx_c_US_s_100:xxx@pool.infatica.io:10000 https://www.google.com
Session time
If you need to set up the session time (rotation), you can add a session time to the login with session ID as follows: xxx_s_100_ttl_30s
The ttl
parameter goes along with the session ID and allows you to set the session time. The suffixes s
(seconds), m
(minutes), h
(hours) can be used in this parameter. After the specified time has elapsed, a request within that session will cause it to be re-created, resulting in the assignment of a new IP address (it's an alternative method to set a custom rotation time for each session).
Example with a TTL of 10 seconds:
curl -v -x xxx_c_US_s_100_ttl_10s:xxx@pool.infatica.io:10000 https://www.google.com
Example with a TTL of 15 minutes:
curl -v -x xxx_c_US_s_100_ttl_15m:xxx@pool.infatica.io:10000 https://www.google.com
Example with a TTL of with 1 hour:
curl -v -x xxx_c_US_s_100_ttl_1h:xxx@pool.infatica.io:10000 https://www.google.com
Different geotargeting combinations
You can also specify different targeting combinations - country, city, ISP, ASN, session - at the same time.
Example with country, city, ASN, session.
curl -v -x xxx_c_US_city_New-York_asn_12271_s_100:xxx@pool.infatica.io:10000 https://www.google.com
Example with country, city, session.
curl -v -x xxx_c_US_city_New-York_s_100:xxx@pool.infatica.io:10000 https://www.google.com
Example with country, ASN.
curl -v -x xxx_c_US_asn_12271:xxx@pool.infatica.io:10000 https://www.google.com