API 文档
所有API基础路径:https://ourapix.fun/api
免费公开API
无需鉴权,直接调用
/getTime
免费
获取当前时间,支持时区和格式化
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| timezone | string | 时区名称 | Asia/Shanghai |
| format | string | 输出格式:text/json | json |
| gmtoffset | int | GMT偏移(小时) | 8 |
curl "https://ourapix.fun/api/getTime?format=json"
/getIP
免费
获取客户端IP地理位置信息
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| format | string | 输出格式:json/text | json |
curl "https://ourapix.fun/api/getIP"
/getWeather
免费
查询城市天气信息
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| city | string | 城市名称 | 北京 |
| units | string | 温度单位:c/f/k | c |
curl "https://ourapix.fun/api/getWeather?city=上海"
/getWhois
免费
域名WHOIS信息查询
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| domain | string | 域名(必填) | example.com |
curl "https://ourapix.fun/api/getWhois?domain=google.com"
/getLatLon
免费
IP经纬度查询
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| action | string | 查询方式:ip/url | ip |
| lat | float | 纬度(action=url时) | 39.9 |
| lng | float | 经度(action=url时) | 116.4 |
curl "https://ourapix.fun/api/getLatLon"
/base64
免费
Base64编码/解码
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| action | string | 操作:encode/decode | encode |
| input | string | 输入内容(必填) | Hello |
curl "https://ourapix.fun/api/base64?action=encode&input=Hello"
/hash
免费
Hash计算(MD5/SHA等)
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| algo | string | 算法:md5/sha1/sha256/sha512/blake2b | md5 |
| input | string | 输入内容(必填) | Hello |
curl "https://ourapix.fun/api/hash?algo=sha256&input=test"
/getTimeTimestamp
免费
时间戳转换
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| action | string | 转换类型:unix/iso8601 | unix |
| input | string | 输入值 | 2026-01-01T00:00:00Z |
curl "https://ourapix.fun/api/getTimeTimestamp?action=unix&input=2026-01-01T00:00:00Z"
/qrcode/gen
免费
生成二维码
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| text | string | 内容(必填) | https://ourapix.fun |
| size | int | 尺寸 | 300 |
| error_level | string | 容错级别:L/M/Q/H | M |
curl "https://ourapix.fun/api/qrcode/gen?text=https://ourapix.fun"
登录免费API
需要用户登录获取utoken后调用
/selfsignSSL
登录免费
自签署SSL证书生成
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| u | string | 用户token(必填) | your_utoken |
| domain | string | 域名(必填) | example.com |
| keysize | int | 密钥大小 | 2048 |
curl "https://ourapix.fun/api/selfsignSSL?u=YOUR_TOKEN&domain=example.com"
/qrcode/read
登录免费
解析二维码图片
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| u | string | 用户token(必填) | your_utoken |
| image | string | Base64图片数据 | data:image/png;base64,... |
curl -X POST "https://ourapix.fun/api/qrcode/read" -d "u=YOUR_TOKEN&image=..."
付费API
需要登录并有足够积分余额
/compute/complex
付费
复杂计算服务(阶乘、斐波那契、质因数分解、蒙特卡洛)
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| u | string | 用户token(必填) | your_utoken |
| p | string | 钱包token(必填) | your_ptoken |
| operation | string | 操作类型 | factorial |
| input | string | 输入值 | 10 |
operation类型:
factorial- 阶乘计算(最大170)fibonacci- 斐波那契数列prime_factors- 质因数分解monte_carlo- 蒙特卡洛π估算
curl "https://ourapix.fun/api/compute/complex?u=YOUR_TOKEN&p=YOUR_PTOKEN&operation=factorial&input=10"
更多免费API
持续更新中
/crypto/exchange
免费
实时货币汇率转换
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| from | string | 源货币代码 | USD |
| to | string | 目标货币代码 | CNY |
| amount | float | 金额 | 100 |
curl "https://ourapix.fun/api/crypto/exchange?from=USD&to=CNY&amount=100"
/text/randomPassword
免费
生成安全随机密码
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| length | int | 密码长度 | 16 |
| count | int | 生成数量 | 5 |
| uppercase | bool | 包含大写字母 | true |
| lowercase | bool | 包含小写字母 | true |
| numbers | bool | 包含数字 | true |
| symbols | bool | 包含符号 | true |
curl "https://ourapix.fun/api/text/randomPassword?length=20&count=3"
/text/uuid
免费
生成UUID
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| version | int | UUID版本:1或4 | 4 |
| count | int | 生成数量 | 5 |
| format | string | 格式:standard/simple/braces/upper | standard |
curl "https://ourapix.fun/api/text/uuid?count=3"
/text/transform
免费
文本格式转换
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| text | string | 输入文本(必填) | Hello World |
| action | string | 转换类型 | upper |
action类型: upper, lower, camel, snake, kebab, reverse, count, md5, trim, urlencode, htmlentities
curl "https://ourapix.fun/api/text/transform?text=hello+world&action=camel"
/math/random
免费
随机数生成
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| min | int | 最小值 | 1 |
| max | int | 最大值 | 100 |
| count | int | 生成数量 | 10 |
| unique | bool | 是否唯一 | true |
| sort | string | 排序:none/asc/desc | none |
curl "https://ourapix.fun/api/math/random?min=1&max=100&count=5&unique=true"
/math/calculate
免费
数学计算器
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| expr | string | 数学表达式(必填) | (2+3)*4 |
支持运算: +, -, *, /, ^, %, sqrt, pow, abs, ceil, floor, round, log, sin, cos, tan, pi
curl "https://ourapix.fun/api/math/calculate?expr=sqrt(144)+2^3"
/info/useragent
免费
解析User-Agent字符串
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| ua | string | UA字符串(默认当前请求) | Mozilla/5.0... |
curl "https://ourapix.fun/api/info/useragent"
/info/iplocation
免费
IP归属地查询
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| ip | string | IP地址(默认当前IP) | 8.8.8.8 |
curl "https://ourapix.fun/api/info/iplocation?ip=8.8.8.8"
/info/headers
免费
查看HTTP请求头信息
curl "https://ourapix.fun/api/info/headers"
/text/lorem
免费
Lorem Ipsum占位文本生成
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| paragraphs | int | 段落数量 | 3 |
| format | string | 输出格式:text/json/html | text |
curl "https://ourapix.fun/api/text/lorem?paragraphs=5"
/info/colorconvert
免费
颜色格式转换(HEX/RGB/HSL)
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| color | string | 颜色值(必填) | #FF5733 |
| from | string | 输入格式:auto/hex/rgb/hsl | auto |
curl "https://ourapix.fun/api/info/colorconvert?color=%23FF5733"
/info/domaincheck
免费
域名可用性检查(DNS/HTTP/SSL)
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| domain | string | 域名(必填) | example.com |
curl "https://ourapix.fun/api/info/domaincheck?domain=google.com"
/text/markdown
免费
Markdown转HTML
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| text | string | Markdown文本(必填) | # Hello |
curl -X POST "https://ourapix.fun/api/text/markdown" -H "Content-Type: application/json" -d '{"text":"# Hello\n\n**World**"}'
/text/wordcount
免费
字数统计(支持中英文)
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| text | string | 输入文本(必填) | Hello World |
curl "https://ourapix.fun/api/text/wordcount?text=Hello+World"
/info/ipcheck
免费
IP黑名单检测
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| ip | string | IP地址(默认当前IP) | 8.8.8.8 |
curl "https://ourapix.fun/api/info/ipcheck?ip=8.8.8.8"
/info/portscan
免费
端口扫描
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| host | string | 主机名或IP(必填) | example.com |
| ports | string | 端口列表(逗号分隔) | 80,443,22 |
| timeout | int | 超时秒数(默认2) | 3 |
curl "https://ourapix.fun/api/info/portscan?host=example.com&ports=80,443,22"
/text/diff
免费
文本对比
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| text1 | string | 第一段文本(必填) | Hello |
| text2 | string | 第二段文本(必填) | World |
curl -X POST "https://ourapix.fun/api/text/diff" -H "Content-Type: application/json" -d '{"text1":"Hello","text2":"World"}'
/text/html2text
免费
HTML转纯文本
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| html | string | HTML文本(必填) | <p>Hello</p> |
curl -X POST "https://ourapix.fun/api/text/html2text" -H "Content-Type: application/json" -d '{"html":"<h1>Title</h1><p>Content</p>"}'
/text/truncate
免费
文本截断
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| text | string | 输入文本(必填) | Hello World |
| length | int | 最大长度 | 5 |
| suffix | string | 截断后缀 | ... |
curl "https://ourapix.fun/api/text/truncate?text=Hello+World&length=5"
/info/sslcheck
免费
SSL证书检查
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| domain | string | 域名(必填) | google.com |
| port | int | 端口 | 443 |
curl "https://ourapix.fun/api/info/sslcheck?domain=google.com"
/math/unit
免费
单位转换
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| value | float | 数值(必填) | 100 |
| from | string | 源单位(必填) | km |
| to | string | 目标单位(必填) | mi |
支持类型: 长度(length)、重量(weight)、温度(temperature)、体积(volume)、面积(area)、速度(speed)、数据(data)
curl "https://ourapix.fun/api/math/unit?value=100&from=km&to=mi"
/text/morse
免费
摩尔斯电码编码与解码
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| text | string | 输入文本(必填) | Hello |
| action | string | 操作:encode/decode | encode |
curl "https://ourapix.fun/api/text/morse?text=Hello&action=encode"
/text/binary
免费
进制转换(二进制/八进制/十进制/十六进制)
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| text | string | 输入文本(必填) | Hello |
| action | string | 操作:encode/decode | encode |
| format | string | 格式:binary/hex/octal/decimal | hex |
curl "https://ourapix.fun/api/text/binary?text=Hello&format=hex"
/text/piglatin
免费
Pig Latin文字游戏转换
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| text | string | 英文文本(必填) | hello world |
curl "https://ourapix.fun/api/text/piglatin?text=hello+world"
/text/rot13
免费
ROT13/ROT47字符旋转编码
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| text | string | 输入文本(必填) | Hello |
| iterations | int | ROT13迭代次数(1-26) | 1 |
curl "https://ourapix.fun/api/text/rot13?text=Hello"
/info/translate
免费
多语言文本翻译(基于MyMemory)
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| text | string | 输入文本(必填) | hello |
| from | string | 源语言 | en |
| to | string | 目标语言 | zh |
curl "https://ourapix.fun/api/info/translate?text=hello&from=en&to=zh"
/info/emailvalidate
免费
邮箱格式与域名验证
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| string | 邮箱地址(必填) | test@example.com |
curl "https://ourapix.fun/api/info/emailvalidate?email=test@example.com"
/info/creditcard
免费
信用卡类型识别与Luhn校验
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| number | string | 卡号(必填) | 4111111111111111 |
curl "https://ourapix.fun/api/info/creditcard?number=4111111111111111"
/info/httpstatus
免费
HTTP状态码参考手册
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| code | int | 状态码 | 404 |
curl "https://ourapix.fun/api/info/httpstatus?code=404"
/info/chinesezodiac
免费
十二生肖信息查询
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| year | int | 年份 | 2026 |
| animal | string | 生肖名 | 龙 |
curl "https://ourapix.fun/api/info/chinesezodiac?year=2026"
/info/constellation
免费
十二星座信息查询
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| month | int | 月份 | 8 |
| day | int | 日期 | 15 |
| name | string | 星座名 | 狮子座 |
curl "https://ourapix.fun/api/info/constellation?month=8&day=15"
/info/lunar
免费
公历转农历日期(简化算法)
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| year | int | 年份 | 2026 |
| month | int | 月份 | 1 |
| day | int | 日期 | 29 |
curl "https://ourapix.fun/api/info/lunar?year=2026&month=1&day=29"
/info/binaryprefix
免费
二进制单位转换(B/KB/MB/GB/TB/PB)
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| value | float | 数值(必填) | 1024 |
| from | string | 源单位 | MB |
| to | string | 目标单位(默认auto) | GB |
curl "https://ourapix.fun/api/info/binaryprefix?value=1024&from=MB"
/info/htmllink
免费
提取网页中的链接和图片
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| url | string | 网页URL(必填) | example.com |
curl "https://ourapix.fun/api/info/htmllink?url=example.com"
/info/whoami
免费
查看客户端详细信息(IP、UA、Headers)
curl "https://ourapix.fun/api/info/whoami"
/info/mime
免费
MIME类型查询
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| ext | string | 文件扩展名 | .json |
| mime | string | MIME类型 | application/json |
curl "https://ourapix.fun/api/info/mime?ext=.json"
/info/holiday
免费
节假日查询(中国/美国/日本)
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| country | string | 国家代码:CN/US/JP | CN |
| year | int | 年份 | 2026 |
curl "https://ourapix.fun/api/info/holiday?country=CN&year=2026"
/info/colorpalette
免费
配色方案生成
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| hex | string | 基准颜色HEX值 | FF5733 |
| scheme | string | 方案类型:complementary/analogous/triadic/split | complementary |
curl "https://ourapix.fun/api/info/colorpalette?hex=FF5733"
/info/passwordgen
免费
自定义规则安全密码生成
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| length | int | 密码长度(默认16) | 20 |
| count | int | 生成数量 | 5 |
| uppercase | bool | 包含大写 | true |
| lowercase | bool | 包含小写 | true |
| numbers | bool | 包含数字 | true |
| symbols | bool | 包含符号 | true |
curl "https://ourapix.fun/api/info/passwordgen?length=20&count=3"
开发者工具API
代码生成、格式化、验证等开发辅助工具
/info/jwtencode
免费
JWT Token编码生成
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| payload | string | JSON格式的payload(必填) | {"sub":"123"} |
| secret | string | 签名密钥(可选,自动生成) | mysecret |
| algo | string | 算法:HS256/HS384/HS512 | HS256 |
curl "https://ourapix.fun/api/info/jwtencode?payload={%22sub%22:%22123%22}&secret=mykey"
/info/sqlformat
免费
SQL语句美化格式化
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| sql | string | SQL语句(必填) | SELECT * FROM users WHERE id=1 |
| indent | int | 缩进空格数(默认2) | 4 |
| uppercase | bool | 关键字大写 | true |
curl "https://ourapix.fun/api/info/sqlformat?sql=SELECT * FROM users WHERE id=1"
/info/semver
免费
语义化版本解析/比较/递增
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| version | string | 版本号(必填) | 1.2.3 |
| action | string | 操作:parse/compare/increment | parse |
| compare | string | 比较目标版本 | 1.3.0 |
| increment | string | 递增类型:major/minor/patch | minor |
curl "https://ourapix.fun/api/info/semver?version=1.2.3&action=compare&compare=1.3.0"
/info/httpbench
免费
HTTP响应时间基准测试
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| url | string | 目标URL(必填) | https://example.com |
| attempts | int | 测试次数(1-10,默认3) | 5 |
| method | string | 请求方法 | GET |
curl "https://ourapix.fun/api/info/httpbench?url=https://example.com&attempts=5"
/info/deadlink
免费
扫描网页中的失效链接
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| url | string | 网页URL(必填) | https://example.com |
| max | int | 最多检测链接数(1-50) | 20 |
curl "https://ourapix.fun/api/info/deadlink?url=https://example.com&max=10"
/info/envlint
免费
.env文件语法和安全检查
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| content | string | .env文件内容(必填) | DB_HOST=localhost |
curl -X POST "https://ourapix.fun/api/info/envlint" \
-H "Content-Type: application/json" \
-d '{"content":"DB_HOST=localhost\nDB_PASS=secret123"}'
/info/dockerlint
免费
Dockerfile语法和最佳实践检查
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| content | string | Dockerfile内容(必填) | FROM node:18 |
curl -X POST "https://ourapix.fun/api/info/dockerlint" \
-H "Content-Type: application/json" \
-d '{"content":"FROM node:18\nWORKDIR /app\nCOPY . .\nRUN npm install"}'
/info/wordfreq
免费
中英文文本词频统计分析
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| text | string | 输入文本(必填) | hello world hello |
| limit | int | 返回词数(默认20) | 10 |
| minlen | int | 最小词长 | 3 |
| stopwords | string | include不过滤停用词 | include |
curl "https://ourapix.fun/api/info/wordfreq?text=the+quick+brown+fox+jumps+over+the+lazy+dog&limit=5"
用户API
需要登录后使用,查询用户信息和使用记录
/user/profile
登录免费
获取用户个人信息
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| u | string | 用户Token(必填) | your_utoken |
curl "https://ourapix.fun/api/user/profile?u=YOUR_TOKEN"
/user/balance
登录免费
查询积分余额和消费统计
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| u | string | 用户Token(必填) | your_utoken |
curl "https://ourapix.fun/api/user/balance?u=YOUR_TOKEN"
/user/history
登录免费
查询API调用历史记录
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| u | string | 用户Token(必填) | your_utoken |
| limit | int | 返回条数(默认20) | 50 |
curl "https://ourapix.fun/api/user/history?u=YOUR_TOKEN&limit=10"
认证API
用户注册和登录
/auth/register
公开
用户注册
curl -X POST "https://ourapix.fun/api/auth/register" \
-H "Content-Type: application/json" \
-d '{"username":"testuser","email":"test@example.com","password":"12345678"}'
/auth/login
公开
用户登录,返回utoken
curl -X POST "https://ourapix.fun/api/auth/login" \
-H "Content-Type: application/json" \
-d '{"username":"testuser","password":"12345678"}'
响应格式
所有API返回JSON格式,统一结构:
{
"result": { ... }, // 业务数据
"meta": { // 元数据(付费API必有)
"api_name": "/getTime",
"elapsed_ms": 12.34,
"cost_points": 0
}
}
错误码
| HTTP状态码 | 说明 |
|---|---|
| 200 | 成功 |
| 400 | 参数错误 |
| 401 | 未授权(需要登录) |
| 403 | 禁止访问(积分不足) |
| 404 | API不存在 |
| 405 | 请求方法不允许 |
| 429 | 请求过于频繁 |
| 500 | 服务器内部错误 |