> ## Documentation Index
> Fetch the complete documentation index at: https://docs.oneshotagent.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Compound Hazards

> Give the GHS hazard classification of a chemical compound by its compound identifier (CID), name or CAS number.

Give the GHS hazard classification of a chemical compound by its compound identifier (CID) or by a name: a common, trade or systematic name, or a CAS registry number such as 50-00-0. Returns one classification per classifying source, in the source order: the GHS pictograms with their codes (GHS05), the signal word, the hazard statements with their codes (H314) and the precautionary statement codes. Only two classifying sources are returned: the EU harmonised classification (Regulation (EC) No 1272/2008) and the Hazardous Substances Data Bank of the US National Library of Medicine; every other source is left out, so a compound classified only by others returns an empty list. `classified` is true when a returned classification has a hazard statement. A name matching several compounds uses the first and lists them all in `matched_cids`. `compound` is null when the name or CID matches nothing, or the source has no classification for the compound. Give exactly one of `cid` and `name`. Toxicity values, exposure limits, the full safety data sheet, and any synthesis or preparation data are not returned.

## Authentication

Requires x402 payment in the `payment-signature` header.

## Request Body

<ParamField body="cid" type="integer">
  The compound identifier (CID), for example 712. From 1 to 999999999.
</ParamField>

<ParamField body="name" type="string">
  A common, trade or systematic name, or a CAS registry number such as 50-00-0. 2 to 200 characters.
</ParamField>

<Snippet file="audit-context-params.mdx" />

## Response (200 OK)

Top-level envelope: `success` (boolean) and `data` (object). All fields below are nested under `data`.

<ResponseField name="data.request_id" type="string">
  Durable job ID for audit and lookup
</ResponseField>

<ResponseField name="data.status" type="string">
  Job status: `completed`
</ResponseField>

<ResponseField name="data.tool" type="string">
  Always `compound_hazards`
</ResponseField>

<ResponseField name="data.result" type="object">
  The answer, described under Result below
</ResponseField>

<ResponseField name="data.evidence" type="object">
  Where the answer came from and when
</ResponseField>

<ResponseField name="data.evidence.source" type="string">
  The public body the data comes from. Always `US National Center for Biotechnology Information (PubChem)`.
</ResponseField>

<ResponseField name="data.evidence.source_kind" type="string">
  `public` when the data comes from a public body, `commercial` otherwise
</ResponseField>

<ResponseField name="data.evidence.retrieved_at" type="string">
  When the lookup was made, as an ISO 8601 UTC time
</ResponseField>

<ResponseField name="data.evidence.as_of" type="string">
  When the source says the fact was last updated, or `null` when the source gives no date
</ResponseField>

## Result

Nested under `data.result`.

<ResponseField name="data.result.matched_cids" type="integer[]">
  Every CID the name matched, in source order; the CID asked for when given one.
</ResponseField>

<ResponseField name="data.result.compound" type="object">
  The compound classified, or null when nothing matched or the source has no classification for it.
</ResponseField>

<ResponseField name="data.result.compound.cid" type="integer">
  The compound identifier (CID) of the classifications.
</ResponseField>

<ResponseField name="data.result.compound.title" type="string">
  The compound's name at the source. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.compound.page_url" type="string">
  The compound page at the source.
</ResponseField>

<ResponseField name="data.result.classifications" type="object[]">
  One classification per returned classifying source, in the source order.
</ResponseField>

<ResponseField name="data.result.classifications[].source" type="string">
  The classifying source.
</ResponseField>

<ResponseField name="data.result.classifications[].source_record" type="string">
  The classifying source's name for its record of the substance. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.classifications[].source_url" type="string">
  The record at the classifying source. `null` when the source gives no value.
</ResponseField>

<ResponseField name="data.result.classifications[].pictograms" type="string[]">
  The GHS pictogram names, for example Corrosive.
</ResponseField>

<ResponseField name="data.result.classifications[].pictogram_codes" type="string[]">
  The GHS pictogram codes, for example GHS05.
</ResponseField>

<ResponseField name="data.result.classifications[].signal" type="string">
  The GHS signal word, or null when the source gives none.
</ResponseField>

<ResponseField name="data.result.classifications[].hazard_statements" type="object[]">
  The GHS hazard statements, in the source order.
</ResponseField>

<ResponseField name="data.result.classifications[].hazard_statements[].code" type="string">
  The hazard statement code, for example H314.
</ResponseField>

<ResponseField name="data.result.classifications[].hazard_statements[].text" type="string">
  The statement as the source words it, with its hazard class in brackets.
</ResponseField>

<ResponseField name="data.result.classifications[].hazard_statements[].share_of_reports" type="number">
  The share of the source's reports that give this statement, from 0 to 1; null when the source gives none.
</ResponseField>

<ResponseField name="data.result.classifications[].precautionary_codes" type="string[]">
  The precautionary statement codes, for example P280 or P301+P330+P331.
</ResponseField>

<ResponseField name="data.result.classifications[].not_classified" type="boolean">
  True when the source reports the substance as not classified.
</ResponseField>

<ResponseField name="data.result.classified" type="boolean">
  True when at least one returned classification has a hazard statement.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://win.oneshotagent.com/v1/tools/lookup/compound-hazards \
    -H "Content-Type: application/json" \
    -H "payment-signature: <base64 x402 payment>" \
    -d '{
      "name": "50-00-0"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://win.oneshotagent.com/v1/tools/lookup/compound-hazards", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "payment-signature": paymentProof,
    },
    body: JSON.stringify({
      "name": "50-00-0"
    }),
  });
  ```

  ```typescript SDK theme={null}
  const result = await agent.tool('lookup/compound-hazards', {
    name: '50-00-0'
  });
  console.log(result.data.result);
  console.log(result.data.evidence);
  ```
</RequestExample>

<ResponseExample>
  ```json Response (200) theme={null}
  {
    "success": true,
    "data": {
      "request_id": "uuid",
      "receipt_id": "rcpt_...",
      "status": "completed",
      "tool": "compound_hazards",
      "result": {
        "matched_cids": [
          712
        ],
        "compound": {
          "cid": 712,
          "title": "Formaldehyde",
          "page_url": "https://pubchem.ncbi.nlm.nih.gov/compound/712"
        },
        "classifications": [
          {
            "source": "Regulation (EC) No 1272/2008 of the European Parliament and of the Council",
            "source_record": "formaldehyde …%",
            "source_url": "https://eur-lex.europa.eu/eli/reg/2008/1272/oj",
            "pictograms": [
              "Corrosive",
              "Acute Toxic",
              "Health Hazard"
            ],
            "pictogram_codes": [
              "GHS05",
              "GHS06",
              "GHS08"
            ],
            "signal": "Danger",
            "hazard_statements": [
              {
                "code": "H302",
                "text": "Harmful if swallowed [Warning Acute toxicity, oral]",
                "share_of_reports": null
              },
              {
                "code": "H314",
                "text": "Causes severe skin burns and eye damage [Danger Skin corrosion/irritation]",
                "share_of_reports": null
              },
              {
                "code": "H350",
                "text": "May cause cancer [Danger Carcinogenicity]",
                "share_of_reports": null
              }
            ],
            "precautionary_codes": [
              "P203",
              "P260",
              "P280",
              "P301+P330+P331",
              "P501"
            ],
            "not_classified": false
          }
        ],
        "classified": true
      },
      "evidence": {
        "source": "US National Center for Biotechnology Information (PubChem)",
        "source_kind": "public",
        "retrieved_at": "2026-10-19T12:00:00.000Z",
        "calls": [
          {
            "retrieved_at": "2026-10-19T12:00:00.000Z"
          },
          {
            "retrieved_at": "2026-10-19T12:00:00.000Z"
          }
        ],
        "as_of": null
      }
    }
  }
  ```
</ResponseExample>

<Info>See [Pricing](/pricing) for this tool's price. A wallet (x402) call receives it in the 402 quote before anything is charged; a call paid from prepaid credits is charged when the API accepts the request and answers `200`.</Info>

## Notes

* Results return inline. The finished job stays available at `/v1/requests/{request_id}`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.