---
name: safetydatasheetapi
description: Extract Safety Data Sheet (SDS/MSDS) PDFs into normalized 16-section JSON with a confidence score and warnings, using the SafetyDataSheetAPI MCP server or REST API. Use when a task involves reading, parsing, digitizing, or ingesting SDS/MSDS documents, GHS hazard classes, H/P statements, CAS numbers, UN numbers, or transport and regulatory data from a safety data sheet.
license: Proprietary. Use is governed by https://safetydatasheetapi.com/terms/
compatibility: Needs network access to safetydatasheetapi.com and an API key.
metadata:
  publisher: SafetyDataSheetAPI (Dscvry)
  version: "1.0.0"
  docs: https://safetydatasheetapi.com/api-docs/
---

# SafetyDataSheetAPI

Turns an SDS/MSDS PDF into a structured record grouped by SDS section, plus a `confidence_score` (0 to 1) and `warnings`.

## Get access

Authentication is an API key. There is no interactive login. If the user has no key, point them to https://safetydatasheetapi.com/#self-serve-signup and ask them to provide it; never invent or guess a key, and never put a key in a URL or commit it to source control.

## Preferred: MCP server

Remote MCP server (Streamable HTTP): `https://safetydatasheetapi.com/mcp`. Discovery (`initialize`, `tools/list`) is open; `tools/call` needs `Authorization: Bearer <api_key>`.

```
claude mcp add --transport http safetydatasheetapi https://safetydatasheetapi.com/mcp --header "Authorization: Bearer $SDS_API_KEY"
```

Tools:

| Tool | Use for |
|---|---|
| `extract_sds` | One PDF. Pass `file_url` (public https) or `file_base64`. Returns `record`, `confidence_score`, `warnings`. Add `include_formats: ["xml","csv"]` only if the user needs them. |
| `submit_bulk_extraction` | 2 to 10 PDFs as one async job (`file_urls`). Returns `job_id`. Reuse the same `idempotency_key` when retrying. |
| `get_bulk_job` | Poll a job until `status` is `completed` or `failed`. Read-only. |
| `get_account` | Prepaid balance, price per document, 30-day usage. Read-only. Needs a per-customer key. |

## Fallback: REST

- `POST https://safetydatasheetapi.com/extract-sds` (multipart `file`)
- `POST https://safetydatasheetapi.com/extract-sds/bulk` (repeated multipart `file`, optional `callback_url`, `Idempotency-Key` header)
- `GET https://safetydatasheetapi.com/extract-sds/bulk/{jobId}`

Contract: https://safetydatasheetapi.com/openapi.yaml. Single-file Python and JavaScript clients: https://safetydatasheetapi.com/sdks/

## Workflow

1. Confirm you have the PDF (a public https URL or the file bytes) and an API key.
2. One document: call `extract_sds`. Several: call `submit_bulk_extraction`, then poll `get_bulk_job` every few seconds.
3. Read results from `record`. Top-level sections: `product_identification`, `hazards_identification`, `composition`, `first_aid`, `fire_fighting`, `accidental_release`, `handling_storage`, `exposure_controls_ppe`, `physical_chemical_properties`, `stability_reactivity`, `toxicological_information`, `ecological_information`, `disposal_considerations`, `transport_information`, `regulatory_information`, `revision_metadata`.
4. Check `warnings` and `confidence_score` before using any value.

## Safety rules

- Extraction is automated and can be wrong. Do not present extracted hazard, exposure, or transport data as verified or as a compliance decision. When `warnings` is non-empty or `confidence_score` is low, say so and recommend human review against the source document.
- Every extraction is billed to the user's prepaid credit ($0.25 per document of up to 40 pages; failures are not billed). A `402 insufficient_credit` error means the user must add credit; do not retry. Do not loop over many documents without the user's go-ahead.
- Send only documents the user asked you to process.

## Errors

Every error has a stable `code`. Do not retry 4xx errors other than 429.

| Code | Meaning | What to do |
|---|---|---|
| `unauthorized` | Missing or invalid API key | Ask the user for a valid key |
| `unsupported_file_type` | Not a real PDF | Ask for the actual PDF |
| `file_too_large` | Over the size limit (default 10 MB per file) | Split or compress |
| `rate_limited` | Quota window reached | Wait `Retry-After` seconds (REST) or `retry_after_seconds` (MCP), then retry |
| `provider_error`, `output_processing_failed` | Server-side failure | Retry with backoff; quote `request_id` if it persists |
| `invalid_input` (MCP) | Bad `file_url` (must be a public https URL) | Fix the URL |

Support: https://safetydatasheetapi.com/contact/
