API guide
Last updated
Was this helpful?
Last updated
Was this helpful?
After logging into the software, switch to the API tab and enter the API proxy page.
The page is divided into two categories: extracting proxies and today's list API. Extracting proxy lists is to obtain new proxies from "ProxyList"; today's list API is used to reuse proxies in "TodayList". These proxies can be reused within 24 hours without deduction of fees.
Extract the proxy list
3.1. The list on the left corresponds to the IP filtering conditions on the right. You can select country, city, ISP, etc. to filter, and you can also change the API port.
3.2 When extracting multiple IPs, you can change the number of IPs to extract.
3.3 Extract an IP directly, copy the API URL, put the link into the software/script you want to use, and then you can automatically assign a proxy
3.4 Copy the changed API URL again, put the link in the software/script you want to use, and then you can automatically assign the proxy.
Today's API List
4.1 Today's proxy list: Query the IP information in today's list, including IP ID, package, country, city, and current online status. Enter the number of IPs you want to query, copy the API URL, put the link in the software/script you want to use, and then you can check the proxy.
4.2 Today's list custom proxy: The unique ID of the IP queried through the today's API list is added to the API URL and the forwarding port is selected
Copy the api URL, put the link into the software/script you want to use, and then you can use this IP proxy.
4.3 The list on the left corresponds to the IP filtering conditions on the right. You can select country, city, ISP, etc. to filter, and you can also change the API port.
4.4 When extracting multiple IPs, you can change the number of IPs to extract
4.5 Directly extract an IP from today's list, copy the API URL, and put the link into the software/script you want to use.
You can use the parameters like this:
Use a random proxy from any country
Use a random proxy from the United States
Use a random proxy from the United States, State: New York
Use random proxy from the United States, State: New York, City: New York
http://10.0.254168:10101/api/get_ip_list?num=1&country=US&state=NewYork&city=newyork
Use random proxy for postal code 000
Use a proxy of a specified ISP operator, such as 000
Using a random proxy from port 40010
Batch capture IP, for example, modify the number after num (num≤99)
If you want different ports to use proxies from different countries, you can set it like this:-40000
The port uses the US proxy, port 40001 uses the Japanese proxy, and port 40002 uses the UK proxy
http://10.0.254.168:10101/api/port_ip_list?ports=40000-US,40001-JP,40002-GB
If you want to release the port, you can use the free_port parameter: (version 1.2.7 and above)
Release the specified port, for example, release ports 40000, 40001, and 40002
Release all ports
If you want to modify the number and range of ports, you can do this. (Version 1.2.9 and above)
The starting port is 30000 and the number of ports is 10. (Quantity limit 999)
Country You need to enter the country IS0 alpha-2 code. If you don’t know it, you can visit:https://www.piaproxy.com/country
If you cannot obtain a proxy through the API, the following errors and reasons may occur:
- PARAMETER_ERROR_NUM
num parameter input error, please check
- PARAMETER_ERROR_IP_TIME
The ip_time parameter is entered incorrectly, please enter 1 or 2 or 3
- Error in initialization parameters:MacAdd
There is a problem with the client, please restart or reinstall
- Please set the allocation port first
No port set
- Up to 10 IP of this type can be extracted at a time
The number of fetches exceeds the upper limit, and the US Static IP Plan can fetch up to 10 at a time
- The set port segment does not meet the extraction quantity
The number of extractions is too large, exceeding the set port range
- Port not enabled
The currently set port is not enabled
- Insufficient ip balance, please buy first
Account balance is exhausted, please recharge
Failed to get IP, please try again later
The interface request failed, please check the network environment and try again