Locations API

Browse available proxy locations including countries, regions, cities, ISPs, and ZIP codes. Use these endpoints to discover targeting options for your proxy connections and build location-aware configurations.

GET /v1/locations/countries Requires Auth

List Countries

List Countries

Retrieve a list of available proxy countries. Filter by country code, name, or connection type. Results are paginated using limit and offset parameters.

Query Parameters
Name Type Required Description
code string Optional Exact match on the country code (e.g. "US", "GB").
name string Optional Partial search on the country name (e.g. "United").
connection_type string Optional Filter by connection type: "residential" or "mobile".
limit integer Optional Maximum number of results to return. Default 100, max 500.
offset integer Optional Number of results to skip for pagination.
curl "https://api.proxyhat.com/v1/locations/countries?connection_type=residential&limit=10" \
  -H "Authorization: Bearer __API_KEY__" \
  -H "Accept: application/json"
import requests

response = requests.get(
    "https://api.proxyhat.com/v1/locations/countries",
    headers={
        "Authorization": "Bearer __API_KEY__",
        "Accept": "application/json",
    },
    params={
        "connection_type": "residential",
        "limit": 10,
    },
)

countries = response.json()
for country in countries:
    print(f"{country[\"code\"]} — {country[\"name\"]}")
const params = new URLSearchParams({ connection_type: "residential", limit: "10" });

const response = await fetch(`https://api.proxyhat.com/v1/locations/countries?${params}`, {
  headers: {
    "Authorization": "Bearer __API_KEY__",
    "Accept": "application/json",
  },
});

const countries = await response.json();
countries.forEach(c => console.log(`${c.code} — ${c.name}`));
req, _ := http.NewRequest("GET", "https://api.proxyhat.com/v1/locations/countries?connection_type=residential&limit=10", nil)
req.Header.Set("Authorization", "Bearer __API_KEY__")
req.Header.Set("Accept", "application/json")

resp, err := http.DefaultClient.Do(req)
if err != nil {
    log.Fatal(err)
}
defer resp.Body.Close()

var countries []map[string]interface{}
json.NewDecoder(resp.Body).Decode(&countries)
for _, c := range countries {
    fmt.Printf("%s — %s\n", c["code"], c["name"])
}
Response 200
[
  {
    "code": "US",
    "name": "United States",
    "availability": "high",
    "connection_type": "residential"
  }
]
GET /v1/locations/regions Requires Auth

List Regions

List Regions

Retrieve a list of available proxy regions (states/provinces). Filter by country, region code, name, or connection type. Results are paginated using limit and offset parameters.

Query Parameters
Name Type Required Description
country__code string Optional Filter regions by country code (e.g. "US").
code string Optional Exact match on the region code (e.g. "CA").
name string Optional Partial search on the region name (e.g. "Californ").
connection_type string Optional Filter by connection type: "residential" or "mobile".
limit integer Optional Maximum number of results to return. Default 100, max 500.
offset integer Optional Number of results to skip for pagination.
curl "https://api.proxyhat.com/v1/locations/regions?country__code=US&limit=10" \
  -H "Authorization: Bearer __API_KEY__" \
  -H "Accept: application/json"
import requests

response = requests.get(
    "https://api.proxyhat.com/v1/locations/regions",
    headers={
        "Authorization": "Bearer __API_KEY__",
        "Accept": "application/json",
    },
    params={
        "country__code": "US",
        "limit": 10,
    },
)

regions = response.json()
for region in regions:
    print(f"{region[\"code\"]} — {region[\"name\"]}")
const params = new URLSearchParams({ country__code: "US", limit: "10" });

const response = await fetch(`https://api.proxyhat.com/v1/locations/regions?${params}`, {
  headers: {
    "Authorization": "Bearer __API_KEY__",
    "Accept": "application/json",
  },
});

const regions = await response.json();
regions.forEach(r => console.log(`${r.code} — ${r.name}`));
req, _ := http.NewRequest("GET", "https://api.proxyhat.com/v1/locations/regions?country__code=US&limit=10", nil)
req.Header.Set("Authorization", "Bearer __API_KEY__")
req.Header.Set("Accept", "application/json")

resp, err := http.DefaultClient.Do(req)
if err != nil {
    log.Fatal(err)
}
defer resp.Body.Close()

var regions []map[string]interface{}
json.NewDecoder(resp.Body).Decode(&regions)
for _, r := range regions {
    fmt.Printf("%s — %s\n", r["code"], r["name"])
}
Response 200
[
  {
    "code": "CA",
    "name": "California",
    "country_code": "US"
  }
]
GET /v1/locations/cities Requires Auth

List Cities

List Cities

Retrieve a list of available proxy cities. Filter by country, region, city code, name, or connection type. Results are paginated using limit and offset parameters.

Query Parameters
Name Type Required Description
country__code string Optional Filter cities by country code (e.g. "US").
region__code string Optional Filter cities by region code (e.g. "CA").
code string Optional Exact match on the city code (e.g. "LA").
name string Optional Partial search on the city name (e.g. "Los Ang").
connection_type string Optional Filter by connection type: "residential" or "mobile".
limit integer Optional Maximum number of results to return. Default 100, max 500.
offset integer Optional Number of results to skip for pagination.
curl "https://api.proxyhat.com/v1/locations/cities?country__code=US&region__code=CA&limit=10" \
  -H "Authorization: Bearer __API_KEY__" \
  -H "Accept: application/json"
import requests

response = requests.get(
    "https://api.proxyhat.com/v1/locations/cities",
    headers={
        "Authorization": "Bearer __API_KEY__",
        "Accept": "application/json",
    },
    params={
        "country__code": "US",
        "region__code": "CA",
        "limit": 10,
    },
)

cities = response.json()
for city in cities:
    print(f"{city[\"code\"]} — {city[\"name\"]}")
const params = new URLSearchParams({ country__code: "US", region__code: "CA", limit: "10" });

const response = await fetch(`https://api.proxyhat.com/v1/locations/cities?${params}`, {
  headers: {
    "Authorization": "Bearer __API_KEY__",
    "Accept": "application/json",
  },
});

const cities = await response.json();
cities.forEach(c => console.log(`${c.code} — ${c.name}`));
req, _ := http.NewRequest("GET", "https://api.proxyhat.com/v1/locations/cities?country__code=US&region__code=CA&limit=10", nil)
req.Header.Set("Authorization", "Bearer __API_KEY__")
req.Header.Set("Accept", "application/json")

resp, err := http.DefaultClient.Do(req)
if err != nil {
    log.Fatal(err)
}
defer resp.Body.Close()

var cities []map[string]interface{}
json.NewDecoder(resp.Body).Decode(&cities)
for _, c := range cities {
    fmt.Printf("%s — %s\n", c["code"], c["name"])
}
Response 200
[
  {
    "code": "LA",
    "name": "Los Angeles",
    "region_code": "CA",
    "country_code": "US"
  }
]
GET /v1/locations/isps Requires Auth

List ISPs

List ISPs

Retrieve a list of available Internet Service Providers (ISPs) for proxy targeting. Filter by country, name, or connection type. Results are paginated using limit and offset parameters.

Query Parameters
Name Type Required Description
country__code string Optional Filter ISPs by country code (e.g. "US").
name string Optional Partial search on the ISP name (e.g. "Comca").
connection_type string Optional Filter by connection type: "residential" or "mobile".
limit integer Optional Maximum number of results to return. Default 100, max 500.
offset integer Optional Number of results to skip for pagination.
curl "https://api.proxyhat.com/v1/locations/isps?country__code=US&limit=10" \
  -H "Authorization: Bearer __API_KEY__" \
  -H "Accept: application/json"
import requests

response = requests.get(
    "https://api.proxyhat.com/v1/locations/isps",
    headers={
        "Authorization": "Bearer __API_KEY__",
        "Accept": "application/json",
    },
    params={
        "country__code": "US",
        "limit": 10,
    },
)

isps = response.json()
for isp in isps:
    print(f"{isp[\"name\"]} — {isp[\"country_code\"]}")
const params = new URLSearchParams({ country__code: "US", limit: "10" });

const response = await fetch(`https://api.proxyhat.com/v1/locations/isps?${params}`, {
  headers: {
    "Authorization": "Bearer __API_KEY__",
    "Accept": "application/json",
  },
});

const isps = await response.json();
isps.forEach(i => console.log(`${i.name} — ${i.country_code}`));
req, _ := http.NewRequest("GET", "https://api.proxyhat.com/v1/locations/isps?country__code=US&limit=10", nil)
req.Header.Set("Authorization", "Bearer __API_KEY__")
req.Header.Set("Accept", "application/json")

resp, err := http.DefaultClient.Do(req)
if err != nil {
    log.Fatal(err)
}
defer resp.Body.Close()

var isps []map[string]interface{}
json.NewDecoder(resp.Body).Decode(&isps)
for _, i := range isps {
    fmt.Printf("%s — %s\n", i["name"], i["country_code"])
}
Response 200
[
  {
    "name": "Comcast",
    "country_code": "US"
  }
]
GET /v1/locations/zipcodes Requires Auth

List ZIP Codes

List ZIP Codes

Retrieve a list of available ZIP/postal codes for proxy targeting. Filter by country, city, or code. Results are paginated using limit and offset parameters.

Query Parameters
Name Type Required Description
country__code string Optional Filter ZIP codes by country code (e.g. "US").
city__code string Optional Filter ZIP codes by city code (e.g. "LA").
code string Optional Exact match on the ZIP code (e.g. "90001").
limit integer Optional Maximum number of results to return. Default 100, max 500.
offset integer Optional Number of results to skip for pagination.
curl "https://api.proxyhat.com/v1/locations/zipcodes?country__code=US&city__code=LA&limit=10" \
  -H "Authorization: Bearer __API_KEY__" \
  -H "Accept: application/json"
import requests

response = requests.get(
    "https://api.proxyhat.com/v1/locations/zipcodes",
    headers={
        "Authorization": "Bearer __API_KEY__",
        "Accept": "application/json",
    },
    params={
        "country__code": "US",
        "city__code": "LA",
        "limit": 10,
    },
)

zipcodes = response.json()
for zc in zipcodes:
    print(f"{zc[\"code\"]} — {zc[\"city_code\"]}")
const params = new URLSearchParams({ country__code: "US", city__code: "LA", limit: "10" });

const response = await fetch(`https://api.proxyhat.com/v1/locations/zipcodes?${params}`, {
  headers: {
    "Authorization": "Bearer __API_KEY__",
    "Accept": "application/json",
  },
});

const zipcodes = await response.json();
zipcodes.forEach(z => console.log(`${z.code} — ${z.city_code}`));
req, _ := http.NewRequest("GET", "https://api.proxyhat.com/v1/locations/zipcodes?country__code=US&city__code=LA&limit=10", nil)
req.Header.Set("Authorization", "Bearer __API_KEY__")
req.Header.Set("Accept", "application/json")

resp, err := http.DefaultClient.Do(req)
if err != nil {
    log.Fatal(err)
}
defer resp.Body.Close()

var zipcodes []map[string]interface{}
json.NewDecoder(resp.Body).Decode(&zipcodes)
for _, z := range zipcodes {
    fmt.Printf("%s — %s\n", z["code"], z["city_code"])
}
Response 200
[
  {
    "code": "90001",
    "city_code": "LA",
    "country_code": "US"
  }
]