API 文档

所有API基础路径:https://ourapix.fun/api

免费公开API

无需鉴权,直接调用

GET /getTime 免费

获取当前时间,支持时区和格式化

参数类型说明示例
timezonestring时区名称Asia/Shanghai
formatstring输出格式:text/jsonjson
gmtoffsetintGMT偏移(小时)8
curl "https://ourapix.fun/api/getTime?format=json"
GET /getIP 免费

获取客户端IP地理位置信息

参数类型说明示例
formatstring输出格式:json/textjson
curl "https://ourapix.fun/api/getIP"
GET /getWeather 免费

查询城市天气信息

参数类型说明示例
citystring城市名称北京
unitsstring温度单位:c/f/kc
curl "https://ourapix.fun/api/getWeather?city=上海"
GET /getWhois 免费

域名WHOIS信息查询

参数类型说明示例
domainstring域名(必填)example.com
curl "https://ourapix.fun/api/getWhois?domain=google.com"
GET /getLatLon 免费

IP经纬度查询

参数类型说明示例
actionstring查询方式:ip/urlip
latfloat纬度(action=url时)39.9
lngfloat经度(action=url时)116.4
curl "https://ourapix.fun/api/getLatLon"
GET /base64 免费

Base64编码/解码

参数类型说明示例
actionstring操作:encode/decodeencode
inputstring输入内容(必填)Hello
curl "https://ourapix.fun/api/base64?action=encode&input=Hello"
GET /hash 免费

Hash计算(MD5/SHA等)

参数类型说明示例
algostring算法:md5/sha1/sha256/sha512/blake2bmd5
inputstring输入内容(必填)Hello
curl "https://ourapix.fun/api/hash?algo=sha256&input=test"
GET /getTimeTimestamp 免费

时间戳转换

参数类型说明示例
actionstring转换类型:unix/iso8601unix
inputstring输入值2026-01-01T00:00:00Z
curl "https://ourapix.fun/api/getTimeTimestamp?action=unix&input=2026-01-01T00:00:00Z"
GET /qrcode/gen 免费

生成二维码

参数类型说明示例
textstring内容(必填)https://ourapix.fun
sizeint尺寸300
error_levelstring容错级别:L/M/Q/HM
curl "https://ourapix.fun/api/qrcode/gen?text=https://ourapix.fun"

登录免费API

需要用户登录获取utoken后调用

GET /selfsignSSL

自签署SSL证书生成

参数类型说明示例
ustring用户token(必填)your_utoken
domainstring域名(必填)example.com
keysizeint密钥大小2048
curl "https://ourapix.fun/api/selfsignSSL?u=YOUR_TOKEN&domain=example.com"
GET /qrcode/read

解析二维码图片

参数类型说明示例
ustring用户token(必填)your_utoken
imagestringBase64图片数据data:image/png;base64,...
curl -X POST "https://ourapix.fun/api/qrcode/read" -d "u=YOUR_TOKEN&image=..."

付费API

需要登录并有足够积分余额

GET /compute/complex

复杂计算服务(阶乘、斐波那契、质因数分解、蒙特卡洛)

参数类型说明示例
ustring用户token(必填)your_utoken
pstring钱包token(必填)your_ptoken
operationstring操作类型factorial
inputstring输入值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

持续更新中

GET /crypto/exchange 免费

实时货币汇率转换

参数类型说明示例
fromstring源货币代码USD
tostring目标货币代码CNY
amountfloat金额100
curl "https://ourapix.fun/api/crypto/exchange?from=USD&to=CNY&amount=100"
GET /text/randomPassword 免费

生成安全随机密码

参数类型说明示例
lengthint密码长度16
countint生成数量5
uppercasebool包含大写字母true
lowercasebool包含小写字母true
numbersbool包含数字true
symbolsbool包含符号true
curl "https://ourapix.fun/api/text/randomPassword?length=20&count=3"
GET /text/uuid 免费

生成UUID

参数类型说明示例
versionintUUID版本:1或44
countint生成数量5
formatstring格式:standard/simple/braces/upperstandard
curl "https://ourapix.fun/api/text/uuid?count=3"
GET /text/transform 免费

文本格式转换

参数类型说明示例
textstring输入文本(必填)Hello World
actionstring转换类型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"
GET /math/random 免费

随机数生成

参数类型说明示例
minint最小值1
maxint最大值100
countint生成数量10
uniquebool是否唯一true
sortstring排序:none/asc/descnone
curl "https://ourapix.fun/api/math/random?min=1&max=100&count=5&unique=true"
GET /math/calculate 免费

数学计算器

参数类型说明示例
exprstring数学表达式(必填)(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"
GET /info/useragent 免费

解析User-Agent字符串

参数类型说明示例
uastringUA字符串(默认当前请求)Mozilla/5.0...
curl "https://ourapix.fun/api/info/useragent"
GET /info/iplocation 免费

IP归属地查询

参数类型说明示例
ipstringIP地址(默认当前IP)8.8.8.8
curl "https://ourapix.fun/api/info/iplocation?ip=8.8.8.8"
GET /info/headers 免费

查看HTTP请求头信息

curl "https://ourapix.fun/api/info/headers"
GET /text/lorem 免费

Lorem Ipsum占位文本生成

参数类型说明示例
paragraphsint段落数量3
formatstring输出格式:text/json/htmltext
curl "https://ourapix.fun/api/text/lorem?paragraphs=5"
GET /info/colorconvert 免费

颜色格式转换(HEX/RGB/HSL)

参数类型说明示例
colorstring颜色值(必填)#FF5733
fromstring输入格式:auto/hex/rgb/hslauto
curl "https://ourapix.fun/api/info/colorconvert?color=%23FF5733"
GET /info/domaincheck 免费

域名可用性检查(DNS/HTTP/SSL)

参数类型说明示例
domainstring域名(必填)example.com
curl "https://ourapix.fun/api/info/domaincheck?domain=google.com"
POST /text/markdown 免费

Markdown转HTML

参数类型说明示例
textstringMarkdown文本(必填)# Hello
curl -X POST "https://ourapix.fun/api/text/markdown" -H "Content-Type: application/json" -d '{"text":"# Hello\n\n**World**"}'
GET /text/wordcount 免费

字数统计(支持中英文)

参数类型说明示例
textstring输入文本(必填)Hello World
curl "https://ourapix.fun/api/text/wordcount?text=Hello+World"
GET /info/ipcheck 免费

IP黑名单检测

参数类型说明示例
ipstringIP地址(默认当前IP)8.8.8.8
curl "https://ourapix.fun/api/info/ipcheck?ip=8.8.8.8"
GET /info/portscan 免费

端口扫描

参数类型说明示例
hoststring主机名或IP(必填)example.com
portsstring端口列表(逗号分隔)80,443,22
timeoutint超时秒数(默认2)3
curl "https://ourapix.fun/api/info/portscan?host=example.com&ports=80,443,22"
POST /text/diff 免费

文本对比

参数类型说明示例
text1string第一段文本(必填)Hello
text2string第二段文本(必填)World
curl -X POST "https://ourapix.fun/api/text/diff" -H "Content-Type: application/json" -d '{"text1":"Hello","text2":"World"}'
POST /text/html2text 免费

HTML转纯文本

参数类型说明示例
htmlstringHTML文本(必填)<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>"}'
GET /text/truncate 免费

文本截断

参数类型说明示例
textstring输入文本(必填)Hello World
lengthint最大长度5
suffixstring截断后缀...
curl "https://ourapix.fun/api/text/truncate?text=Hello+World&length=5"
GET /info/sslcheck 免费

SSL证书检查

参数类型说明示例
domainstring域名(必填)google.com
portint端口443
curl "https://ourapix.fun/api/info/sslcheck?domain=google.com"
GET /math/unit 免费

单位转换

参数类型说明示例
valuefloat数值(必填)100
fromstring源单位(必填)km
tostring目标单位(必填)mi

支持类型: 长度(length)、重量(weight)、温度(temperature)、体积(volume)、面积(area)、速度(speed)、数据(data)

curl "https://ourapix.fun/api/math/unit?value=100&from=km&to=mi"
GET /text/morse 免费

摩尔斯电码编码与解码

参数类型说明示例
textstring输入文本(必填)Hello
actionstring操作:encode/decodeencode
curl "https://ourapix.fun/api/text/morse?text=Hello&action=encode"
GET /text/binary 免费

进制转换(二进制/八进制/十进制/十六进制)

参数类型说明示例
textstring输入文本(必填)Hello
actionstring操作:encode/decodeencode
formatstring格式:binary/hex/octal/decimalhex
curl "https://ourapix.fun/api/text/binary?text=Hello&format=hex"
GET /text/piglatin 免费

Pig Latin文字游戏转换

参数类型说明示例
textstring英文文本(必填)hello world
curl "https://ourapix.fun/api/text/piglatin?text=hello+world"
GET /text/rot13 免费

ROT13/ROT47字符旋转编码

参数类型说明示例
textstring输入文本(必填)Hello
iterationsintROT13迭代次数(1-26)1
curl "https://ourapix.fun/api/text/rot13?text=Hello"
GET /info/translate 免费

多语言文本翻译(基于MyMemory)

参数类型说明示例
textstring输入文本(必填)hello
fromstring源语言en
tostring目标语言zh
curl "https://ourapix.fun/api/info/translate?text=hello&from=en&to=zh"
GET /info/emailvalidate 免费

邮箱格式与域名验证

参数类型说明示例
emailstring邮箱地址(必填)test@example.com
curl "https://ourapix.fun/api/info/emailvalidate?email=test@example.com"
GET /info/creditcard 免费

信用卡类型识别与Luhn校验

参数类型说明示例
numberstring卡号(必填)4111111111111111
curl "https://ourapix.fun/api/info/creditcard?number=4111111111111111"
GET /info/httpstatus 免费

HTTP状态码参考手册

参数类型说明示例
codeint状态码404
curl "https://ourapix.fun/api/info/httpstatus?code=404"
GET /info/chinesezodiac 免费

十二生肖信息查询

参数类型说明示例
yearint年份2026
animalstring生肖名
curl "https://ourapix.fun/api/info/chinesezodiac?year=2026"
GET /info/constellation 免费

十二星座信息查询

参数类型说明示例
monthint月份8
dayint日期15
namestring星座名狮子座
curl "https://ourapix.fun/api/info/constellation?month=8&day=15"
GET /info/lunar 免费

公历转农历日期(简化算法)

参数类型说明示例
yearint年份2026
monthint月份1
dayint日期29
curl "https://ourapix.fun/api/info/lunar?year=2026&month=1&day=29"
GET /info/binaryprefix 免费

二进制单位转换(B/KB/MB/GB/TB/PB)

参数类型说明示例
valuefloat数值(必填)1024
fromstring源单位MB
tostring目标单位(默认auto)GB
curl "https://ourapix.fun/api/info/binaryprefix?value=1024&from=MB"
GET /info/htmllink 免费

提取网页中的链接和图片

参数类型说明示例
urlstring网页URL(必填)example.com
curl "https://ourapix.fun/api/info/htmllink?url=example.com"
GET /info/whoami 免费

查看客户端详细信息(IP、UA、Headers)

curl "https://ourapix.fun/api/info/whoami"
GET /info/mime 免费

MIME类型查询

参数类型说明示例
extstring文件扩展名.json
mimestringMIME类型application/json
curl "https://ourapix.fun/api/info/mime?ext=.json"
GET /info/holiday 免费

节假日查询(中国/美国/日本)

参数类型说明示例
countrystring国家代码:CN/US/JPCN
yearint年份2026
curl "https://ourapix.fun/api/info/holiday?country=CN&year=2026"
GET /info/colorpalette 免费

配色方案生成

参数类型说明示例
hexstring基准颜色HEX值FF5733
schemestring方案类型:complementary/analogous/triadic/splitcomplementary
curl "https://ourapix.fun/api/info/colorpalette?hex=FF5733"
GET /info/passwordgen 免费

自定义规则安全密码生成

参数类型说明示例
lengthint密码长度(默认16)20
countint生成数量5
uppercasebool包含大写true
lowercasebool包含小写true
numbersbool包含数字true
symbolsbool包含符号true
curl "https://ourapix.fun/api/info/passwordgen?length=20&count=3"

开发者工具API

代码生成、格式化、验证等开发辅助工具

GET /info/jwtencode 免费

JWT Token编码生成

参数类型说明示例
payloadstringJSON格式的payload(必填){"sub":"123"}
secretstring签名密钥(可选,自动生成)mysecret
algostring算法:HS256/HS384/HS512HS256
curl "https://ourapix.fun/api/info/jwtencode?payload={%22sub%22:%22123%22}&secret=mykey"
GET /info/sqlformat 免费

SQL语句美化格式化

参数类型说明示例
sqlstringSQL语句(必填)SELECT * FROM users WHERE id=1
indentint缩进空格数(默认2)4
uppercasebool关键字大写true
curl "https://ourapix.fun/api/info/sqlformat?sql=SELECT * FROM users WHERE id=1"
GET /info/semver 免费

语义化版本解析/比较/递增

参数类型说明示例
versionstring版本号(必填)1.2.3
actionstring操作:parse/compare/incrementparse
comparestring比较目标版本1.3.0
incrementstring递增类型:major/minor/patchminor
curl "https://ourapix.fun/api/info/semver?version=1.2.3&action=compare&compare=1.3.0"
GET /info/httpbench 免费

HTTP响应时间基准测试

参数类型说明示例
urlstring目标URL(必填)https://example.com
attemptsint测试次数(1-10,默认3)5
methodstring请求方法GET
curl "https://ourapix.fun/api/info/httpbench?url=https://example.com&attempts=5"
GET /info/deadlink 免费

扫描网页中的失效链接

参数类型说明示例
urlstring网页URL(必填)https://example.com
maxint最多检测链接数(1-50)20
curl "https://ourapix.fun/api/info/deadlink?url=https://example.com&max=10"
POST /info/envlint 免费

.env文件语法和安全检查

参数类型说明示例
contentstring.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"}'
POST /info/dockerlint 免费

Dockerfile语法和最佳实践检查

参数类型说明示例
contentstringDockerfile内容(必填)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"}'
GET /info/wordfreq 免费

中英文文本词频统计分析

参数类型说明示例
textstring输入文本(必填)hello world hello
limitint返回词数(默认20)10
minlenint最小词长3
stopwordsstringinclude不过滤停用词include
curl "https://ourapix.fun/api/info/wordfreq?text=the+quick+brown+fox+jumps+over+the+lazy+dog&limit=5"

用户API

需要登录后使用,查询用户信息和使用记录

GET /user/profile

获取用户个人信息

参数类型说明示例
ustring用户Token(必填)your_utoken
curl "https://ourapix.fun/api/user/profile?u=YOUR_TOKEN"
GET /user/balance

查询积分余额和消费统计

参数类型说明示例
ustring用户Token(必填)your_utoken
curl "https://ourapix.fun/api/user/balance?u=YOUR_TOKEN"
GET /user/history

查询API调用历史记录

参数类型说明示例
ustring用户Token(必填)your_utoken
limitint返回条数(默认20)50
curl "https://ourapix.fun/api/user/history?u=YOUR_TOKEN&limit=10"

认证API

用户注册和登录

POST /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"}'
POST /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禁止访问(积分不足)
404API不存在
405请求方法不允许
429请求过于频繁
500服务器内部错误