代理集成指南与 REST API
将FastProxy代理连接到代码、浏览器和工具所需的一切:主机、端口、用户名选项、可直接复制的示例以及REST API。
网关与端口
住宅、移动和无限套餐各使用一个网关。静态 ISP、数据中心和共享套餐以带有各自端口的 IP 列表形式提供。
住宅代理
gw.fastproxy.fitHTTP和HTTPS 7700, SOCKS5 7701
移动代理
4g.fastproxy.fitHTTP和HTTPS 7800, SOCKS5 7801
无限住宅代理
unl.fastproxy.fitHTTP和HTTPS 7900, SOCKS5 7901
用户名选项
在“My services”中为用户名添加选项。这些选项可按此顺序组合。
-country-xx两位字母国家代码USER-country-us-city-name该国家/地区的城市,小写,无空格USER-country-de-city-frankfurt-session-name将同一个IP保持最多60分钟USER-country-gb-session-a1b2代码示例
请将 USER 和 PASS 替换为您的登录信息。每个标签页都是一个完整示例。
curl -x http://USER-country-us:PASS@gw.fastproxy.fit:7700 https://api.ipify.org
# SOCKS5, sticky for up to 60 minutes
curl -x socks5h://USER-country-de-session-a1:PASS@gw.fastproxy.fit:7701 https://api.ipify.orgimport requests
proxy = "http://USER-country-gb:PASS@gw.fastproxy.fit:7700"
r = requests.get("https://api.ipify.org?format=json",
proxies={"http": proxy, "https": proxy}, timeout=30)
print(r.json())import { ProxyAgent, fetch } from "undici";
const agent = new ProxyAgent("http://USER-country-jp:PASS@gw.fastproxy.fit:7700");
const res = await fetch("https://api.ipify.org?format=json", { dispatcher: agent });
console.log(await res.json());from playwright.sync_api import sync_playwright
with sync_playwright() as p:
browser = p.chromium.launch(proxy={
"server": "http://gw.fastproxy.fit:7700",
"username": "USER-country-fr-city-paris",
"password": "PASS",
})
page = browser.new_page()
page.goto("https://api.ipify.org")
print(page.content())# settings.py
DOWNLOADER_MIDDLEWARES = {
"scrapy.downloadermiddlewares.httpproxy.HttpProxyMiddleware": 110,
}
# in your spider
yield scrapy.Request(url, meta={
"proxy": "http://USER-country-us:PASS@gw.fastproxy.fit:7700"
})# list plans (no key needed)
curl https://fastproxy.fit/api/v1/plans
# buy a plan from credit
curl -X POST https://fastproxy.fit/api/v1/orders \
-H "Authorization: Bearer pvk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"plan":"isp-25","country":"us"}'
# your services and logins
curl https://fastproxy.fit/api/v1/services -H "Authorization: Bearer pvk_YOUR_KEY"REST API
基础URL为 https://fastproxy.fit/api/v1。请将密钥作为 Authorization: Bearer pvk_ 发送。在账户区域创建密钥。每个密钥每分钟300次请求。
| 方法 | 路径 | 密钥 | 退款 |
|---|---|---|---|
| GET | /api/v1/plans | 否 | 每个套餐及其价格、数量和时长 |
| GET | /api/v1/locations | 否 | 国家/地区、城市以及各地销售的产品 |
| GET | /api/v1/balance | 是 | 您以美元计的额度 |
| POST | /api/v1/orders | 是 | 用余额购买套餐:{plan, country} |
| GET | /api/v1/services | 是 | 您的套餐及其登录信息、IP 列表和到期日期 |
| GET | /api/v1/services/{id} | 是 | 一个套餐 |
错误
401
unauthorizedAPI 密钥缺失或错误。不会产生任何费用。402
funds余额低于套餐价格。不会产生任何扣费。400
bad_plan / bad_country未知套餐,或该产品未在此国家销售。不会产生任何费用。429
rate_limited单个密钥每分钟超过 300 次请求。503
network当前无法开通该套餐。不会产生任何费用。