Duaer

入门

在 Duaer 里检索化合物和药物

在 Duaer 里用 Duaer Data 检索化合物和药物。一次成功查询 1 额度;匹配不到的名称不扣。本页含完整英文调用技能。

能拿到什么

Duaer 数据里的「化合物和药物」按公开化合物库检索。一次成功查询 1 额度;名称匹配不到不扣。

从 Duaer 数据分类 选「化合物和药物」。

在画布里检索

  1. 打开节点创建器,点「Duaer 数据」,再选「化合物和药物」。
  2. 只填一种标识:Name、CID、Formula、SMILES 或 InChIKey(不要混填多种)。
  3. Limit 默认 10,最大 20(按名称时最多返回这么多条)。点执行此步骤。

成功扣 1 额度。结果含 cid、formula、weight、smiles、inchiKey 等物化字段。正式运行交付进 数据池。

用 API 调用

  • GET https://api.duaer.com/v1/data/compounds?...
  • Authorization: Bearer <Duaer key>
  • 只传一个标识:name、cid、formula、smiles 或 inchikey。

密钥见 Duaer 公开 API 的身份验证。下方是完整英文调用技能。

调用技能(英文)

调用这项数据的技能。

---
name: duaer-compounds
description: >-
  Duaer compounds. PubChem compounds and drugs by name, CID, formula, SMILES, or InChIKey, with weight, structure, and drug-likeness properties.
  One successful search uses 1 Duaer credit.
---

# Duaer compounds

Duaer compounds looks up PubChem compounds by one identifier and returns structure and computed properties.

## When to use

- Get the formula, weight, SMILES, and InChIKey of a drug by name.
- Check drug-likeness properties such as XLogP, TPSA, and hydrogen bond counts.
- Resolve an InChIKey or SMILES to a PubChem CID.

## When not to use

- Bioactivity against targets. Use https://skills.duaer.com/activities.md.
- Drug labels and indications. Use https://skills.duaer.com/drug-labels.md.
- Ids for one compound in other databases. Use https://skills.duaer.com/crossrefs.md.

## Call

`GET https://api.duaer.com/v1/data/compounds?name=aspirin&limit=10`

Header: `Authorization: Bearer <Duaer key>`

Use an account key or a model API key.

Get a Duaer key: https://skills.duaer.com/keys.md

## Parameters

Provide exactly one of `name`, `cid`, `formula`, `smiles`, or `inchikey`.

- `name` — Compound or drug name, such as `aspirin`. A name can match several compounds, up to `limit`.
- `cid` — PubChem compound id, such as `2244`.
- `formula` — Molecular formula, such as `C9H8O4`. Can match several compounds, up to `limit`.
- `smiles` — SMILES string. URL-encode it.
- `inchikey` — InChIKey, such as `BSYNRYMUTXBXSQ-UHFFFAOYSA-N`.
- `limit` — Optional. Rows to return, from 1 to 20. Default 10.

## Examples

- `GET https://api.duaer.com/v1/data/compounds?name=aspirin` — aspirin and close name matches.
- `GET https://api.duaer.com/v1/data/compounds?inchikey=BSYNRYMUTXBXSQ-UHFFFAOYSA-N` — one compound by InChIKey.
- `GET https://api.duaer.com/v1/data/compounds?formula=C9H8O4&limit=5` — compounds with one formula.

## Result

The response is `{ "items": [...] }`. Each item has `source` (`PubChem`), `title`, `url`, and `summary`, plus:

- `cid` — PubChem compound id.
- `formula`, `weight` — molecular formula and weight.
- `iupacName`, `smiles`, `inchi`, `inchiKey` — names and structure strings.
- `xlogp`, `tpsa` — computed lipophilicity and polar surface area.
- `hbondDonors`, `hbondAcceptors`, `rotatableBonds` — counts used in drug-likeness rules.
- `complexity`, `charge` — structural complexity and formal charge.

Reuse a compound name as `molecule` when searching activities: https://skills.duaer.com/activities.md.

Fields without a value are empty strings.

## Credits

A successful search uses 1 credit, even when it finds nothing.
A `name` that PubChem does not know, or an identifier PubChem answers with not found, returns no items and uses 0.
Wrong input, a missing identifier, or more than one identifier returns 400 with a message and uses 0.
A failed upstream search returns 503 and uses 0.
No remaining credits returns 402 and does not search.
A missing key returns 401.

## Related

- https://skills.duaer.com/trials.md — Duaer clinical trials
- https://skills.duaer.com/structures.md — Duaer structures
- https://skills.duaer.com/proteins.md — Duaer proteins
- https://skills.duaer.com/activities.md — Duaer activities
- https://skills.duaer.com/indications.md — Duaer indications
- https://skills.duaer.com/mechanisms.md — Duaer mechanisms
- https://skills.duaer.com/assays.md — Duaer assays
- https://skills.duaer.com/patents.md — Duaer patents
- https://skills.duaer.com/drug-gene.md — Duaer drug–gene
- https://skills.duaer.com/reactions.md — Duaer reactions
- https://skills.duaer.com/metabolites.md — Duaer metabolites
- https://skills.duaer.com/drug-labels.md — Duaer drug labels
- https://skills.duaer.com/adverse-events.md — Duaer adverse events

常见问题

化合物可以同时填名称和 CID 吗?

不要。每次只传一种标识:name、cid、formula、smiles 或 inchikey。

同组