Location API Documentation

For UNLIMITED subscription only.

Introduction

This API documentation is for the UNLIMITED subscription only. Please keep the RESIMOTE IP Dashboard open to be able to use API.

The base URL for all endpoints is:

http://127.0.0.1:55555

API Endpoints

GET /locations

Retrieve a list of all available locations with their details.

Response

Returns an array of location objects.

Python
JavaScript
import requests

# Get all locations
response = requests.get('http://127.0.0.1:55555/locations')
locations = response.json()

# Print the first 2 locations
for location in locations[:2]:
    print(f"Country: {location['location']}")
    print(f"Region Code: {location['region_code']}")
    print(f"Country Code: {location['country_code']}")
    print(f"Location ID: {location['location_id']}")
    print("---")
// Using fetch API
fetch('http://127.0.0.1:55555/locations')
  .then(response => response.json())
  .then(locations => {
    // Print the first 2 locations
    locations.slice(0, 2).forEach(location => {
      console.log(`Country: ${location.location}`);
      console.log(`Region Code: ${location.region_code}`);
      console.log(`Country Code: ${location.country_code}`);
      console.log(`Location ID: ${location.location_id}`);
      console.log("---");
    });
  })
  .catch(error => console.error('Error:', error));

Example Response

[
  {
    "country_code": "AO",
    "location": "Angola",
    "location_id": 100,
    "region_code": "AFM",
    "tunnel_code": "AO"
  },
  {
    "country_code": "AR",
    "location": "Argentina",
    "location_id": 101,
    "region_code": "AMS",
    "tunnel_code": "AR"
  },
  // ... more locations
]

GET /locations/name/{country}

Retrieve location details by country name (case-insensitive).

Path Parameters

Parameter Type Description
country string The name of the country
Python
JavaScript
import requests

# Get location by country name
country = 'japan'
response = requests.get(f'http://127.0.0.1:55555/locations/name/{country}')

if response.status_code == 200:
    location = response.json()
    print(f"Country: {location['country']}")
    print(f"Region Code: {location['region_code']}")
    print(f"Country Code: {location['country_code']}")
    print(f"Location ID: {location['resimote_location_id']}")
else:
    print(f"Error: {response.status_code}")
// Using fetch API
const country = 'japan';
fetch(`http://127.0.0.1:55555/locations/name/${country}`)
  .then(response => {
    if (!response.ok) {
      throw new Error(`HTTP error! Status: ${response.status}`);
    }
    return response.json();
  })
  .then(location => {
    console.log(`Country: ${location.country}`);
    console.log(`Region Code: ${location.region_code}`);
    console.log(`Country Code: ${location.country_code}`);
    console.log(`Location ID: ${location.resimote_location_id}`);
  })
  .catch(error => console.error('Error:', error));

Example Response

{
  "country": "Japan",
  "country_code": "JP",
  "region_code": "ASE",
  "tunnel_code": "JP",
  "resimote_location_id": 143
}

GET /locations/id/{location_id}

Retrieve location details by unique location ID.

Path Parameters

Parameter Type Description
location_id integer The unique ID of the location
Python
JavaScript
import requests

# Get location by ID
location_id = 143  # Japan
response = requests.get(f'http://127.0.0.1:55555/locations/id/{location_id}')

if response.status_code == 200:
    location = response.json()
    print(f"Country: {location['country']}")
    print(f"Region Code: {location['region_code']}")
    print(f"Country Code: {location['country_code']}")
else:
    print(f"Error: {response.status_code}")
// Using fetch API
const locationId = 143;  // Japan
fetch(`http://127.0.0.1:55555/locations/id/${locationId}`)
  .then(response => {
    if (!response.ok) {
      throw new Error(`HTTP error! Status: ${response.status}`);
    }
    return response.json();
  })
  .then(location => {
    console.log(`Country: ${location.country}`);
    console.log(`Region Code: ${location.region_code}`);
    console.log(`Country Code: ${location.country_code}`);
  })
  .catch(error => console.error('Error:', error));

Example Response

{
  "country": "Japan",
  "country_code": "JP",
  "region_code": "ASE",
  "tunnel_code": "JP",
  "resimote_location_id": 143
}

GET /locations/countrycode/{code}

Retrieve location details by country code (case-insensitive).

Path Parameters

Parameter Type Description
code string The 2-letter country code
Python
JavaScript
import requests

# Get location by country code
country_code = 'jp'  # Japan
response = requests.get(f'http://127.0.0.1:55555/locations/countrycode/{country_code}')

if response.status_code == 200:
    location = response.json()
    print(f"Country: {location['country']}")
    print(f"Region Code: {location['region_code']}")
    print(f"Location ID: {location['resimote_location_id']}")
else:
    print(f"Error: {response.status_code}")
// Using fetch API
const countryCode = 'jp';  // Japan
fetch(`http://127.0.0.1:55555/locations/countrycode/${countryCode}`)
  .then(response => {
    if (!response.ok) {
      throw new Error(`HTTP error! Status: ${response.status}`);
    }
    return response.json();
  })
  .then(location => {
    console.log(`Country: ${location.country}`);
    console.log(`Region Code: ${location.region_code}`);
    console.log(`Location ID: ${location.resimote_location_id}`);
  })
  .catch(error => console.error('Error:', error));

Example Response

{
  "country": "Japan",
  "country_code": "JP",
  "region_code": "ASE",
  "tunnel_code": "JP",
  "resimote_location_id": 143
}

GET /locations/search

Search and filter locations based on various query parameters.

Query Parameters

Parameter Type Description
region string Filter by region code (e.g., "EUW" for Western Europe)
country_code string Filter by country code (e.g., "US" for United States)
tunnel_code string Filter by tunnel code
country string Filter by country name (partial match)
Python
JavaScript
import requests

# Search for locations in Europe (Western)
params = {
    'region': 'EUW'
}
response = requests.get('http://127.0.0.1:55555/locations/search', params=params)

if response.status_code == 200:
    locations = response.json()
    print(f"Found {len(locations)} locations in Western Europe:")
    for country, details in locations.items():
        print(f"- {country} ({details['country_code']})")
else:
    print(f"Error: {response.status_code}")
// Using fetch API
const params = new URLSearchParams({
  region: 'EUW'
});

fetch(`http://127.0.0.1:55555/locations/search?${params}`)
  .then(response => {
    if (!response.ok) {
      throw new Error(`HTTP error! Status: ${response.status}`);
    }
    return response.json();
  })
  .then(locations => {
    console.log(`Found ${Object.keys(locations).length} locations in Western Europe:`);
    Object.entries(locations).forEach(([country, details]) => {
      console.log(`- ${country} (${details.country_code})`);
    });
  })
  .catch(error => console.error('Error:', error));

Example Response

{
  "Austria": {
    "country_code": "AT",
    "region_code": "EUW",
    "tunnel_code": "AT",
    "location_id": 104
  },
  "Belgium": {
    "country_code": "BE",
    "region_code": "EUW",
    "tunnel_code": "BE",
    "location_id": 108
  },
  // ... more locations in Western Europe
}

POST /changelocation

Change the current location using various identification methods.

Request Body Parameters

Parameter Type Description
resimote_location string The country name to change location to
country_code string Alternative: The 2-letter country code
tunnel_code string Alternative: The tunnel code
location_id integer Alternative: The unique location ID

Note: Only one parameter is required. If multiple parameters are provided, they are checked in the following order of precedence: resimote_location > country_code > tunnel_code > location_id

Python
JavaScript
import requests
import json

# Change location using country name
payload = {
    "resimote_location": "Japan"
}
response = requests.post('http://127.0.0.1:55555/changelocation', json=payload)

if response.status_code == 200:
    result = response.json()
    if result['success']:
        print("Location changed successfully!")
        if 'data' in result:
            data = result['data']
            print(f"Country: {data.get('whoer_country', 'N/A')}")
            print(f"City: {data.get('whoer_city', 'N/A')}")
            print(f"IP Type: {data.get('whoer_ip_type', 'N/A')}")
    else:
        print(f"Failed to change location: {result.get('reason', 'Unknown error')}")
else:
    print(f"Error: {response.status_code}")
// Using fetch API
const payload = {
  "resimote_location": "Japan"
};

fetch('http://127.0.0.1:55555/changelocation', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify(payload)
})
  .then(response => {
    if (!response.ok) {
      throw new Error(`HTTP error! Status: ${response.status}`);
    }
    return response.json();
  })
  .then(result => {
    if (result.success) {
      console.log("Location changed successfully!");
      if (result.data) {
        const data = result.data;
        console.log(`Country: ${data.whoer_country || 'N/A'}`);
        console.log(`City: ${data.whoer_city || 'N/A'}`);
        console.log(`IP Type: ${data.whoer_ip_type || 'N/A'}`);
      }
    } else {
      console.error(`Failed to change location: ${result.reason || 'Unknown error'}`);
    }
  })
  .catch(error => console.error('Error:', error));

Example Response

{
  "success": true,
  "message": "IP change completed",
  "data": {
    "ip2l_fraud_score": 0,
    "ip2l_ip_type": "DCH",
    "ip2l_country": "Japan",
    "ip2l_city": "Tokyo",
    "ip2l_region": "Tokyo",
    "ip2l_isp": "NTT Communications",
    "ip2l_timezone": "Asia/Tokyo",
    "whoer_fraud_score": 0,
    "whoer_ip_type": "Data Center",
    "whoer_is_proxy": false,
    "whoer_is_vpn": false,
    "whoer_country": "Japan",
    "whoer_city": "Tokyo",
    "whoer_region": "Tokyo",
    "whoer_isp": "NTT Communications Corporation"
  }
}

Error Handling

The API uses standard HTTP status codes to indicate success or failure of requests.

Status Code Description
200 OK The request was successful
400 Bad Request The request was invalid or missing required parameters
404 Not Found The requested resource (location) was not found
500 Internal Server Error An unexpected error occurred on the server

Data Models

Location Object

Field Type Description
location / country string The name of the country
region_code string Code representing the geographical region (e.g., "EUW" for Western Europe)
country_code string 2-letter country code (ISO 3166-1 alpha-2)
tunnel_code string Code used for tunnel identification
location_id / resimote_location_id integer Unique identifier for the location

Change Location Response Object

Field Type Description
success boolean Indicates if the operation was successful
message string A description of the result
reason string Reason for failure (when success is false)
data object Contains detailed information about the new location