Forge Tools unichem

unichem read

scidex.forge.unichem

Resolve a compound identifier across 40+ chemical databases using EBI UniChem (unichem.ebi.ac.uk). Given a compound ID and its source database (InChIKey, ChEMBL ID, ChEBI ID, PubChem CID, DrugBank ID, etc.) returns cross-reference entries — source name, compound ID in that database, and URL — for every linked database in the UniChem index. Use target_sources to restrict to specific databases (e.g. ["chembl", "pubchem"]). API: GET https://www.ebi.ac.uk/unichem/api/v1/compounds — free, no auth required.

HTTP: POST /api/scidex/forge/unichem

Invoke

Calls scidex.tool.invoke on the substrate with this tool name. Edit the JSON below — it must match the input schema. The substrate runs the tool, records the call in substrate_tool_calls, and returns a structured envelope.

Sign in to invoke this tool. Schema and curl snippet are visible to anyone.

Schemas

Input schema
{
  "additionalProperties": false,
  "description": "Input schema for ``scidex.forge.unichem``.",
  "properties": {
    "compound_id": {
      "description": "Compound identifier to resolve.  Interpretation depends on ``source``: an InChIKey (``BSYNRYMUTXBXSQ-UHFFFAOYSA-N``), a ChEMBL ID (``CHEMBL25``), a PubChem CID (``2244``), a ChEBI ID (``CHEBI:15422``), etc.",
      "maxLength": 500,
      "title": "Compound Id",
      "type": "string"
    },
    "source": {
      "default": "inchikey",
      "description": "Source database that the ``compound_id`` belongs to.  Common values: ``inchikey``, ``chembl``, ``pubchem``, ``chebi``, ``drugbank``, ``zinc``, ``bindingdb``, ``hmdb``, ``pdb``, ``kegg_ligand``, ``gtopdb``.  Defaults to ``inchikey``.",
      "maxLength": 100,
      "title": "Source",
      "type": "string"
    },
    "target_sources": {
      "description": "Optional list of source database names to include in the output.  When empty (default) all cross-references are returned.  Example: ``[\"chembl\", \"pubchem\"]`` to restrict to those two databases.",
      "items": {
        "type": "string"
      },
      "title": "Target Sources",
      "type": "array"
    }
  },
  "required": [
    "compound_id"
  ],
  "title": "ForgeUnichemIn",
  "type": "object"
}
Output schema
{
  "$defs": {
    "XRef": {
      "description": "One cross-reference entry returned by UniChem.",
      "properties": {
        "source_name": {
          "description": "Short name of the source database (e.g. ``chembl``, ``pubchem``, ``chebi``).",
          "title": "Source Name",
          "type": "string"
        },
        "compound_id": {
          "description": "Compound identifier in the source database (e.g. ``CHEMBL25``, ``2244``).",
          "title": "Compound Id",
          "type": "string"
        },
        "url": {
          "description": "Direct URL to this compound record in the source database.",
          "title": "Url",
          "type": "string"
        }
      },
      "required": [
        "source_name",
        "compound_id",
        "url"
      ],
      "title": "XRef",
      "type": "object"
    }
  },
  "description": "Response shape for ``scidex.forge.unichem``.",
  "properties": {
    "compound_id": {
      "description": "The input compound identifier, echoed back.",
      "title": "Compound Id",
      "type": "string"
    },
    "source": {
      "description": "The input source database name, echoed back.",
      "title": "Source",
      "type": "string"
    },
    "cross_refs": {
      "description": "Cross-reference entries from UniChem across all linked databases.",
      "items": {
        "$ref": "#/$defs/XRef"
      },
      "title": "Cross Refs",
      "type": "array"
    },
    "not_found": {
      "default": false,
      "description": "True when UniChem returned no compounds matching the query.",
      "title": "Not Found",
      "type": "boolean"
    }
  },
  "required": [
    "compound_id",
    "source"
  ],
  "title": "ForgeUnichemOut",
  "type": "object"
}

curl snippet

Replace $SCIDEX_JWT with a valid bearer token. Read verbs are usually accessible without auth in dev; production requires a JWT.

curl -sS -X POST '/api/scidex/forge/unichem' \
  -H 'authorization: Bearer $SCIDEX_JWT' \
  -H 'content-type: application/json' \
  -d '{
  "compound_id": ""
}'

Discussion

Posting anonymously. Sign in for attribution.

No comments yet — be the first.