谱图检索
接口说明
谱图检索接口提供通过谱图数据、谱图类型、溶剂类型及容差参数匹配相关物质部分信息的功能。支持多种溶剂条件,可设置容差范围和峰值匹配规则。
计费方式
按照调用次数收费,调用成功,单次调用收费0.01元。
接口地址
POST https://openapi.molaid.com/v1/spectra/search
请求参数
全局请求参数详见全局请求参数
名称 | 类型 | 必填 | 说明 |
---|---|---|---|
pagination | object | 是 | 分页参数 |
- offset | number(int) | 是 | 偏移量 |
- limit | number(int) | 是 | 获取条数 |
peak_data | [number(float)] | 是 | 谱图数据 |
type | enum | 是 | 谱图类型 |
solvent | enum | 是 | 溶剂类型 |
tolerance | enum | 是 | 容差值 |
peak_match | enum | 是 | 峰值匹配规则 |
返回参数
名称 | 类型 | 说明 |
---|---|---|
total | number(int) | 总数 |
list | [object] | 物质信息 |
- pedia_id | string | 物质ID |
- title | string | 标题 |
- inchikey | string | InChIKey |
- molecular_formula | string | 分子式 |
- molecular_weight | number(float) | 分子量 |
- cas | [string] | CAS号 |
- name_cn | [string] | 中文名称 |
- name_en | [string] | 英文名称 |
请求示例
{
"pagination": {
"offset": 0,
"limit": 10
},
"peak_data": [
172.77,
133.83,
130
],
"type": "peak_type_cnmr",
"tolerance": "peak_tolerance_2",
"peak_match": "peak_match_equal"
}
返回示例
正常返回
{
"code": 200,
"data": {
"total": 3,
"list": [
{
"pedia_id": "OrmHIYA2jN494kyyhfgZalv4eq17Aba5",
"title": "(1S, 2S, 3S)-3-methyl-2-(phenylselanyl)cyclohexyl pentanoate",
"inchikey": "DYJDNPTXWAIUGQ-ZVZYQTTQSA-N",
"molecular_formula": "C<sub>18</sub>H<sub>26</sub>O<sub>2</sub>Se",
"molecular_weight": 354.11,
"cas": [],
"name_cn": [],
"name_en": [
"(1S, 2S, 3S)-3-methyl-2-(phenylselanyl)cyclohexyl pentanoate"
]
},
{
"pedia_id": "fvYH8NMGhI25QkaRIJKDpjrguYRwNh45",
"title": "丙烯酸 | acrylic acid",
"inchikey": "NIXOWILDQLNWCW-UHFFFAOYSA-N",
"molecular_formula": "C<sub>3</sub>H<sub>4</sub>O<sub>2</sub>",
"molecular_weight": 72.0636,
"cas": [
"79-10-7"
],
"name_cn": [
"丙烯酸",
"丙烯酸(HPAA)",
"败脂酸",
"乙烯基甲酸",
"2-丙烯酸",
"败酯酸",
"AA"
],
"name_en": [
"acrylic acid",
"2-propenoic acid",
"prop-2-enoic acid",
"propenoic acid",
"Hydron;prop-2-enoate"
]
}
]
},
"reason": "",
"message": "",
"metadata": {
"request_id": "d8f3c006d858acf3c6d3e05438bfca4c"
}
}
错误返回
{
"code": 422,
"reason": "SPECTRA_CONDITION_ERROR",
"message": "condition error:peak_data empty",
"metadata": {
"request_id": "d8f3c006d858acf3c6d3e05438bfca4c"
}
}
错误码
全局错误码详见错误码
http status | 错误码 | 错误说明 |
---|---|---|
422 | SPECTRA_CONDITION_ERROR | 检索条件错误。请根据错误message判断错误具体原因 |
枚举值
谱图类型
枚举值 | 说明 |
---|---|
peak_type_cnmr | 碳谱 |
溶剂类型
枚举值 | 说明 |
---|---|
solvent_cdcl3 | CDCl3 |
solvent_dmsod6 | DMSO-d6 |
solvent_d2o | D2O |
solvent_methanold | Methanol-d |
solvent_cd3cn | CD3CN |
solvent_cd2cl2 | CD2Cl2 |
solvent_unreported | Unreported |
容差值
枚举值 | 说明 |
---|---|
peak_tolerance_2 | ±2 |
peak_tolerance_1 | ±1 |
peak_tolerance_05 | ±0.5 |
峰值匹配规则
枚举值 | 说明 |
---|---|
peak_match_equal | 精确 |
peak_match_greater | 大于等于 |
注意事项
- 单页最多获取20条物质数据;分页获取最多1000条物质数据。