API 模式和代理模式有什么区别?两种方式在不同场景下表现差异大吗?
在一次团队协作排查中,一位同事遇到非常典型的情况:同样的目标站点,同样的任务,同样的账号,他用“代理模式”访问…
Visit https://opensea.io/path/to/target?a=4, the following is an example of Curl request:
# Use curl to request https://opensea.io/category/memberships
# curl -X GET "https://opensea.io/category/memberships"
#Using Cloudbypass API request example
# Use Cloudbyapss API to request
curl -X GET "https://api.cloudbypass.com/category/memberships" ^
-H "x-cb-apikey: YOUR_API_KEY" ^
-H "x-cb-host: opensea.io" -k
# Use CloudbypassProxy request example
# Use Cloudbyapss Proxy to request
curl -X GET "https://opensea.io/category/memberships" -x "http://YOUR_API_KEY:@proxy.cloudbypass.com:1087" -k
Detailed documentation
Visit https://opensea.io/path/to/target?a=4, the following is an example of Python request:
// Use python to request https://opensea.io/category/memberships
import requests
"""
# Code example before modification
# original code
url = "https://opensea.io/category/memberships"
response = requests.request("GET", url)
print(response.text)
print(response.status_code,response.reason)
# (403, 'Forbidden')
"""
#Using Cloudbypass API request example
# Use Cloudbyapss API to request
url = "https://api.cloudbypass.com/category/memberships"
headers = {
'x-cb-apikey': 'YOUR_API_KEY',
'x-cb-host': 'opensea.io',
}
response = requests.request("GET", url, headers=headers)
print(response.text)
// Use python to request https://opensea.io/category/memberships
import requests
"""
# Code example before modification
# original code
url = "https://opensea.io/category/memberships"
response = requests.request("GET", url)
print(response.text)
print(response.status_code,response.reason)
# (403, 'Forbidden')
"""
#Using Cloudbypass API request example
# Use Cloudbyapss API to request
url = "https://api.cloudbypass.com/category/memberships"
headers = {
'x-cb-apikey': 'YOUR_API_KEY',
'x-cb-host': 'opensea.io',
}
response = requests.request("GET", url, headers=headers)
print(response.text)
Detailed documentation
Access https://opensea.io/category/memberships, request example:
// # Go Modules
// require github.com/go-resty/resty/v2 v2.7.0
package main
import (
"fmt"
"github.com/go-resty/resty/v2"
)
func main() {
client := resty.New()
client.Header.Add("X-Cb-Apikey", "/* APIKEY */")
client.Header.Add("X-Cb-Host", "opensea.io")
resp, err := client.R().Get("https://api.cloudbypass.com/category/memberships")
if err != nil {
fmt.Println(err)
return
}
fmt.Println(resp.StatusCode(), resp.Header().Get("X-Cb-Status"))
fmt.Println(resp.String())
}
Detailed documentation
Visit https://opensea.io/path/to/target?a=4, the following is an example Nodejs request:
// Use javascript to request https://opensea.io/category/memberships
const axios = require('axios');
/*
// Code example before modification
//original code
const url = "https://opensea.io/category/memberships";
axios.get(url, {})
.then(response => console.log(response.data))
.catch(error => console.error(error));
*/
// Example of request using Cloudbypass API
// Use Cloudbyapss API to request
const url = "https://api.cloudbypass.com/path/to/target?a=4";
const headers = {
'x-cb-apikey': 'YOUR_API_KEY',
'x-cb-host': 'www.example.com',
};
axios.get(url, {}, {headers: headers})
.then(response => console.log(response.data))
.catch(error => console.error(error));
# Use javascript to request https://opensea.io/category/memberships
const axios = require('axios');
//Request example using CloudbypassProxy
// Use Cloudbyapss Proxy to request
const url = "https://opensea.io/category/memberships";
const config = {
proxy: {
host: 'proxy.cloudbypass.com',
port: 1087,
auth: {
username: 'YOUR_API_KEY',
password: ''
// Use a custom proxy
// password: 'proxy=http:CUSTOM_PROXY:8080'
}
}
};
axios.get(url, config)
.then(response => console.log(response.data))
.catch(error => console.error(error));
Detailed documentation
Visit https://opensea.io/path/to/target?a=4, the following is a Java request example:
// Use java to request https://opensea.io/category/memberships
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
/*
// Code example before modification
//original code
String url = "https://opensea.io/category/memberships";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.GET(HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
*/
// Example of request using Cloudbypass API
// Use Cloudbyapss API to request
String url = "https://api.cloudbypass.com/category/memberships";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("x-cb-apikey", "YOUR_API_KEY")
.header("x-cb-host", "opensea.io")
.GET(HttpRequest.BodyPublishers.noBody())
.build();
//Request example using CloudbypassProxy
// Use Cloudbyapss Proxy to request
String url = "https://opensea.io/category/memberships";
HttpClient client = HttpClient.newBuilder()
.proxy(HttpClient
.ProxySelector
// Use a custom proxy
//.of(URI.create("http://YOUR_API_KEY:proxy=http:CUSTOM_PROXY:[email protected]:1087")))
.of(URI.create("http://YOUR_API_KEY:@proxy.cloudbypass.com:1087")))
.build();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.GET()
.build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
Detailed documentation
Sign up for a Cloudbypass API account — click Sign Up Now
Sign up for a Cloudbypass Proxy account — click Sign Up Now
Cloudbypass accounts are unified — registering for either one automatically gives you access to both.
After signing up, log in to your dashboard within 30 days and click the 🎁 “Trial Activity” button to claim your new user gift pack, which includes free credits and traffic to get you started.
Enter your request URL into the Code Generator to test whether it successfully bypasses Cloudflare verification via Cloudbypass.
V1 version comes with a built-in rotating IP pool. If it’s accessible, no IP proxy configuration is required.
TV2 version requires setting up a fixed IP or a time-limited IP. If you’re using Cloudbypass rotating IPs, the validity period must be set to at least 10 minutes. (See image below)
If you need technical assistance, please check the API documentation or contact Cloudbypass Support.
Incorporate the Cloudbypass API code into your own functional module, complete the final debugging process, and start using it.
Finally, choose a plan based on your needs: View Pricing
To bypass Cloudflare’s 5-second security check, please purchase a Points Plan.
For IP proxy traffic, choose either a Rotating Datacenter Proxy or Rotating Residential Proxy plan.
Bypassing Cloudflare requires spending points, and sometimes an proxy may be needed to assist the process. However, using an proxy alone cannot bypass Cloudflare.
With the Cloudbypass API, you can easily get around Cloudflare’s bot verification systems. Even when sending up to 100,000 requests, you won’t need to worry about being flagged as a scraper.
Cloudbypass API offers two flexible integration modes: HTTP API and Proxy. Developers can seamlessly migrate or refactor existing code using either method.
As a robust HTTP request proxy tool, Cloudbypass API empowers you to easily get around Cloudflare’s bot verification systems — but more importantly, it ensures comprehensive protection for every request you send.
You can choose the most suitable proxy software or service based on your needs, and deploy or configure it across different platforms.
Powered by the Cloudbypass API, our system ensures reliable data acquisition even in complex network environments. It supports proxy rotation, browser fingerprint simulation, and JS challenge bypassing — delivering smooth and uninterrupted data collection.
Access a vast pool of proxy resources to guarantee stable capture of video and image content. With Cloudbypass API integration, it supports multiple use cases, including machine learning training, content monitoring, and more.
Through the Cloudbypass API, you can reliably extract product information, pricing, and inventory data from international platforms. Ideal for data analysis and optimization, empowering e-commerce teams to improve operational efficiency.
Collect comprehensive data across flights, hotels, ticketing, and visa services. With built-in protection mechanisms, Cloudbypass ensures stable and trustworthy data retrieval, supporting industry analysis and predictive insights.
Capture discount and promotional information across major e-commerce platforms. The intelligent proxy mechanism of Cloudbypass enables merchants to stay ahead of price changes and promotional trends, enhancing user experience and competitiveness.
Achieve continuous, stable collection of news and online novel content. With multi-dimensional processing and structured analysis, Cloudbypass guarantees data authenticity and completeness for content analytics and updates.
A successful API request consumes 1 point, and a failed request does not consume points.
V1 version Each successful request consumes 1 point;
V2 version One successful request consumes 3 points (one API request consumes 1 point, V2 will consume 2 more points through JS polling, and the session duration is 10 minutes, the session state can be maintained without changing the proxy and part parameters, and unnecessary verification is avoided. That is to say, there is no additional charge for continuing requests within 10 minutes after the first request.)
Cloudbypass API points will be cleared if they are not used up within the validity period;
Recharges are calculated independently and have nothing to do with previous purchases, but the earliest purchased points will be consumed first.
The service mode provided by Cloudbypass API is that you submit an http request, and the API sends the request for you. This process makes it more difficult to identify your http request as a robot, and will only bypass the Cloudflare verification code as much as possible and let the Cloudflare verification code If it does not appear, you will directly access the target URL instead of automatically clicking on the Cloudflare verification code.
Cloudbypass API itself is very simple. You only need to send us the http request body sent to the target website, and we will forward 100% to x-cb-host.
You can use code generator to generate code snippets online for cURL and JavaScript , TypeScript, Java, Python and other commands make HTTP requests.
Cloudbypass API and Cloudbypass Proxy code example: Click to view
The V2 version can pass js polling (can render JS);
Currently the V2 version does not have a default proxy, you need to purchase the Cloudbypass Proxy, the V1 version comes with a Rotating Proxy
Session partitions are used to distinguish and manage cloudflare cookies. Sessions take effect after verification. After taking effect, proxy IP, fingerprint, etc. cannot be changed for 10 minutes. This is to ensure that no new verification is triggered during the session. As for account sessions, they need to be managed by yourself.
From 0-999, a user can have up to 1000 session partitions. After the first request is successful, the session partition will lock the proxy IP. You can submit other proxy IPs by modifying the session partition value. The session lock duration is ten minutes, and a successful request will refresh the duration.
Enter the request address into the code generator for testing. Test with Cloudbypass V1 first.
If V1 fails, you can test with Cloudbypass V2. You need to configure your own IP for V2. We have provided a test IP proxy traffic in the background. Click Cloudbypass Proxy IP Background to extract. It is recommended to set the extraction IP to a time limit of more than 10 minutes.
Currently, the maximum number of concurrent requests for all our packages is 30 times/s.
INSUFFICIENT_BALANCE This error means you have no Cloudbypass API credits.
You can purchase it in the Cloudbypass API backend:https://console.cloudbypass.com/#/api/login,or Contact Customer Service:Receive test points.
Error message:
"code": "CHALLENGE_LOCK_OCCUPIED"
"message": "The current part is being challenged, please wait for the lock to be released."
Error Description:
If the CHALLENGE_LOCK_OCCUPIED code appears, the following problems may exist::
The same part is used by multiple threads at the same time.
Multiple users use the same account and operate the same part.
The previous request occupies the verification lock and may not be completed due to timeout or human interruption.
Solution:
Wait for the lock to be released and try the request again later.
Replace part, the optional range is 0~999.
Solution:
1. Set a 10-minute validity period when extracting IP.
2. Change the proxy of the country or region. (Use multiple extraction points and IPs from different countries in turn. Using only IPs from the same country or region is prone to being restricted)
In this case, it is most likely that you need to configure a Proxy. Choose one of API mode and proxy mode to use our services. Domestic users recommend using API mode. Currently, only Proxys of the http protocol are supported.
Currently, browser automation with selenium and Puppeteer is not supported, because the browser is not used, only browser requests are simulated.
We do not have monthly packages. Our pricing plan is based on traffic packages, with no time limit; you can purchase traffic packages according to your needs, buy as much as you need, and it will never expire.
Cloudbypass agent supports Alipay, USDT and other payment methods.
Rotating Proxy usage = upload + download data.
Please use the http://ipinfo.cloudbypass.com Query.
Cloudbypass Proxy provides two proxy networks: Rotating Residential Proxy and Rotating Data Center Proxy (data center proxy).
At Cloudbypass Proxy, you can buy all kinds of proxy forms you need in one place.
Cloudbypass proxy currently supports http and Socks5 proxy protocols.
Our pricing model is mainly based on traffic packages. For Rotating Residential Proxy and Rotating Data Center Proxy, we use a package model based on traffic packages with no time limit. You can sign up to request a free trial to evaluate our solutions and determine which traffic package you want to purchase.
Unfortunately, our agent cannot be directly connected under the IP environment of mainland China.
But you can deploy an Global network environment (such as a server in Hong Kong) and use proxies in the Global network.
On the computer side, you can deploy a global NPV accelerator for auxiliary use;
On the mobile side, you can deploy a soft route, and the mobile phone is connected to the router WIFI network in an Global environment;
If you have not set up an Global The ability of the network environment, please stop purchasing, we do not provide refunds for directly connected Chinese users.
Cloudbypass API Points Usage Concise Rules: 1 point per successful request, V2 version consumes 3 points. Points expire monthly and reset; recharge is separate. V2 supports JS polling, requires time-limited Proxy purchase. Max concurrent requests: 30/s. 403 or Access Denied may require Proxy configuration. Not compatible with selenium or Puppeteer; can be used with Anti-Detection Browsers and collectors.
View MoreCloudbyPass global Proxy is billed by data package, never expires. Supports payment methods such as Alipay, USDT. Data package usage includes upload + download data. Provides rotating residential and Data Center Proxys, supports http and Socks5 proxy protocols. Free trial available after registration. Chinese users need to use it in Global environments as direct connection to mainland China IP is not supported.
View MoreBypass Cloudflare effortlessly with Cloudbypass API for unhindered web data collection. It offers HTTP API and global Rotating Proxy services, supporting customizable browser fingerprints like Referer and UA for enhanced control. Cloudbypass IP service settings cover FAQs, IP extraction tutorials, Anti-Detection Browsers, computer browsers, and mobile platforms. Detailed guides include configurations for various browsers and platforms.
Cloudbypss API has greatly improved my data acquisition efficiency, especially when dealing with websites that need to bypass Cloudflare authentication. The simple and easy-to-use interface allowed me to get started quickly and really saved me a lot of unnecessary trouble. Highly recommended to developers who need to crawl data efficiently!
After using the Cloudbypss API, my data crawling work has become much easier. It perfectly bypassed the tricky Cloudflare captcha and ensured I could continuously access and extract the data I needed. It was a real helper!
The Cloudbypss API greatly simplified my web data collection operations and accurately handled all Cloudflare challenges, saving me a lot of time. It is a trustworthy tool!
As a market analyst who often needs to operate a large number of web pages, the Cloudbypss API allows me to not worry about 403 errors. It helps me get data smoothly, which is really useful!
The Cloudbypss API allowed me to easily bypass Cloudflare protection, and the interface documentation was very clear and easy to use. You will never be troubled by verification codes again. This tool is definitely worth a try!
I learned about Cloudbypss API through a friend. I was skeptical about its effectiveness at first, but after using it, I found that it can effectively bypass Cloudflare human-machine authentication, which helps my project become even more powerful!