API Documentation
Everything you need to integrate LandedAPI — authentication, endpoint reference, request shapes, and response examples.
Authentication
All /v1/* endpoints require a Bearer token in the Authorization header. The /health endpoint is public and requires no authentication.
Authorization: Bearer <key> — not x-api-key or any other header format. Requests with an incorrect or missing header receive a 401 response.
Quickstart
Two curl commands to verify connectivity and your first authenticated result.
1 — Health check (no auth required)Endpoints
Returns the current API status and server timestamp. Use this to verify connectivity before making authenticated requests. No API key required.
Full-text search across 29,597 HTS code descriptions. Returns all matching codes ranked by relevance, including their chapter, heading, and indent level for hierarchy navigation.
| Parameter | Type | Required | Description |
|---|---|---|---|
| q | string | required | Search term matched against HTS description text. |
Search 192,305 CBP administrative rulings by summary text. Returns ruling number, associated HTS code, ruling date, and summary. Useful for finding precedent classifications.
| Parameter | Type | Required | Description |
|---|---|---|---|
| q | string | required | Search term matched against ruling summary text. |
AI-powered HTS classification with GRI reasoning. Returns a ranked list of candidate HTS codes, confidence scores, full GRI analysis explaining each classification, and supporting CBP rulings where available.
| Field | Type | Required | Description |
|---|---|---|---|
| description | string | required | Plain-language product description. More detail yields more accurate classifications. |
| country_of_origin | string | optional | Country of manufacture. Used to flag applicable Section 301 or antidumping duties. |
Returns up to four optimization vectors — material composition, country of origin, first-sale valuation, and FTA qualification — with estimated annual savings, feasibility ratings, and CBP ruling citations for each path.
| Field | Type | Required | Description |
|---|---|---|---|
| product_description | string | required | Plain-language description of the product. |
| chapter | number | required | HTS chapter number (e.g. 64 for footwear). |
| material_composition | object | required | Key/value map of material names to percentage by weight. |
| country_of_origin | string | required | Current country of manufacture. |
| annual_import_value | number | required | Annual import value in USD. Used to calculate projected savings. |
| current_hts | string | optional | Known current HTS code. Improves accuracy of duty rate calculations. |
Error Codes
All error responses return JSON with an error field containing a human-readable message.
| Status | Meaning | Common cause |
|---|---|---|
| 200 | OK | Request succeeded. Check data or response body. |
| 401 | Unauthorized | Missing, malformed, or invalid Authorization header. Verify format: Bearer <key>. |
| 400 | Bad Request | Missing required body field or invalid JSON. Check the error message for the specific field. |
| 429 | Rate Limit Exceeded | You have exhausted your tenant's combined credit balance. Purchase a top-up pack or upgrade your tier. |
| 500 | Server Error | Unexpected server-side error. Retry with exponential backoff. Contact support if persistent. |
Rate Limits
Credits are consumed per request: classify = 1 credit, optimize-tariff = 20 credits. Credits reset monthly on your billing date. Top-up packs can be purchased at any time and carry over indefinitely.
| Tier | Monthly credits | Price | When credits run out |
|---|---|---|---|
| Starter | 300 | $99 / month | Requests blocked. Purchase top-up pack or upgrade. |
| Pro | 800 | $250 / month | Soft overage — requests continue up to a defined multiple of the monthly allowance before 429. Purchase a top-up or upgrade to Scale. |
| Scale | 2,000 | $500 / month | Soft overage — requests continue up to a defined multiple of the monthly allowance before 429. Purchase a top-up or contact us for Enterprise. |
| Enterprise | Custom | Custom | Negotiated SLA. Dedicated infrastructure. Contact us. |
429 when the monthly credit balance is exhausted — hard cap. Pro / Scale: soft overage applies — requests continue beyond the monthly allowance up to a defined multiple before returning 429. Enterprise: uncapped by default; limits negotiated per contract. Credits reset monthly on your billing date. Top-up packs are available in the dashboard and never expire. Enterprise customers receive a dedicated API key — email hello@landedapi.dev to discuss.