Skip to content

Get a city

GET
/locations/cities/{id}
curl --request GET \
--url 'https://api.proxyrequest.com/api/v1/locations/cities/example?include_asns=true&package_id=550e8400-e29b-41d4-a716-446655440002' \
--header 'Accept-Language: de' \
--header 'Authorization: Bearer <token>'

Returns one city and its available network targeting options. The asns field is always present and defaults to an empty array. Pass include_asns=true to include available autonomous system numbers. This option does not affect the standalone /locations/asn endpoint or the compact proxy-node response format.

id
required
string
include_asns
boolean

The asns field is always present and defaults to an empty array. Pass include_asns=true to include available autonomous system numbers. This option does not affect the standalone /locations/asn endpoint or the compact proxy-node response format.

Examples
ExampleIncludeASNs

Include ASNs

true
max_count
integer
<= 18446744073709552000

Inclusive maximum node count in the published location dictionary. Either bound may be omitted. Decimal digits only, with surrounding whitespace ignored; empty values, signs, fractions, overflow and min_count > max_count return 400. Unknown counts are zero. Filters primary records before ordering/pagination; nested networks, parents and ASN geo are unchanged. A detail outside the range returns 404. Counts describe dictionary membership, not live node health.

min_count
integer
<= 18446744073709552000

Inclusive minimum node count in the published location dictionary. Either bound may be omitted. Decimal digits only, with surrounding whitespace ignored; empty values, signs, fractions, overflow and min_count > max_count return 400. Unknown counts are zero. Filters primary records before ordering/pagination; nested networks, parents and ASN geo are unchanged. A detail outside the range returns 404. Counts describe dictionary membership, not live node health.

package_id
required
string format: uuid

Package whose targeting availability should be returned.

Examples
ExampleResidentialPackage

Residential package

550e8400-e29b-41d4-a716-446655440002
Accept-Language
string
default: en

Preferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es. Regional language tags and quality weights are accepted; unsupported or omitted values use English.

Examples
de

The operation completed successfully.

Media typeapplication/json
object
count
required

Node count in Rust search mode.

integer
id
string
<= 36 characters
code
required

Raw city code as it appears in the source data. los_angeles paris

string
<= 255 characters
name
required

English display name of the city used across the admin and API responses.

string
<= 255 characters
country
required
object
count
required

Node count in Rust search mode; unknown quantities are zero.

integer
code
required
string
name
required
string
original_name
string
region
required
object
count
required

Node count in Rust search mode; unknown quantities are zero.

integer
code
required
string
name
required
string
original_name
string
isps
required
Array<object>
object
count
required

Node count in Rust search mode; unknown quantities are zero.

integer
code
required
string
name
required
string
asns
required

The asns field is always present and defaults to an empty array. Pass include_asns=true to include available autonomous system numbers. This option does not affect the standalone /locations/asn endpoint or the compact proxy-node response format.

Array<object>
object
count
required

Node count in Rust search mode; unknown quantities are zero.

integer
code
required
string
name
required
string
Examples
ExampleCity
{
"id": "us-ca-los-angeles",
"code": "los_angeles",
"name": "Los Angeles",
"country": {
"code": "us",
"name": "United States",
"original_name": "United States",
"count": 100
},
"region": {
"code": "california",
"name": "California",
"original_name": "California",
"count": 100
},
"isps": [
{
"code": "spectrum",
"name": "Spectrum",
"count": 100
}
],
"asns": [],
"count": 100
}
X-Locations-Generation
string

Published dictionary generation used for this response.

Cache-Control
string

Location search responses use no-store.

The request is malformed or violates a business rule.

Media typeapplication/json

Validation and API error payload. Field names may be added dynamically; field errors are returned as arrays of human-readable messages.

object
detail
string
non_field_errors
Array<string>
key
additional properties
One of:
string
Examples
ExampleValidationError

Validation error

{
"non_field_errors": [
"The request could not be processed."
]
}
Content-Language
string

Language used for human-readable errors.

Authentication credentials are missing, expired, or invalid.

Media typeapplication/json

Validation and API error payload. Field names may be added dynamically; field errors are returned as arrays of human-readable messages.

object
detail
string
non_field_errors
Array<string>
key
additional properties
One of:
string
Examples
ExampleAuthenticationRequired

Authentication required

{
"detail": "Authentication credentials were not provided."
}
Content-Language
string

Language used for human-readable errors.

The authenticated account cannot perform this operation.

Media typeapplication/json

Validation and API error payload. Field names may be added dynamically; field errors are returned as arrays of human-readable messages.

object
detail
string
non_field_errors
Array<string>
key
additional properties
One of:
string
Examples
ExamplePermissionDenied

Permission denied

{
"detail": "You do not have permission to perform this action."
}
Content-Language
string

Language used for human-readable errors.

The requested resource does not exist in the current account scope.

Media typeapplication/json

Validation and API error payload. Field names may be added dynamically; field errors are returned as arrays of human-readable messages.

object
detail
string
non_field_errors
Array<string>
key
additional properties
One of:
string
Examples
ExampleResourceNotFound

Resource not found

{
"detail": "Not found."
}
Content-Language
string

Language used for human-readable errors.

Location search is unavailable or its published index is not ready. Retry later.

Media typeapplication/json

Validation and API error payload. Field names may be added dynamically; field errors are returned as arrays of human-readable messages.

object
detail
string
non_field_errors
Array<string>
key
additional properties
One of:
string
Examples
ExampleLocationSearchUnavailable

Location search unavailable

{
"detail": "Location search is temporarily unavailable."
}
Content-Language
string

Language used for human-readable errors.