返回 | 接口 / 实用工具 / 随机密码生成
GET 实用工具

随机密码生成

生成指定长度与字符类型的随机密码。

累计调用 17 今日调用 0

更新于 2026-10-16

调用地址

GET
https://itapi.top/api/randpass

请求参数

参数名类型必填说明示例
len int 可选 密码长度,默认 16 1
type string 可选 all/num/letter/upper/lower/symbol 暂无

返回字段

字段名类型说明
code int 状态码
data.password string 生成的密码

响应示例

200 OK
{"code":200,"msg":"success","data":{"length":4,"type":"all","password":"tQ58"}}

在线测试

代码示例

cURL · GET
curl "https://itapi.top/api/randpass?len=1&type=%E6%9A%82%E6%97%A0"
PHP
<?php
$res  = file_get_contents("https://itapi.top/api/randpass?len=1&type=%E6%9A%82%E6%97%A0");
$json = json_decode($res, true);
print_r($json);
JavaScript
const res  = await fetch("https://itapi.top/api/randpass?len=1&type=%E6%9A%82%E6%97%A0");
const json = await res.json();
console.log(json);
Python
import requests

r = requests.get("https://itapi.top/api/randpass?len=1&type=%E6%9A%82%E6%97%A0", timeout=10)
print(r.json())
返回接口列表