Documentation

API Documentation

Two APIs. One platform. One authentication.

Base URL
https://api.legaldata.cleolabs.co
Version
v2 (OpenAPI 3.1)
Format
JSON · UTF-8

Quick start

1. Get your API key

Book 20 minutes with the team to activate your account. You receive a key of the form ld_live_… ready to use.

2. Make your first call

All endpoints use an Authorization: Bearer header. No SDK required to get started.

3. Build something

Product compliance, regulatory monitoring, semantic search: everything is exposed under the same base URL.

Authentication

Every request must include an Authorization header with your API key. Keys are rotatable from your dashboard at any time, and revocable instantly.

curl
curl https://api.legaldata.cleolabs.co/v2/coverage \
  -H "Authorization: Bearer ld_live_..."

Don't have a key yet? Request access in 20 minutes. Get API key

API

Product Compliance API

Check whether a product (cosmetics, electronics, toys, food, etc.) is compliant in any country. HS classification, customs duties, regulatory obligations, dual-use screening and landed-cost computation — in a single platform.

POST/v2/compliance/check

Composite compliance check

Description

The most comprehensive endpoint: from a product description and destination country, returns HS classification, duties/VAT/excise, regulatory obligations, dual-use screening, suggested alternatives and estimated landed cost. Costs 5 quota units.

Parameters
product.description
stringin: bodyrequired
Free-text description, 2 to 2,000 characters.
product.lang
stringin: bodyoptional
ISO 639-1 code, e.g. "en", "fr".
product.intended_use
stringin: bodyoptional
Use context (consumer, industrial, medical…).
destination_country
stringin: bodyrequired
ISO-2 code of destination country.
origin_country
stringin: bodyoptional
ISO-2 code of origin country.
client_type
stringin: bodyoptional
One of: government, private, defense, oil_gas, mining, aviation, retail, healthcare, unknown.
options.include_alternatives
booleanin: bodyoptional
Include alternative HS codes.
options.include_dual_use_check
booleanin: bodyoptional
Include dual-use screening.
options.include_parallel_import
booleanin: bodyoptional
Include EAEU parallel-import rules.
Request
curl -X POST https://api.legaldata.cleolabs.co/v2/compliance/check \
  -H "Authorization: Bearer ld_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "product": {"description": "sunscreen SPF50"},
    "destination_country": "FR",
    "client_type": "retail"
  }'
Response Example
JSON
{
  "data": {
    "hs_code": "330420",
    "duties": { "duty_pct": 0, "vat_pct": 20, "excise": null },
    "obligations": [
      { "code": "EU-COSMETICS-1223-2009", "title": "Cosmetic Products Regulation" }
    ],
    "dual_use": { "controlled": false },
    "alternatives": [{ "code": "330499", "match": 0.78 }]
  },
  "coverage_status": "covered",
  "next_check_at": "2026-06-26T00:00:00Z",
  "advisory_disclaimer": "Cleo provides advisory data; final compliance is the importer's responsibility."
}
GET/v2/customs/duties

Tariff, VAT and excise lookup

Description

Returns customs duty, VAT and excise rates applicable to a given HS code for a country.

Parameters
code
stringin: queryrequired
HS code (4, 6 or 8 digits).
country
stringin: queryrequired
Country ISO-2 code.
system
stringin: queryoptional
One of: hs6, hs8, cn8, tn_ved, hts.
Request
curl "https://api.legaldata.cleolabs.co/v2/customs/duties?code=330420&country=FR" \
  -H "Authorization: Bearer ld_live_..."
GET/v2/customs/obligations

Customs obligations

Description

Lists regulatory obligations attached to an HS code in a country: licenses, certifications, mandatory markings.

Parameters
hs
stringin: queryrequired
country
stringin: queryrequired
Request
curl "https://api.legaldata.cleolabs.co/v2/customs/obligations?hs=850440&country=DE" \
  -H "Authorization: Bearer ld_live_..."
GET/v2/customs/lookup

HS classification from description

Description

Suggests one or more HS codes from a natural-language product description.

Parameters
description
stringin: queryrequired
country
stringin: queryoptional
limit
integerin: queryoptional
Request
curl "https://api.legaldata.cleolabs.co/v2/customs/lookup?description=lithium+ion+battery&country=US&limit=5" \
  -H "Authorization: Bearer ld_live_..."
GET/v2/customs/alternatives

Alternative HS codes

Description

Suggests plausible alternative classifications for a given HS code.

Parameters
code
stringin: queryrequired
Request
curl "https://api.legaldata.cleolabs.co/v2/customs/alternatives?code=330420" \
  -H "Authorization: Bearer ld_live_..."
GET/v2/customs/dual-use

Dual-use export-control screening

Description

Indicates whether a product (by description or code) falls under an export-control regime for a given destination (EU Reg. 2021/821, US EAR, etc.).

Parameters
description
stringin: queryoptional
code
stringin: queryoptional
destination
stringin: queryrequired
Request
curl "https://api.legaldata.cleolabs.co/v2/customs/dual-use?description=encryption+module&destination=CN" \
  -H "Authorization: Bearer ld_live_..."
POST/v2/customs/landed-cost

Landed-cost calculator

Description

Computes the landed cost (CIF + duties + VAT + fees) from an HS code, origin country, destination country and FOB price in USD.

Parameters
code
stringin: bodyrequired
origin
stringin: bodyrequired
ISO-2.
destination
stringin: bodyrequired
ISO-2.
fob_usd
numberin: bodyrequired
Request
curl -X POST https://api.legaldata.cleolabs.co/v2/customs/landed-cost \
  -H "Authorization: Bearer ld_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "code": "850440",
    "origin": "CN",
    "destination": "FR",
    "fob_usd": 12500
  }'
POST/v2/customs/reverse-classify

HS code to product description

Description

Generates a defensible product description from an HS code — useful to draft a consistent customs declaration.

Parameters
code
stringin: bodyrequired
HS code (4, 6 or 8 digits).
Request
curl -X POST https://api.legaldata.cleolabs.co/v2/customs/reverse-classify \
  -H "Authorization: Bearer ld_live_..." \
  -H "Content-Type: application/json" \
  -d '{"code": "330420"}'
GET/v2/standards/gost

GOST / EAEU standards

Description

Looks up GOST / TR EAEU standards applicable to an HS code in a Eurasian Economic Union country.

Parameters
hs
stringin: queryoptional
country
stringin: queryoptional
limit
integerin: queryoptional
Request
curl "https://api.legaldata.cleolabs.co/v2/standards/gost?hs=850440&country=RU" \
  -H "Authorization: Bearer ld_live_..."
GET/v2/eaeu/parallel-import

EAEU parallel-import rules

Description

Indicates whether a certificate (e.g. conformity declaration) issued by an EAEU country is recognised for a given product in other member states.

Parameters
cert_country
stringin: queryrequired
cert_type
stringin: queryrequired
product_code
stringin: queryoptional
Request
curl "https://api.legaldata.cleolabs.co/v2/eaeu/parallel-import?cert_country=KZ&cert_type=tr_cu&product_code=850440" \
  -H "Authorization: Bearer ld_live_..."

Error codes

The API returns standard HTTP codes. All error responses share the same JSON envelope.

CodeDescription
400
Bad request
Invalid or missing parameter. The error envelope includes a did_you_mean field to help debugging.
401
Unauthorized
API key missing, invalid or revoked. Check your Authorization header.
403
Forbidden
Endpoint not included in your plan, or country not covered by your quota.
404
Not found
Document or resource not found. For /v2/documents/{id}, the ID may be stale.
429
Rate limited
Per-minute quota exceeded. The Retry-After header gives the delay (in seconds) before retrying.
5xx
Server error
Error on Cleo's side. Retry with exponential backoff — we monitor and our Enterprise SLA guarantees fast remediation.
Example
JSON
{
  "error": {
    "code": "invalid_country",
    "message": "Unknown country code 'XX'.",
    "suggestion": "Use a 2-letter ISO-3166 alpha-2 code.",
    "docs": "https://api.legaldata.cleolabs.co/docs#errors",
    "did_you_mean": ["FR", "FI", "FJ"]
  }
}

Rate limits

The Pro plan allows 300 requests per minute. The Enterprise plan allows 600 req/min with negotiable volumes. Beyond that, a 429 is returned — retry after the delay shown in the Retry-After header.

Pro
300 req/min

Burst-friendly, sliding minute window.

Enterprise
600 req/min

Custom volumes negotiable, contractual SLA.

SDKs & examples

No proprietary SDK required: the API is standard HTTP/REST. Below are examples in the most common languages.

curl https://api.legaldata.cleolabs.co/v2/search?q=cosmetic+labeling \
  -H "Authorization: Bearer ld_live_..."

Webhooks

Receive signed notifications (HMAC-SHA256) on key events: new regulation, document change, customs duty update. Deliveries are retried 5 times with exponential backoff.

Payload signature

Each delivery includes a header X-Cleo-Signature in the form sha256=<hex>. Compute the HMAC-SHA256 of the raw body with your webhook secret and compare in constant time.

Node.js
import crypto from "node:crypto";

function verify(rawBody, header, secret) {
  const expected = "sha256=" + crypto
    .createHmac("sha256", secret)
    .update(rawBody)
    .digest("hex");
  return crypto.timingSafeEqual(
    Buffer.from(expected),
    Buffer.from(header),
  );
}

Have a question? Let's talk.

Our team helps you validate your use case in 20 minutes.