Access
Residential access data — countries, regions, country sets, proxy list generation
Generates a list of residential proxy connection strings for a subuser, rendered in the requested format with the chosen gateway, port, rotation mode, and location targeting.
API token generated in the MarsProxies dashboard under /settings. Send it as a Bearer token in the Authorization header.
Parameters for generating a list of residential proxy connection strings. Provide either subuser_hash or both username and password to target a specific subuser.
Template used to render each proxy connection string.
{hostname}:{port}:{username}:{password}Possible values: Proxy gateway hostname or its resolved IP. Must match one of the configured gateways.
ultra.marsproxies.comNamed proxy port — http or socks5. See the Protocols page for details on each protocol.
httpSession rotation mode. sticky keeps the same IP for the lifetime window; random rotates each request. See the Rotation page for more on session rotation behaviour.
stickyPossible values: Sticky session lifetime. Required when rotation=sticky. Format: {N}s (1-59), {N}m (1-59), or {N}h (1-168). Defaults to 24h. See the Rotation page for more on session rotation behaviour.
30mSubuser hash to target. Required unless username and password are provided.
A1B2C3D4E5F6G7H8I9J0K1L2M3Subuser username. Required unless subuser_hash is provided.
mr12345ab1cSubuser password. Required unless subuser_hash is provided.
Maf83Kz7k2Location targeting string built from prefixed segments joined with underscores — e.g. _country-us_city-dallas or _region-europe. Leave empty for global targeting. See the Location page for the full list of supported segments and examples.
_country-us_city-dallasNumber of proxy connection strings to generate. Default to 10.
10Generated proxy connection strings
Array of rendered proxy connection strings
ultra.marsproxies.com:44443:mr42a1b2:Mxa8Kz7k2Missing or invalid API token
Residential API is not enabled for this account
Residential user record or subuser credentials not found
Semantic validation error: the supplied location segment, username, or password does not match an existing record
Request body validation failed
Rate limit exceeded
Unknown error
curl --request POST \
--url https://api.marsproxies.com/v1/residential/access/generate-proxy-list \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"format":"{hostname}:{port}:{username}:{password}","hostname":"ultra.marsproxies.com","port":"http","rotation":"sticky","lifetime":"30m","subuser_hash":"A1B2C3D4E5F6G7H8I9J0K1L2M3","username":"mr12345ab1c","password":"Maf83Kz7k2","location":"_country-us_city-dallas","proxy_count":10}'[
"ultra.marsproxies.com:44443:mr42a1b2:Mxa8Kz7k2"
]Returns the catalog of countries available for residential proxy location targeting, with their nested cities and states.
API token generated in the MarsProxies dashboard under /settings. Send it as a Bearer token in the Authorization header.
Available countries
List of countries available for residential proxy location targeting.
Prefix to prepend to each country code when building a location string.
_country-Missing or invalid API token
Residential API is not enabled for this account
Residential user record not found for this account
Rate limit exceeded
Unknown error
curl --request GET \
--url https://api.marsproxies.com/v1/residential/access/countries \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'{
"prefix": "_country-",
"countries": [
{
"code": "us",
"name": "United States",
"cities": {
"prefix": "_city-",
"options": [
{
"code": "us",
"name": "United States"
}
]
},
"states": {
"prefix": "_city-",
"options": [
{
"code": "us",
"name": "United States"
}
]
}
}
]
}Returns the catalog of country sets (pre-grouped country bundles) available for residential proxy location targeting.
API token generated in the MarsProxies dashboard under /settings. Send it as a Bearer token in the Authorization header.
Available country sets
List of country sets (pre-grouped country bundles) available for residential proxy targeting.
Prefix to prepend to each country set code when building a location string.
_set-Missing or invalid API token
Residential API is not enabled for this account
Residential user record not found for this account
Rate limit exceeded
Unknown error
curl --request GET \
--url https://api.marsproxies.com/v1/residential/access/country-sets \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'{
"prefix": "_set-",
"country_sets": [
{
"code": "us",
"name": "United States"
}
]
}Returns the catalog of regions available for residential proxy location targeting.
API token generated in the MarsProxies dashboard under /settings. Send it as a Bearer token in the Authorization header.
Available regions
List of regions available for residential proxy location targeting.
Prefix to prepend to each region code when building a location string.
_region-Missing or invalid API token
Residential API is not enabled for this account
Residential user record not found for this account
Rate limit exceeded
Unknown error
curl --request GET \
--url https://api.marsproxies.com/v1/residential/access/regions \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'{
"prefix": "_region-",
"regions": [
{
"code": "us",
"name": "United States"
}
]
}Last updated
Was this helpful?