Look up the geo-targeting options available for your proxies — countries, regions, cities, ISPs, and ZIP codes. These are the same dropdown feeds the dashboard uses when you build a proxy: query them to discover the code values you then pass to the location tokens of a proxy descriptor.
Every list returns a resource collection: { "data": [ ... ], "meta": { "has_more": bool } }. This is not the standard {success, payload, ...} envelope used by the resource controllers elsewhere in the API — read data directly and page with meta.has_more.
A "Random" option with code: "any" is always prepended as the first item of every list. Passing any to a proxy location token tells the network to pick that level automatically. The country ru is omitted from all responses unless your account is explicitly permitted to use it.
Common Query Parameters
All five endpoints accept the same query parameters (validated by a single shared request). Codes are matched exactly; name is a case-insensitive partial match. Filters that don't apply to a given endpoint are simply ignored, so you can reuse one parameter builder across all of them.
Shared Query Parameters
Name
Type
Required
Description
connection_type
string
Optional
Proxy network type, max 64 chars. Defaults to residential. Scoping filters (country/region/city) are resolved within this connection type.
country__code
string
Optional
Scope results to this country code, max 64 chars. Applies to regions, cities, isps, and zipcodes. If the country is unknown, only the "Random" row is returned.
region__code
string
Optional
Scope results to this region code, max 64 chars. Applies to cities, isps, and zipcodes.
city__code
string
Optional
Scope results to this city code, max 64 chars. Applies to isps and zipcodes.
code
string
Optional
Exact-match filter on the item's own code, max 64 chars.
zip
string
Optional
Exact-match alias for code, max 64 chars. Only meaningful on the zipcodes endpoint.
name
string
Optional
Case-insensitive partial (ILIKE) match on the item's name, max 255 chars.
availability
string
Optional
Exact-match filter on the availability field, max 64 chars.
limit
integer
Optional
Page size, 1–500. Defaults to 100.
offset
integer
Optional
Number of items to skip for pagination, ≥ 0. Defaults to 0.
Each item has the shape { code, name, availability, connection_type }. Items from the cities endpoint additionally carry a region_code field. The "Random" row always reports availability and connection_type as null.
List Countries
GET/v1/locations/countriesRequires Auth
List Countries
List Countries
Retrieve the countries available for the given connection type. The "Random" row (code "any") is always first; the country "ru" is excluded unless your account is permitted to use it.
We filled these in for you:connection_typelimit
Tweak any value if you like — or just press Try.
Query Parameters
Name
Type
Required
Description
connection_type
string
Optional
Proxy network type, max 64. Defaults to "residential".
req, _ := http.NewRequest("GET", "https://api.proxyhat.com/v1/locations/countries?connection_type=residential&limit=100", 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 body struct {
Data []map[string]interface{} `json:"data"`
Meta struct {
HasMore bool `json:"has_more"`
} `json:"meta"`
}
json.NewDecoder(resp.Body).Decode(&body)
for _, loc := range body.Data {
fmt.Printf("%v: %v\n", loc["code"], loc["name"])
}
fmt.Println("has_more:", body.Meta.HasMore)
List Regions
GET/v1/locations/regionsRequires Auth
List Regions
List Regions
Retrieve the regions (states/provinces) within a country. Pass country__code to scope the list; if the country is excluded or unknown, only the "Random" row is returned.
We filled these in for you:country__codeconnection_typelimit
Tweak any value if you like — or just press Try.
Query Parameters
Name
Type
Required
Description
country__code
string
Optional
Scope to this country code (max 64). Recommended.
connection_type
string
Optional
Proxy network type, max 64. Defaults to "residential".
req, _ := http.NewRequest("GET", "https://api.proxyhat.com/v1/locations/isps?country__code=us", 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 body struct {
Data []map[string]interface{} `json:"data"`
Meta struct {
HasMore bool `json:"has_more"`
} `json:"meta"`
}
json.NewDecoder(resp.Body).Decode(&body)
for _, loc := range body.Data {
fmt.Printf("%v: %v\n", loc["code"], loc["name"])
}
List ZIP Codes
GET/v1/locations/zipcodesRequires Auth
List ZIP Codes
List ZIP Codes
Retrieve the ZIP/postal codes available within a country, region, and/or city. The zip parameter is a convenient exact-match alias for code. ZIP items may reuse the code as their name.
We filled these in for you:country__codelimit
Tweak any value if you like — or just press Try.
Query Parameters
Name
Type
Required
Description
country__code
string
Optional
Scope to this country code (max 64).
region__code
string
Optional
Scope to this region code (max 64).
city__code
string
Optional
Scope to this city code (max 64).
zip
string
Optional
Exact-match filter on the ZIP code - alias for "code" (max 64).
connection_type
string
Optional
Proxy network type, max 64. Defaults to "residential".