❓ 帮助文档

文档导航
快速开始
API文档
签名算法
代码示例
常见问题
联系我们

🚀 快速开始

欢迎使用摩金云

摩金云提供高质量的代理IP服务,支持HTTP和SOCKS5协议,覆盖全国各省市。

使用流程

第1步:购买套餐

在"产品中心"或"套餐定价"页面选择适合您的套餐进行购买。我们提供两种计费方式:

  • 按量计费:一次性购买指定数量的IP,用完为止
  • 套餐计费:购买每日限额套餐,每天可提取指定数量的IP

第2步:获取API密钥

购买成功后,在"API密钥"页面查看您的AppKey和AppSecret。

第3步:生成API

在"IP提取"页面,选择协议、地区等参数,生成您的专属API地址。

第4步:调用API

使用生成的API地址,在您的程序中调用即可获取代理IP。

💡 提示: 我们的API支持本地IP缓存复用,优先返回本地缓存的IP,提高响应速度并降低成本。

📘 API文档

IP提取接口

请求URL:

GET https://mojinyun.com/api/ip/extract

请求参数:

参数名 必选 类型 说明
key string AppKey
signature string 签名(MD5(key + appSecret))
count int 提取数量(默认1,最大200)
protocol string 协议类型:http / socks5(默认http)
format string 返回格式:json / text(默认json)
dedup int 是否去重:1 / 0(默认0)
password string 是否需要账号密码:yes / no(默认no)
regions string 地区编码,格式:code:provinceCode(多个用逗号分隔)

返回示例(JSON格式):

{ "code": 200, "msg": "IP提取成功", "data": { "count": 1, "list": [ { "ip": "61.51.137.158", "sever": "58.19.48.197", "port": 16380, "user": "your_username", "pw": "your_password", "net_type": 3, "province": "北京", "city": "北京", "expire_time": "2025-11-01 16:24:58", "from": "local" } ] }, "timestamp": 1761985336 }

返回示例(TEXT格式):

58.19.48.197:16380:your_username:your_password

字段说明

字段名 类型 说明
ip string 真实IP地址
sever string 代理服务器地址
port int 代理端口
user string 代理用户名(password=yes时返回)
pw string 代理密码(password=yes时返回)
net_type int 运营商类型:1电信 2移动 3联通 4未知
province string 省份
city string 城市
expire_time string IP过期时间
from string IP来源:local本地缓存 / api第三方

🔐 签名算法

为了保证API调用的安全性,我们使用MD5签名验证。

签名规则

签名算法:MD5(key + appSecret)

签名步骤

1. 拼接字符串

将您的AppKey和AppSecret直接拼接:

signString = appKey + appSecret

2. 计算MD5

对拼接后的字符串计算MD5值(32位小写):

signature = md5(signString).toLowerCase()

3. 添加到请求参数

将生成的signature添加到API请求参数中。

⚠️ 注意: AppSecret是您的私钥,请妥善保管,不要泄露给他人。所有API调用都需要使用正确的签名。

💻 代码示例

Python示例

import hashlib import requests # 您的API凭证 app_key = "your_app_key" app_secret = "your_app_secret" # 生成签名 signature = hashlib.md5((app_key + app_secret).encode()).hexdigest() # 构建API URL api_url = "https://mojinyun.com/api/ip/extract" params = { "key": app_key, "signature": signature, "count": 1, "protocol": "http", "format": "json" } # 发送请求 response = requests.get(api_url, params=params) data = response.json() if data['code'] == 200: ip_list = data['data']['list'] for ip_info in ip_list: print(f"代理地址: {ip_info['sever']}:{ip_info['port']}") else: print(f"提取失败: {data['msg']}")

PHP示例

$app_key, 'signature' => $signature, 'count' => 1, 'protocol' => 'http', 'format' => 'json' ]); // 发送请求 $response = file_get_contents($api_url . '?' . $params); $data = json_decode($response, true); if ($data['code'] == 200) { foreach ($data['data']['list'] as $ip_info) { echo "代理地址: {$ip_info['sever']}:{$ip_info['port']}\n"; } } else { echo "提取失败: {$data['msg']}\n"; } ?>

JavaScript示例

// 需要引入md5库(如js-md5) const md5 = require('js-md5'); // 您的API凭证 const appKey = "your_app_key"; const appSecret = "your_app_secret"; // 生成签名 const signature = md5(appKey + appSecret); // 构建API URL const apiUrl = "https://mojinyun.com/api/ip/extract"; const params = new URLSearchParams({ key: appKey, signature: signature, count: 1, protocol: "http", format: "json" }); // 发送请求 fetch(`${apiUrl}?${params}`) .then(response => response.json()) .then(data => { if (data.code === 200) { data.data.list.forEach(ipInfo => { console.log(`代理地址: ${ipInfo.sever}:${ipInfo.port}`); }); } else { console.log(`提取失败: ${data.msg}`); } }) .catch(error => console.error('请求失败:', error));

❔ 常见问题

1. 如何选择套餐?

按量计费适合偶尔使用的场景,购买后可随时提取,用完为止。

套餐计费适合每天都需要使用的场景,每日固定额度,未用完的次数不累计到次日。

2. 提取的IP有效期多久?

IP的有效期根据您购买的套餐类型而定,一般为1-10分钟。具体时效请查看套餐详情。

3. 什么是"本地缓存"?

为了提高效率和降低成本,我们会将提取的IP缓存在本地。当您请求IP时,系统会优先返回本地缓存中未过期的IP。

4. 签名验证失败怎么办?

请检查:

  • AppKey和AppSecret是否正确
  • 签名算法是否正确(MD5(key + appSecret))
  • MD5结果是否为32位小写

5. 如何查看提取日志?

在"提取日志"页面可以查看您的所有IP提取记录,包括IP地址、来源、过期时间等详细信息。

6. IP不可用怎么办?

如果提取的IP不可用,请联系客服反馈。我们会及时处理并补偿相应次数。

📧 联系我们

如果您有任何问题或建议,欢迎随时联系我们:

客服支持

邮箱:support@mojinyun.com

电话:400-xxx-xxxx

微信:MoJinYun_Support

工作时间

周一至周五:9:00 - 18:00

周六至周日:10:00 - 17:00

💡 提示: 为了更快地解决问题,请在联系我们时提供您的用户ID和问题详情。