开放API接口文档
3325英语网 提供免费的英语词典数据接口,返回标准JSON格式数据,方便开发者快速集成到应用中。
快速参考
Base URL:https://3325.cn/api
请求方式:GET
响应格式:application/json; charset=utf-8
限流策略:每IP每分钟 60 次请求
CORS支持:Access-Control-Allow-Origin: *
超限响应:HTTP 429 Too Many Requests
通用响应格式
所有API接口返回统一的JSON结构:
{
"code": 200,
"message": "success",
"data": { ... }
}
| 字段 | 类型 | 说明 |
|---|---|---|
code | int | 状态码,200表示成功,其余为错误 |
message | string | 状态描述 |
data | object|null | 响应数据,错误时为null |
常见错误码:400(参数错误)、404(资源不存在)、405(方法不允许)、429(限流)、500(服务器错误)
单词详情
GET
/api/word/{word}
查询单词的音标、词性、释义等详细信息
路径参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
word | string | 是 | 英语单词,需URL编码 |
示例请求
GET https://3325.cn/api/word/hello
响应示例
{
"code": 200,
"message": "success",
"data": {
"id": 12345,
"word": "hello",
"british": "/həˈləʊ/",
"american": "/həˈloʊ/",
"cx": "int. n.",
"jbjs": "int. 喂;你好;n. 招呼声",
"url": "https://3325.cn/dict/hello"
}
}
试一试
单词近义词
GET
/api/word/{word}/synonyms
查询单词的近义词列表
路径参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
word | string | 是 | 英语单词,需URL编码 |
示例请求
GET https://3325.cn/api/word/happy/synonyms
响应示例
{
"code": 200,
"message": "success",
"data": {
"word": "happy",
"synonyms": [
{ "id": 234, "word": "glad", "cx": "adj." },
{ "id": 567, "word": "joyful", "cx": "adj." }
],
"count": 2
}
}
试一试
单词反义词
GET
/api/word/{word}/antonyms
查询单词的反义词列表
搜索单词和缩写
GET
/api/search?q={keyword}
根据关键词搜索单词或缩写
查询参数
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
q | string | 是 | - | 搜索关键词 |
type | string | 否 | all | 搜索类型:all / word / abbr |
page | int | 否 | 1 | 页码 |
per_page | int | 否 | 20 | 每页条数,最大50 |
示例请求
GET https://3325.cn/api/search?q=hello&type=word&page=1&per_page=5
缩写详情
GET
/api/abbr/{id}
按ID查询缩写的详细信息
路径参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
id | int | 是 | 缩写记录的数字ID |
响应示例
{
"code": 200,
"message": "success",
"data": {
"id": 100,
"abbr": "AI",
"full": "Artificial Intelligence",
"prc": "人工智能",
"meaning": "...",
"category_id": 58,
"url": "https://3325.cn/abbr/100"
}
}
搜索缩写
GET
/api/abbr?q={keyword}
按关键词或分类搜索缩写
查询参数
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
q | string | 否 | - | 搜索关键词(缩写/全称/中文) |
category_id | int | 否 | 0 | 分类ID筛选(58-87) |
page | int | 否 | 1 | 页码 |
per_page | int | 否 | 20 | 每页条数,最大50 |
按字母浏览单词
GET
/api/letter/{A-Z}
获取指定字母开头的单词列表
路径参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
letter | string | 是 | 单个英文字母 A-Z(不区分大小写) |
查询参数
| 参数 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
page | int | 否 | 1 | 页码 |
per_page | int | 否 | 20 | 每页条数,最大100 |
站点统计
GET
/api/stats
获取站点数据统计信息
响应示例
{
"code": 200,
"message": "success",
"data": {
"word_count": 3397878,
"abbr_count": 24753,
"scene_count": 1234,
"cat_word_count": 5678
}
}
试一试
代码示例
CODE
JavaScript / Python / PHP
常用语言调用示例
JavaScript (Fetch)
// 查询单词详情
fetch('https://3325.cn/api/word/hello')
.then(res => res.json())
.then(data => console.log(data.data.word));
// 搜索单词
fetch('https://3325.cn/api/search?q=hello&type=word')
.then(res => res.json())
.then(data => console.log(data.data.words));
Python (requests)
import requests
# 查询单词详情
resp = requests.get('https://3325.cn/api/word/hello')
data = resp.json()
print(data['data']['word']) # hello
# 查询近义词
resp = requests.get('https://3325.cn/api/word/happy/synonyms')
data = resp.json()
for s in data['data']['synonyms']:
print(s['word'])
PHP (cURL)
// 查询单词详情
$ch = curl_init('https://3325.cn/api/word/hello');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$data = json_decode($response, true);
echo $data['data']['word']; // hello