Reference
SafetyDataSheetAPI Documentation
Integration-first API reference for extracting structured SDS data with enterprise-grade controls.
https://api.safetydatasheetapi.com/v1. Built for secure,
high-volume SDS ingestion pipelines.
Output formats supported: JSON, XML, CSV.
Machine-readable API contract: /openapi.yaml
Authentication
All endpoints require a bearer token in the Authorization header. Keys are scoped by
environment, usage tier, and deployment model.
Authorization: Bearer <api_key>
Primary Endpoint
| Method | Path | Purpose |
|---|---|---|
POST |
/extract-sds |
Extract structured SDS data from a single document. |
POST |
/api/sample-upload |
Website sample upload endpoint with lead capture, Turnstile, and Gemini REST extraction. |
POST |
/api/contact |
Contact endpoint for enterprise implementation inquiries. |
Request Fields
| Field | Type | Required | Notes |
|---|---|---|---|
file |
binary | Yes | PDF SDS/MSDS document. |
language_hint |
string | No | Optional hint such as en, de, fr. |
schema_version |
string | No | Optional output schema contract version. |
full_name, work_email, company |
string | Sample endpoint: Yes | Required for /api/sample-upload lead capture. |
cf-turnstile-response |
string | When configured | Turnstile verification token for anti-bot protection on public forms. |
Output formats are generated together in every successful response: JSON, XML, CSV.
cURL Example
curl -X POST "https://api.safetydatasheetapi.com/v1/extract-sds" \
-H "Authorization: Bearer <api_key>" \
-F "[email protected]" \
-F "language_hint=en" \
-F "schema_version=2026-01"
For the website trial endpoint use https://safetydatasheetapi.com/api/sample-upload.
Response Example
{
"request_id": "req_8hy2n3",
"output_formats": ["JSON", "XML", "CSV"],
"outputs": {
"json": {
"product_name": "Acetone",
"ghs_classification": ["Flammable Liquid - Category 2"],
"h_statements": ["H225 Highly flammable liquid and vapour"],
"un_number": "UN1090",
"ppe": ["Protective gloves", "Eye protection"],
"revision_date": "2024-01-15"
},
"xml": "<sds_extraction>...</sds_extraction>",
"csv": "field,value"
},
"confidence_score": 0.97,
"warnings": [],
"processing_ms": 2410
}
Sample Upload Endpoint (Website)
The homepage Upload a Sample SDS form submits to POST /api/sample-upload.
This endpoint is designed for controlled public trials with identity capture, Turnstile bot defense, and per-IP rate-limit policies.
Contact Endpoint
POST /api/contact stores enterprise inquiry submissions for follow-up and implementation planning.
It uses the same anti-bot and rate-limit controls as public upload workflows.
Bulk Endpoint
Use bulk ingestion for queued, high-volume SDS workflows with asynchronous processing.
| Method | Path | Purpose |
|---|---|---|
POST |
/extract-sds/bulk |
Submit multiple SDS files and receive asynchronous results. |
Webhook Support
Receive extraction completion events and warning summaries asynchronously for event-driven pipelines.
{
"event": "extraction.completed",
"request_id": "req_8hy2n3",
"status": "success",
"confidence_score": 0.97,
"warnings": []
}
Private Analytics Endpoint
Internal traffic analytics are available via GET /api/admin/analytics. This endpoint is
non-public and requires ANALYTICS_ADMIN_KEY (and should be protected by Cloudflare Access).
Error Handling
| Status | Code | Meaning |
|---|---|---|
400 |
invalid_document |
File is not parseable or unsupported. |
401 |
unauthorized |
Missing or invalid API token. |
422 |
low_text_quality |
Extraction incomplete due to low OCR confidence. |
429 |
rate_limited |
Plan throughput exceeded. |
Need an Implementation Plan?
For schema mapping, deployment architecture, data residency, and rollout timelines: Request Implementation Plan.