调用地址
无需鉴权
支持 CORS
每 IP 每分钟 30 次;结果缓存 86400 秒
在线调试
请求会发送到本站接口当前请求:https://api.blueworkshop.top/api/v1/dictionary
请求参数
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
word必填 |
string | - | 英文单词,例如 hello。 示例: hello |
请求示例
cURL
curl "https://api.blueworkshop.top/api/v1/dictionary?word=hello"
JavaScript
const res = await fetch("https://api.blueworkshop.top/api/v1/dictionary?word=hello");
const data = await res.json();
console.log(data);响应示例
{
"ok": true,
"data": [
{
"word": "hello",
"phonetic": "/həˈləʊ/",
"meanings": [
{
"partOfSpeech": "noun",
"definitions": [
{
"definition": "an utterance of hello; a greeting."
}
]
}
]
}
],
"meta": {
"endpoint": "dictionary",
"cached": false
}
}
成功时返回 JSON 信封:ok 表示是否成功,data 为数据,meta.cached 表示是否命中本站缓存。图片类接口直接返回二进制图片。
错误响应
| HTTP | 错误码 | 说明 |
|---|---|---|
| 400 | missing_param / invalid_param | 缺少参数或参数格式不正确,响应会带上出错参数名。 |
| 404 | not_found | 接口不存在,或上游没有找到对应资源。 |
| 405 | method_not_allowed | 请求方法与接口要求不一致。 |
| 429 | rate_limited | 请求过于频繁,响应头 Retry-After 给出建议等待秒数。 |
| 502 | upstream_error / upstream_rate_limited | 上游服务异常或触发限流。 |
| 504 | timeout | 上游请求超时。 |
接口说明
基于 Free Dictionary API 查询英文单词的释义、音标、词性与例句,无需密钥。
适合英语学习工具、查词插件与内容标注。结果缓存 1 天,查不到的词会返回 404。