Skip to content

Residential targeting

Use four separate catalogues under https://api.ltesocks.io/v2/proxies/residential/locations. Each request requires a bearer token and the matching proxy.residential.locations.{entity} ability, or a wildcard token.

GET endpointFilters
/countriesOptional search by country name or code; optional exact country_code
/regionsRequired country_code; optional search by region name or code
/citiesRequired country_code; optional region_code and search
/asnOptional country_code; optional search by ASN number or operator name

Country codes are case insensitive. Preserve region and city codes exactly as returned. To browse a country's cities across all regions, omit region_code. Cities include both parent codes, so identical city codes in different regions remain distinguishable.

Terminal window
curl --get 'https://api.ltesocks.io/v2/proxies/residential/locations/cities' \
--header "Authorization: Bearer $LTESOCKS_API_TOKEN" \
--data-urlencode 'country_code=us' \
--data-urlencode 'search=Springfield' \
--data-urlencode 'page=1' \
--data-urlencode 'page_size=25'
{
"success": true,
"code": 200,
"data": [
{ "code": "springfield", "name": "Springfield", "country_code": "us", "region_code": "illinois" }
],
"page_info": { "page": 1, "page_size": 25, "total_count": 1 }
}

All four catalogues use page (default 1) and page_size (default 25, maximum 100). Filters apply before pagination, and total_count is the full matching count. Unknown countries or regions and pages beyond the last page return an empty data array. Invalid parameters return 422 with field errors.

ASN results contain code, name, and country_codes. An ASN appears once even if it is available in several countries. Continue paging to read the full catalogue; it is not limited to the first 100 ASNs. Availability reflects the active residential provider and its configured package and may be cached.

GET /v2/user also returns residentialProxy.availableData, the remaining residential traffic in bytes. This field is part of the existing user object. For example, 1073741824 bytes equals 1 GiB.

ASN filtering also accepts region_code and city_code; either requires country_code. For purchases, sub-user credentials, and traffic allocation, see Residential sub-users and traffic.