x-api-key: 你的正式密钥(付费用户)x-visitor-id: 访客ID(免费试用,自动生成)https://lingyunai.cn/api/
| 参数 | 必填 | 说明 |
|---|---|---|
| from | 是 | 源货币代码,如 USD、CNY |
| to | 是 | 目标货币代码,如 CNY、EUR |
GET /api/rate?from=USD&to=CNY返回示例
{
"node": "income_node_1",
"exchange_rate": 6.9032,
"from": "USD",
"to": "CNY",
"last_updated": "2026-02-23",
"api_used": "Alpha Vantage",
"real_data": true
}
| 参数 | 必填 | 说明 |
|---|---|---|
| from | 是 | 源货币代码 |
| to | 是 | 目标货币代码 |
| date | 是 | 日期,格式 YYYY-MM-DD |
GET /api/rate-history?from=USD&to=CNY&date=2024-02-01返回示例
{
"node": "rate-history",
"date": "2024-02-01",
"from": "USD",
"to": "CNY",
"rate": 7.1822,
"api_used": "Frankfurter",
"real_data": true
}
| 参数 | 必填 | 说明 |
|---|---|---|
| country | 是 | 国家代码,如 DE(德国)、CN(中国) |
GET /api/vat?country=DE返回示例
{
"node": "vat",
"country": "DE",
"vat_rates": {"standard": 19},
"api_used": "VAT Sense",
"real_data": true
}
请求体(JSON)
| 参数 | 必填 | 说明 |
|---|---|---|
| cost | 是 | 采购价(¥) |
| qty | 是 | 数量 |
| shipping | 是 | 运费(¥/件) |
| commission | 是 | 平台佣金(%) |
| price | 是 | 目标售价(¥/件) |
| tariffRate | 是 | 关税率(%) |
| rate | 是 | 汇率(CNY/USD) |
| vatRate | 是 | 增值税率(%) |
POST /api/profit
Content-Type: application/json
{
"cost": 100,
"qty": 10,
"shipping": 20,
"commission": 15,
"price": 200,
"tariffRate": 5,
"rate": 7.2,
"vatRate": 13
}
返回示例
{
"node": "profit-calculator",
"calculation": {
"totalCost": "1000.00",
"totalShipping": "200.00",
"tariff": "50.00",
"vat": "130.00",
"commissionFee": "300.00",
"totalRevenue": "2000.00",
"profit": "320.00",
"margin": "16.0%",
"breakevenPrice": "151.02"
},
"disclaimer": "本计算结果为预估参考,不构成实际报价依据。"
}
或使用城市名:/api/weather?city=北京(内置城市映射)
| 参数 | 必填 | 说明 |
|---|---|---|
| lat | 与lon成对 | 纬度 |
| lon | 与lat成对 | 经度 |
| city | 与经纬度互斥 | 城市名(支持中国主要城市) |
GET /api/weather?lat=39.9042&lon=116.4074返回示例
{
"node": "income_node_2",
"temperature": 4,
"weathercode": 3,
"lat": 39.9042,
"lon": 116.4074,
"api_used": "Open-Meteo",
"real_data": true
}
同样支持 ?city=北京 模式
GET /api/aqi?lat=39.9042&lon=116.4074返回示例
{
"node": "aqi",
"aqi": 80,
"pm25": 35,
"pm10": 60,
"lat": 39.9042,
"lon": 116.4074,
"api_used": "Open-Meteo AQI",
"real_data": true
}
支持城市名模式
请求示例GET /api/precip?lat=39.9042&lon=116.4074返回示例
{
"node": "precip",
"forecast": [
{"time": "2026-02-21T00:00", "precip": 0},
{"time": "2026-02-21T01:00", "precip": 0.2}
],
"lat": 39.9042,
"lon": 116.4074,
"api_used": "Open-Meteo Precip",
"real_data": true
}
支持城市名模式
请求示例GET /api/alert?lat=39.9042&lon=116.4074返回示例
{
"node": "alert",
"alerts": [
{
"title": "大风蓝色预警",
"typeText": "气象预警",
"levelText": "蓝色",
"description": "预计未来24小时将出现大风天气",
"published": "2026-02-21T10:00:00Z"
}
],
"point": {"lat":39.9042,"lon":116.4074},
"api_used": "qweather",
"real_data": true
}
不传 IP 则查询请求来源的公网 IP。
请求示例GET /api/ip?ip=8.8.8.8返回示例
{
"node": "ip",
"data": {
"ip": "111.229.103.156",
"country": "China",
"city": "Shanghai"
}
}
GET /api/qrcode?text=https://lingyunai.cn返回示例
{
"node": "qrcode",
"data": {
"qr": "data:image/png;base64,...",
"text": "https://lingyunai.cn"
}
}
请求体(JSON)
| 参数 | 必填 | 说明 |
|---|---|---|
| url | 是 | 长网址 |
POST /api/shortlink/create
Content-Type: application/json
{"url": "https://example.com/long/url"}
返回示例
{
"node": "shortlink",
"data": {
"short": "https://lingyunai.cn/s/abc123",
"long": "https://example.com/long/url"
}
}
| 参数 | 必填 | 说明 |
|---|---|---|
| date | 是 | 日期,格式 YYYY-MM-DD |
GET /api/auspicious?date=2026-02-23返回示例
{
"node": "auspicious",
"data": {
"solar": "2026-02-23",
"lunar": "二〇二六年正月初七",
"yi": ["会亲友", "冠笄", "安床"],
"ji": ["嫁娶", "开市", "动土"]
}
}
📢 所有付费节点均支持免费试用(7天,每天1000次),试用期无需付费,直接使用访客ID即可。
💰 付费套餐:单节点 19.9元/月,单场景(4节点)29.9元/月,双场景(8节点)39.9元/月。支持开发票,对公付款。
📞 遇到问题或需要定制需求?扫码添加微信: