Purchasing Static Residential Proxies via the API
Learn how to purchase static residential proxies via the API and export them to a text file
This guide demonstrates how to programmatically purchase static residential proxies through the Ping Proxies API and then export them to a text file. The process involves:
- Getting product information using the catalog endpoint
- Creating a checkout for static residential proxies
- Exporting the proxies to a text file using
list_by_search
Prerequisites
Before you begin, you’ll need:
- Your Ping Proxies API keys (both public and private)
- Enough credit balance in your account or a payment method set up
Implementation Examples
Process Overview
-
Product Selection:
- We directly use the product code for US static residential proxies (“isp_us”)
- You can find available product codes in your dashboard or using the catalog endpoint
-
Checkout Creation:
- We create a checkout using the product code, quantity, and billing cycle
- The API returns a service ID which we’ll use to access our proxies
-
Proxy Export:
- Once the purchase is complete, we use the
list_by_search
endpoint to get our proxies - We filter by service ID and specify the format we want (HTTP in this example)
- Finally, we save the proxies to a text file
- Once the purchase is complete, we use the
Additional Considerations
- In a production environment, implement a polling mechanism to check if the service is active before attempting to export proxies
- The default proxy user credentials are used in this example
- You may want to create a custom proxy user for better organization and access control