data-query
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseData Query Skill
数据查询Skill
Query various data and information including exchange rates, calendar, history, encyclopedia, and prices.
可查询各类数据信息,包括汇率、日历、历史、百科以及各类价格信息。
Available Queries
支持的查询类型
- Exchange Rates - Currency conversion rates
- Lunar Calendar - Chinese lunar calendar conversion
- Today in History - Historical events
- Encyclopedia (Baike) - Search Chinese encyclopedia
- Fuel Prices - Gasoline/diesel prices in China
- Gold Prices - Current gold prices
- Chemical Elements - Element information
- 汇率查询 - 货币兑换汇率
- 农历查询 - 中国农历转换
- 历史上的今天 - 历史事件查询
- 百科查询(百度百科) - 搜索中文百科内容
- 油价查询 - 中国汽油/柴油价格
- 金价查询 - 当前黄金价格
- 化学元素查询 - 元素信息查询
API Endpoints
API接口
| Query Type | Endpoint | Method |
|---|---|---|
| Exchange Rate | | GET |
| Lunar Calendar | | GET |
| History | | GET |
| Encyclopedia | | GET |
| Fuel Price | | GET |
| Gold Price | | GET |
| Chemical | | GET |
| 查询类型 | 接口地址 | 请求方法 |
|---|---|---|
| 汇率查询 | | GET |
| 农历查询 | | GET |
| 历史事件 | | GET |
| 百科查询 | | GET |
| 油价查询 | | GET |
| 金价查询 | | GET |
| 化学元素 | | GET |
Quick Examples
快速示例
Exchange Rates
汇率查询
python
import requestspython
import requestsGet exchange rate
获取汇率
params = {'from': 'USD', 'to': 'CNY'}
response = requests.get('https://60s.viki.moe/v2/exchange-rate', params=params)
rate = response.json()
print(f"💱 1 {rate['from']} = {rate['rate']} {rate['to']}")
print(f"更新时间:{rate['update_time']}")
undefinedparams = {'from': 'USD', 'to': 'CNY'}
response = requests.get('https://60s.viki.moe/v2/exchange-rate', params=params)
rate = response.json()
print(f"💱 1 {rate['from']} = {rate['rate']} {rate['to']}")
print(f"更新时间:{rate['update_time']}")
undefinedLunar Calendar
农历查询
python
undefinedpython
undefinedGet today's lunar date
获取今日农历日期
response = requests.get('https://60s.viki.moe/v2/lunar')
lunar = response.json()
print(f"📅 公历:{lunar['solar_date']}")
print(f"🏮 农历:{lunar['lunar_date']}")
print(f"🐲 生肖:{lunar['zodiac']}")
print(f"🌾 节气:{lunar['solar_term']}")
response = requests.get('https://60s.viki.moe/v2/lunar')
lunar = response.json()
print(f"📅 公历:{lunar['solar_date']}")
print(f"🏮 农历:{lunar['lunar_date']}")
print(f"🐲 生肖:{lunar['zodiac']}")
print(f"🌾 节气:{lunar['solar_term']}")
Specific date
查询指定日期
params = {'date': '2024-01-15'}
response = requests.get('https://60s.viki.moe/v2/lunar', params=params)
undefinedparams = {'date': '2024-01-15'}
response = requests.get('https://60s.viki.moe/v2/lunar', params=params)
undefinedToday in History
历史上的今天
python
undefinedpython
undefinedGet today's historical events
获取今日历史事件
response = requests.get('https://60s.viki.moe/v2/today-in-history')
history = response.json()
print(f"📜 历史上的今天 ({history['date']})")
for event in history['events'][:5]:
print(f"{event['year']}年:{event['title']}")
response = requests.get('https://60s.viki.moe/v2/today-in-history')
history = response.json()
print(f"📜 历史上的今天 ({history['date']})")
for event in history['events'][:5]:
print(f"{event['year']}年:{event['title']}")
Specific date
查询指定日期
params = {'month': 1, 'day': 15}
response = requests.get('https://60s.viki.moe/v2/today-in-history', params=params)
undefinedparams = {'month': 1, 'day': 15}
response = requests.get('https://60s.viki.moe/v2/today-in-history', params=params)
undefinedEncyclopedia Search
百科搜索
python
undefinedpython
undefinedSearch encyclopedia
搜索百科内容
params = {'keyword': 'Python编程'}
response = requests.get('https://60s.viki.moe/v2/baike', params=params)
result = response.json()
print(f"📖 {result['title']}")
print(f"📝 {result['summary']}")
print(f"🔗 {result['url']}")
undefinedparams = {'keyword': 'Python编程'}
response = requests.get('https://60s.viki.moe/v2/baike', params=params)
result = response.json()
print(f"📖 {result['title']}")
print(f"📝 {result['summary']}")
print(f"🔗 {result['url']}")
undefinedFuel Prices
油价查询
python
undefinedpython
undefinedGet fuel prices
获取油价信息
params = {'province': '北京'}
response = requests.get('https://60s.viki.moe/v2/fuel-price', params=params)
prices = response.json()
print(f"⛽ {prices['province']} 油价")
print(f"92号汽油:{prices['92号汽油']} 元/升")
print(f"95号汽油:{prices['95号汽油']} 元/升")
print(f"98号汽油:{prices['98号汽油']} 元/升")
print(f"0号柴油:{prices['0号柴油']} 元/升")
undefinedparams = {'province': '北京'}
response = requests.get('https://60s.viki.moe/v2/fuel-price', params=params)
prices = response.json()
print(f"⛽ {prices['province']} 油价")
print(f"92号汽油:{prices['92号汽油']} 元/升")
print(f"95号汽油:{prices['95号汽油']} 元/升")
print(f"98号汽油:{prices['98号汽油']} 元/升")
print(f"0号柴油:{prices['0号柴油']} 元/升")
undefinedGold Prices
金价查询
python
undefinedpython
undefinedGet current gold prices
获取当前黄金价格
response = requests.get('https://60s.viki.moe/v2/gold-price')
gold = response.json()
print(f"💰 黄金价格")
print(f"国际金价:{gold['国际金价']} 美元/盎司")
print(f"国内金价:{gold['国内金价']} 元/克")
print(f"更新时间:{gold['update_time']}")
undefinedresponse = requests.get('https://60s.viki.moe/v2/gold-price')
gold = response.json()
print(f"💰 黄金价格")
print(f"国际金价:{gold['国际金价']} 美元/盎司")
print(f"国内金价:{gold['国内金价']} 元/克")
print(f"更新时间:{gold['update_time']}")
undefinedChemical Elements
化学元素查询
python
undefinedpython
undefinedSearch chemical element
搜索化学元素
params = {'query': 'H'} # Can be symbol, name, or atomic number
response = requests.get('https://60s.viki.moe/v2/chemical', params=params)
element = response.json()
print(f"⚛️ {element['name']} ({element['symbol']})")
print(f"原子序数:{element['atomic_number']}")
print(f"原子量:{element['atomic_mass']}")
print(f"元素类别:{element['category']}")
undefinedparams = {'query': 'H'} # 支持元素符号、名称或原子序数
response = requests.get('https://60s.viki.moe/v2/chemical', params=params)
element = response.json()
print(f"⚛️ {element['name']} ({element['symbol']})")
print(f"原子序数:{element['atomic_number']}")
print(f"原子量:{element['atomic_mass']}")
print(f"元素类别:{element['category']}")
undefinedUse Cases
使用场景
Currency Converter Bot
货币兑换机器人
python
def convert_currency(amount, from_currency, to_currency):
params = {'from': from_currency, 'to': to_currency}
response = requests.get('https://60s.viki.moe/v2/exchange-rate', params=params)
rate = response.json()
converted = amount * float(rate['rate'])
return f"{amount} {from_currency} = {converted:.2f} {to_currency}"python
def convert_currency(amount, from_currency, to_currency):
params = {'from': from_currency, 'to': to_currency}
response = requests.get('https://60s.viki.moe/v2/exchange-rate', params=params)
rate = response.json()
converted = amount * float(rate['rate'])
return f"{amount} {from_currency} = {converted:.2f} {to_currency}"Usage
使用示例
print(convert_currency(100, 'USD', 'CNY')) # 100 USD = 725.50 CNY
undefinedprint(convert_currency(100, 'USD', 'CNY')) # 100 USD = 725.50 CNY
undefinedHistorical Event Reminder
历史事件提醒工具
python
def get_today_history():
response = requests.get('https://60s.viki.moe/v2/today-in-history')
history = response.json()
message = f"📜 历史上的今天 ({history['date']})\n\n"
for event in history['events'][:3]:
message += f"· {event['year']}年:{event['title']}\n"
return messagepython
def get_today_history():
response = requests.get('https://60s.viki.moe/v2/today-in-history')
history = response.json()
message = f"📜 历史上的今天 ({history['date']})\n\n"
for event in history['events'][:3]:
message += f"· {event['year']}年:{event['title']}\n"
return messageLunar Calendar Widget
农历日历组件
python
def get_lunar_info():
response = requests.get('https://60s.viki.moe/v2/lunar')
lunar = response.json()
return f"""
📅 今日日历
公历:{lunar['solar_date']} {lunar['weekday']}
农历:{lunar['lunar_date']}
生肖:{lunar['zodiac']}
节气:{lunar['solar_term'] or '无'}
"""python
def get_lunar_info():
response = requests.get('https://60s.viki.moe/v2/lunar')
lunar = response.json()
return f"""
📅 今日日历
公历:{lunar['solar_date']} {lunar['weekday']}
农历:{lunar['lunar_date']}
生肖:{lunar['zodiac']}
节气:{lunar['solar_term'] or '无'}
"""Example Interactions
交互示例
User: "美元兑人民币汇率是多少?"
用户:"美元兑人民币汇率是多少?"
python
params = {'from': 'USD', 'to': 'CNY'}
response = requests.get('https://60s.viki.moe/v2/exchange-rate', params=params)
rate = response.json()
print(f"💱 1 美元 = {rate['rate']} 人民币")python
params = {'from': 'USD', 'to': 'CNY'}
response = requests.get('https://60s.viki.moe/v2/exchange-rate', params=params)
rate = response.json()
print(f"💱 1 美元 = {rate['rate']} 人民币")User: "今天农历是几月几号?"
用户:"今天农历是几月几号?"
python
lunar = requests.get('https://60s.viki.moe/v2/lunar').json()
print(f"🏮 今天是农历 {lunar['lunar_date']}")
print(f"🐲 生肖:{lunar['zodiac']}")python
lunar = requests.get('https://60s.viki.moe/v2/lunar').json()
print(f"🏮 今天是农历 {lunar['lunar_date']}")
print(f"🐲 生肖:{lunar['zodiac']}")User: "查询一下氢元素的信息"
用户:"查询一下氢元素的信息"
python
params = {'query': '氢'}
element = requests.get('https://60s.viki.moe/v2/chemical', params=params).json()
print(f"⚛️ {element['name']} (H)")
print(f"原子序数:{element['atomic_number']}")
print(f"元素类别:{element['category']}")python
params = {'query': '氢'}
element = requests.get('https://60s.viki.moe/v2/chemical', params=params).json()
print(f"⚛️ {element['name']} (H)")
print(f"原子序数:{element['atomic_number']}")
print(f"元素类别:{element['category']}")