how to use ProxyScrape premium API

How to Use ProxyScrape Premium API

This article will explain how to use ProxyScrape Premium API services programmatically. Let's begin now!

Get proxy list

https://api.proxyscrape.com/v2/account/datacenter_shared/proxy-list?auth=nhuyjukilompnbvfrtyuui&type=getproxies&country[]=all&protocol=http&format=normal

 

auth nhuyjukilompnbvfrtyuui
Provide your API auth key
type getproxies
Download the proxies, or display them in your browser:

  • getproxies
  • displayproxies
country[] all
Provide any Alpha 2 ISO country code of countries that are available in your account. Incase you want to download multiple countries at once, please repeat the parameter: &country[]=us&country[]=deWhen this parameter is not provided it will default to all countries.
protocol http
Define which proxy protocol you want to download:

  • http
  • socks

The HTTP proxies support SSL (https). The Socks proxies are both Socks4 and Socks5.

format normal
The format you want to receive the proxies in:

  • normal: a simple proxy list
  • json: returns all proxies, along with their associated countries and status.
Example Request
var request = http.Request('GET', Uri.parse('https://api.proxyscrape.com/v2/account/datacenter_shared/proxy-list?auth=nhuyjukilompnbvfrtyuui&type=getproxies&country[]=all&protocol=http&format=normal'));


http.StreamedResponse response = await request.send();

if (response.statusCode == 200) {
  print(await response.stream.bytesToString());
}
else {
  print(response.reasonPhrase);
}

Get authenticated IPs

https://api.proxyscrape.com/v2/account/datacenter_shared/whitelist?auth=nhuyjukilompnbvfrtyuui&type=get

Display the IPs that are already authenticated on your account.

PARAMS

auth nhuyjukilompnbvfrtyuui
Provide your API auth key
type get
Get authenticated IPs on your account
Example Request
var request = http.Request('GET', Uri.parse('https://api.proxyscrape.com/v2/account/datacenter_shared/whitelist?auth=nhuyjukilompnbvfrtyuui&type=get'));


http.StreamedResponse response = await request.send();

if (response.statusCode == 200) {
  print(await response.stream.bytesToString());
}
else {
  print(response.reasonPhrase);
}

GET Authenticate one IP

https://api.proxyscrape.com/v2/account/datacenter_shared/whitelist?auth=nhuyjukilompnbvfrtyuui&type=set&ip[]=1.1.1.1

Please note that every new authenticate request has to contain all IPs that need to remain authenticated. To unauthenticate IPs, you can resend the authenticate request, excluding the IPs that have to be unauthenticated.

PARAMS

 

Example Request
var request = http.Request('GET', Uri.parse('https://api.proxyscrape.com/v2/account/datacenter_shared/whitelist?auth=nhuyjukilompnbvfrtyuui&type=set&ip[]=1.1.1.1'));


http.StreamedResponse response = await request.send();

if (response.statusCode == 200) {
  print(await response.stream.bytesToString());
}
else {
  print(response.reasonPhrase);
}

GET Authenticate multiple IPs

https://api.proxyscrape.com/v2/account/datacenter_shared/whitelist?auth=nhuyjukilompnbvfrtyuui&type=set&ip[]=1.1.1.1&ip[]=1.1.1.2&ip[]=1.1.1.3

To authenticate multiple IPs just simply repeat the ip[] parameter.

PARAMS

auth nhuyjukilompnbvfrtyuui
Provide your API auth key
type set
Set IP request
ip[] 1.1.1.1
Provide one of the IPs that have to be authenticated
ip[] 1.1.1.2
Provide one of the IPs that have to be authenticated
ip[] 1.1.1.3
Provide one of the IPs that have to be authenticated
Example Request
var request = http.Request('GET', Uri.parse('https://api.proxyscrape.com/v2/account/datacenter_shared/whitelist?auth=nhuyjukilompnbvfrtyuui&type=set&ip[]=1.1.1.1&ip[]=1.1.1.2&ip[]=1.1.1.3'));


http.StreamedResponse response = await request.send();

if (response.statusCode == 200) {
  print(await response.stream.bytesToString());
}
else {
  print(response.reasonPhrase);
}

References,


Disclaimer: This part of the content is mainly from the merchant. If the merchant does not want it to be displayed on my website, please contact us to delete your content.

Last Updated on May 16, 2022

Do you recommend the proxy service?

Click on a trophy to award it!

Average rating 5 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

Leave a Comment

Your email address will not be published. Required fields are marked *

en_USEnglish
Scroll to Top