cURL Request Parameters

Below is a list of parameters followed by examples of request types:

Parameter

Description

USERNAME

Username of proxy user

res

Indicates query for residential proxy

res_sc

Prefix indicating the use of state/city configuration

country

Country code in two-letter format, not case sensitive. For example, nl indicates a proxy in the Netherlands; za for South Africa; it for Italy

city

City name, should be combined with country code, for example nl_amsterdam

state

US state, in combination with city name, for example

us_alabama_birmingham

SID

Session ID keeps the same IP for the next queries. Otherwise, a new IP is assigned for each new request. The same IP address can be used until the end user device disconnects or the session is terminated. Note that session ID (SID) does not guarantee the same IP address will be used for future sessions. SID supports any random string from 1 digit to 99999999. The lowest SID can be sid-1, and the highest SID can be sid-99999999.

NNID

The Long Session ID feature allows keeping the same IP for longer time frames (sessions) than the standard Session ID (SID) feature.

Note that Long Session ID time for RES requests can be maintained for up to 1 hour.

ASN

Add ASN number to request specific network or provider for routing internet traffic. Note - ASN works only with res_sc.

PASSWORD

Proxy user password

site URL

User's destination site

A basic query inserting only USERNAME and PASSWORD will be performed from a random residential IP address:

· curl-x USERNAME-res-any:PASSWORD@gw.ntnt.io:5959 "example.site.com"

Request a specific country / state / city proxy, as in the examples below:

· curl-x USERNAME-res-nl:PASSWORD@gw.ntnt.io:5959 "example.site.com"

· curl-x USERNAME-res_sc-nl_amsterdam:PASSWORD@gw.ntnt.io:5959 "example.site.com"

· curl-x USERNAME-res_sc-us_alabama_birmingham:PASSWORD@gw.ntnt.io:5959 "example.site.com"

Add the SID (session ID) parameter to use the same IP for next queries. Note that SID must be preceded by a country:

curl-x USERNAME-res-row-sid-45456:PASSWORD@gw.ntnt.io:5959" "example.site.com"

Enter an ASN number in your request to choose proxies from a specific carrier or network:

curl-x USERNAME-res_sc-ASN_number:PASSWORD@gw.ntnt.io:5959" "example.site.com"

Note: You can use either country or ASN parameter in each request.

You can search for ASN numbers here.

The Long Session ID feature allows keeping the same IP for longer time frames (sessions) than the standard Session ID (SID) feature. Note that Long Session ID time for RES requests can be maintained for up to 1 hour.

In order to use the Long Session ID feature, the following initial request has to be sent –

curl-x USERNAME-resfix-<country>-nnid-0:PASSWORD@gw.ntnt.io:5959 "example.site.com"

The response for the initial request will include the unique token X-NN-LLS, for example -

< HTTP/1.1 200 OK

< Cache-Control: private

< Content-Type: text/html; charset=utf-8

< Server: Microsoft-IIS/10.0

< X-AspNet-Version: 4.0.30319

< X-Powered-By: ASP.NET

< Date: Wed, 31 Jan 2024 11:11:07 GMT

< Content-Length: 12

< Connection: keep-alive

< X-NN-LLS: c3e2154118da4f6f49d

If you wish to use subsequent requests with the same IP address (the same IP address is used until the end user device disconnects), replace nnid-0 with nnid-"unique token"

For example, using the above response, the subsequent requests would be - curl -x USERNAME-resfix-<country>-nnid-c3e2154118da4f6f49d:PASSWORD@gw.ntnt.io:5959 "example.site.com"

Important note: The unique token you received is relevant for the initial request sent.

For example, if in the initial request the selected country was UK, then the unique token will cause all subsequent requests to use a UK IP address.

Last updated

Copyright NetNut LTD