Datamuse
词语查找查询引擎
- 认证方式
- No auth
- HTTPS
- Yes
- CORS
- Unknown
- 分类
- 开源项目
- 文档 / URL
- https://www.datamuse.com/api/
简介
Datamuse 是词汇查找引擎:查找押韵、同义、谐音或符合拼写模式的词——带频率评分和词性标签。免费、免密钥,是写作、文字游戏和边输入边搜索功能的利器。
快速开始
近义词(实测可用):
curl "https://api.datamuse.com/words?ml=happy&max=3"
[
{"word": "pleased", "score": 40004395, "tags": ["syn", "adj"]},
{"word": "blissful", "score": 40004156, "tags": ["syn", "adj"]},
{"word": "joyful", "score": 39978682, "tags": ["syn", "adj"]}
]
押韵:
curl "https://api.datamuse.com/words?rel_rhy=cat"
谐音:
curl "https://api.datamuse.com/words?sl=bananna"
拼写模式(填字游戏帮手):
curl "https://api.datamuse.com/words?sp=m?n??"
自动补全建议:
curl "https://api.datamuse.com/sug?s=interes"
关键参数
| 参数 | 含义 |
|---|---|
ml |
近义词 |
rel_rhy / rel_nry |
押韵 / 近似押韵 |
sl |
谐音 |
sp |
拼写模式(? = 任意字母,* = 任意串) |
sug |
前缀建议(自动补全) |
max |
结果上限 |
认证方式
无需认证——免密钥。
速率限制与注意事项
- 免费;文档要求单 IP 不超过约 1 次请求/秒(允许突发)。
- 结果含
score(基于频率)和tags(词性、syn、n……)——可用于排序和筛选。 sug端点非常适合搜索框的输入联想。
常见问题
Datamuse 免费吗? 是的——免费且免密钥(每 IP 约 1 次/秒)。
可以用于自动补全吗?
可以——/sug 端点返回前缀建议。
结果包含词性吗?
包含——tags 数组含 adj、n、v 等词性标签。
开源项目 分类更多
| API | Auth | HTTPS | CORS | |
|---|---|---|---|---|
| Countly Countly web analytics | No auth | No | Unknown | ↗ |
| Creative Commons Catalog Search among openly licensed and public domain works | OAuth | Yes | Yes | ↗ |
| Drupal.org Drupal.org | No auth | Yes | Unknown | ↗ |
| Evil Insult Generator Evil Insults | No auth | Yes | Yes | ↗ |
| GitHub Contribution Chart Generator Create an image of your GitHub contributions | No auth | Yes | Yes | ↗ |