|
| 1 | +# [DRAFT] PRXCHK API |
| 2 | + |
| 3 | +> [!TIP] |
| 4 | +> To use our API, you will need a token, which can be obtained through our Telegram bot. |
| 5 | +
|
| 6 | +To obtain a list of available proxies, you need to make a GET request to the |
| 7 | +address `https://api.prxchk.com/v2/proxies.txt` |
| 8 | + |
| 9 | +First and foremost, it is important to remember that every request must include an access token. If you pass an empty, |
| 10 | +incorrect, or expired token, the system will automatically add your IP address to a blacklist, and you will lose access |
| 11 | +to the service. To successfully authenticate, you need to pass the token as a request parameter or an HTTP header: |
| 12 | + |
| 13 | +> [!CAUTION] |
| 14 | +> The token `AQBA5gEABCDEFDobwmAxV3XTSrDpU7bxaEaeeM2Wg` is used as a demonstration example. Please **DO NOT ATTEMPT TO USE IT** in your requests. Doing so may result in permanent blocking of your IP address 🤕 |
| 15 | +
|
| 16 | +```bash |
| 17 | +# strongly recommend to use HTTP-header |
| 18 | +curl -H "Token: AQBA5gEABCDEFDobwmAxV3XTSrDpU7bxaEaeeM2Wg" https://api.prxchk.com/v2/proxies.txt |
| 19 | + |
| 20 | +# it is possible to use the query parameter, but it is not secure enough |
| 21 | +curl https://api.prxchk.com/v2/proxies.txt?token=AQBA5gEABCDEFDobwmAxV3XTSrDpU7bxaEaeeM2Wg |
| 22 | +``` |
| 23 | + |
| 24 | +To prevent abuse of our service, we have implemented strict restrictions and automatically bind the token to the |
| 25 | +sender's IP address. This limitation is in effect for 24 hours and prevents the token from being disclosed. In order to |
| 26 | +reduce the load on our service, we also impose a limitation on the number of requests. |
| 27 | + |
| 28 | +> ⚠️ The **optimal limit** is no more than **50 requests per minute** |
| 29 | +
|
| 30 | +> ⛔ The **maximum limit** is no more than **1000 requests per hour** |
| 31 | +
|
| 32 | +In case of systematic violation of the limitations, you risk losing the ability to use the service. |
| 33 | + |
| 34 | +## Params |
| 35 | + |
| 36 | +| Param | Available | |
| 37 | +|------------|------------------------------------------------------------| |
| 38 | +| with_proto | _isset_ | |
| 39 | +| json | _isset_ | |
| 40 | +| protocol | `http`, `socks4`, `socks5` | |
| 41 | +| country | _iso2 country code_ like `US`, `DE`, etc. | |
| 42 | +| anonymity | `elite` or `anonymous` | |
| 43 | +| port | _int between 1 and 65535_ | |
| 44 | +| order | `uptime`, `stability`, `updated_at`, `timeout` or `random` | |
| 45 | +| limit | _int between 1 and 1000_ | |
| 46 | + |
| 47 | +By default, the request returns all available proxies in TXT-format without specifying the protocol. |
| 48 | + |
| 49 | +```bash |
| 50 | +176.313.73.104:3128 |
| 51 | +67.205.290.164:8080 |
| 52 | +446.21.153.16:1080 |
| 53 | +... |
| 54 | +``` |
| 55 | + |
| 56 | +If you consider it important, you can add the parameter `with_proto` to include the protocol information. |
| 57 | + |
| 58 | +```bash |
| 59 | +https://api.prxchk.com/v2/proxies.txt?with_proto |
| 60 | + |
| 61 | +http://176.313.73.104:3128 |
| 62 | +socks4://67.205.290.164:8080 |
| 63 | +socsk5://446.21.153.16:1080 |
| 64 | +... |
| 65 | +``` |
| 66 | + |
| 67 | +The parameters `protocol`, `country` and `port` can combine permissible values by separating them with commas, allowing |
| 68 | +you to flexibly manage filtering rules for the list. |
| 69 | + |
| 70 | +```bash |
| 71 | +https://api.prxchk.com/v2/proxies.txt?protocol=http,socks5 |
| 72 | +# or |
| 73 | +https://api.prxchk.com/v2/proxies.txt?country=US,DE |
| 74 | +# or |
| 75 | +https://api.prxchk.com/v2/proxies.txt?port=8080,3128 |
| 76 | +``` |
| 77 | + |
| 78 | +The parameters `country` and `port` can accept inverted values, which are equivalent to the statement "all except." To |
| 79 | +achieve this, you need to add an exclamation mark (!) before the parameter value. |
| 80 | + |
| 81 | +```bash |
| 82 | +https://api.prxchk.com/v2/proxies.txt?country=!RU,!CN |
| 83 | +# or |
| 84 | +https://api.prxchk.com/v2/proxies.txt?port=!80,!8888 |
| 85 | +``` |
| 86 | + |
| 87 | +Each of the provided proxies has a very high level of anonymity. However, you may want to receive only those proxies |
| 88 | +that do not use rotation under the hood. |
| 89 | + |
| 90 | +```bash |
| 91 | +https://api.prxchk.com/v2/proxies.txt?anonimity=elite |
| 92 | +``` |
| 93 | + |
| 94 | +You have the option to conveniently sort the list of returned proxies based on one of the specified criteria. For any of |
| 95 | +the parameters, sorting does not have an explicit ASC or DESC notation. The returned result is always generated from |
| 96 | +"**best to worst**". |
| 97 | + |
| 98 | +```bash |
| 99 | +https://api.prxchk.com/v2/proxies.txt?order=uptime |
| 100 | + |
| 101 | +176.313.73.104:3128 # 87% |
| 102 | +67.205.290.164:8080 # 75% |
| 103 | +446.21.153.16:1080 # 34% |
| 104 | +... |
| 105 | +``` |
| 106 | + |
| 107 | +```bash |
| 108 | +# represents the number of consecutive successful checks performed |
| 109 | +https://api.prxchk.com/v2/proxies.txt?order=stability |
| 110 | + |
| 111 | +176.313.73.104:3128 # 5 |
| 112 | +67.205.290.164:8080 # 4 |
| 113 | +446.21.153.16:1080 # 3 |
| 114 | +... |
| 115 | +``` |
| 116 | + |
| 117 | +```bash |
| 118 | +https://api.prxchk.com/v2/proxies.txt?order=updated_at |
| 119 | + |
| 120 | +176.313.73.104:3128 # 2024-02-01 12:56:46 |
| 121 | +67.205.290.164:8080 # 2024-02-01 11:34:35 |
| 122 | +446.21.153.16:1080 # 2024-02-01 10:12:15 |
| 123 | +... |
| 124 | +``` |
| 125 | + |
| 126 | +```bash |
| 127 | +https://api.prxchk.com/v2/proxies.txt?order=timeout |
| 128 | + |
| 129 | +176.313.73.104:3128 # 0.1 s |
| 130 | +67.205.290.164:8080 # 2.3 s |
| 131 | +446.21.153.16:1080 # 5 s |
| 132 | +... |
| 133 | +``` |
| 134 | + |
| 135 | +```bash |
| 136 | +# each request sets a random order for the list |
| 137 | +https://api.prxchk.com/v2/proxies.txt?order=random |
| 138 | + |
| 139 | +67.205.290.164:8080 |
| 140 | +446.21.153.16:1080 |
| 141 | +176.313.73.104:3128 |
| 142 | +77.338.79.191:5678 |
| 143 | +... |
| 144 | +``` |
| 145 | + |
| 146 | +## Tips & Tricks |
| 147 | + |
| 148 | +```bash |
| 149 | +# the most stable any-type proxy from Germany |
| 150 | +curl -H 'AQBA5gEABCDEFDobwmAxV3XTSrDpU7bxaEaeeM2Wg' \ |
| 151 | + https://api.prxchk.com/v2/proxies.txt?with_proto&order=stability&country=DE&limit=1 |
| 152 | +``` |
| 153 | + |
| 154 | +```bash |
| 155 | +# the freshest socks5 proxy not from China |
| 156 | +curl -H 'AQBA5gEABCDEFDobwmAxV3XTSrDpU7bxaEaeeM2Wg' \ |
| 157 | + https://api.prxchk.com/v2/proxies.txt?protocol=socks5&order=updated_at&country=!CN&limit=1 |
| 158 | +``` |
| 159 | + |
| 160 | +```bash |
| 161 | +# the fastest http proxy from |
| 162 | +curl -H 'AQBA5gEABCDEFDobwmAxV3XTSrDpU7bxaEaeeM2Wg' \ |
| 163 | + https://api.prxchk.com/v2/proxies.txt?protocol=http&order=timeout&limit=1 |
| 164 | +``` |
0 commit comments