Proxy Sale
  • Introduction
  • Getting Started
  • API Reference
    • Balance
      • Get Balance
      • Add Balance
      • Pay Methods
    • Proxies
      • List Proxies
      • Download Proxies
      • Set Proxy Comments
    • Order
      • Reference List
      • Calculate Order
      • Create Order
    • Renewal
      • Calculate Renewal
      • Create Renewal Order
    • Residential Proxies
      • Package Info
      • Download Geo
      • Get IP Lists
      • Create IP List
      • Rename IP List
      • Delete IP List
      • API-TOOL
  • Users Links
    • FAQ
    • Blog
  • Support
    • support@proxy-sale.com
    • Telegram
Powered by GitBook
On this page
  1. API Reference
  2. Residential Proxies

Download Geo

GET https://proxy-sale.com/personal/api/v1/{apiKey}/resident/geo

This endpoint lets you download a ZIP archive with the geo.json file, which contains available locations for residential proxies, making it easier to select specific geographic targets.

Headers

Name
Value

Accept

application/octet-stream

Path parameters

Name
Type
Description

apiKey*

string

API key to authorize requests

Request examples

curl -X GET "https://proxy-sale.com/personal/api/v1/YOUR_API_KEY_HERE/resident/geo" \
     -H "Accept: application/octet-stream" \
     -O -J
<?php
$apiKey = "YOUR_API_KEY"; // Replace YOUR_API_KEY with your actual API key
$downloadUrl = "https://proxy-sale.com/personal/api/v1/" . $apiKey . "/resident/geo";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $downloadUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/octet-stream'));

$response = curl_exec($ch);

if(curl_errno($ch)) {
    echo "Error: " . curl_error($ch);
} else {
    $destination = "geo.zip";
    $file = fopen($destination, "w+");
    fputs($file, $response);
    fclose($file);

    echo "ZIP archive has been downloaded successfully.";
}

curl_close($ch);
?>
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;

public class GetPackageInfoExample {
    public static void main(String[] args) {
        String apiKey = "YOUR_API_KEY_HERE";
        try {
            URL url = new URL("https://proxy-sale.com/personal/api/v1/" + apiKey + "/resident/package");
            HttpURLConnection conn = (HttpURLConnection) url.openConnection();
            conn.setRequestMethod("GET");
            conn.setRequestProperty("Accept", "application/json");

            BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
            String inputLine;
            StringBuilder response = new StringBuilder();

            while ((inputLine = in.readLine()) != null) {
                response.append(inputLine);
            }
            in.close();

            // Print the response
            System.out.println(response.toString());

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
PreviousPackage InfoNextGet IP Lists

Last updated 1 year ago