# getCompoundAnnotations

**Identifier:** `pubchem_getCompoundAnnotations`

**Provider:** [PubChem](https://kirha.com/providers/pubchem.md)

Read one annotation section of a PubChem compound record (PUG-View), flattened to text per subsection with source names: ghsSafety (GHS pictograms, signal word, hazard statements), toxicity (LD50, carcinogenicity, interactions), pharmacology (mechanism of action, MeSH/FDA pharmacological classes, ATC, ADME, half-life), drugInfo (indications, approvals, drug classes, warnings, max phase). Sections are absent for compounds without such data. Long sections are capped per subsection.

## Run it with the CLI

```bash
kirha tools run pubchem_getCompoundAnnotations \
  --input '{
    "cid": 1,
    "section": "ghsSafety"
  }'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "pubchem_getCompoundAnnotations",
  "input": {
    "cid": 1,
    "section": "ghsSafety"
  }
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "cid": {
      "description": "PubChem CID (from findCompound)",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991,
      "type": "integer"
    },
    "section": {
      "enum": [
        "ghsSafety",
        "toxicity",
        "pharmacology",
        "drugInfo"
      ],
      "type": "string"
    }
  },
  "required": [
    "cid",
    "section"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "cid": {
      "type": "number"
    },
    "context": {
      "type": "string"
    },
    "subsections": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "heading": {
            "type": "string"
          },
          "sources": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "values": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "heading",
          "values"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "title": {
      "type": "string"
    }
  },
  "required": [
    "context",
    "cid",
    "subsections"
  ],
  "type": "object"
}
```

## Related tools

Other PubChem tools that this tool refers to, or that refer to it.

- [`findCompound`](https://kirha.com/providers/pubchem/findCompound.md)

-----

[All PubChem tools](https://kirha.com/providers/pubchem.md) · [< Back to tools list](https://kirha.com/tools.md)