Skip to content
GOODS ACROSS BORDERS

DEVELOPERS

API documentation

Read-only JSON API over the same data that powers this site. No authentication, no rate limits, no keys. Versioned at /api/v1. Data is regenerated on every deploy; the meta endpoint carries the generation timestamp and commit SHA.

Quick start

CATALOG

curl https://goodsacrossborders.com/api/v1/index.json

SINGLE RULE

curl https://goodsacrossborders.com/api/v1/rules/vape-e-cigarette_thailand_traveling.json

OPENAPI SPEC

curl https://goodsacrossborders.com/api/v1/openapi.json

Endpoints (v1)

GET/api/v1/index.json

Catalog of all endpoints with counts.

GET/api/v1/meta.json

Totals, generation timestamp, commit SHA, licence.

GET/api/v1/openapi.json

OpenAPI 3.1 specification (draft-2020-12 schemas).

GET/api/v1/items.json111 items
GET/api/v1/items/{slug}.json

All items with category, risk level, HS codes, aliases.

GET/api/v1/countries.json85 items
GET/api/v1/countries/{slug}.json

Country customs profiles — allowances, de minimis, VAT, restricted / prohibited categories.

GET/api/v1/rules.json5,339 items
GET/api/v1/rules/{id}.json

Item × country × purpose rule combinations. Rule ID = `${itemSlug}_${countrySlug}_${purpose}`.

GET/api/v1/carriers.json28 items
GET/api/v1/carriers/{slug}.json

International parcel carriers with prohibited / restricted lists.

GET/api/v1/medications.json33 items
GET/api/v1/medications/{slug}.json

Medications with per-country travel rules.

GET/api/v1/incoterms.json11 items
GET/api/v1/incoterms/{slug}.json

Incoterms 2020.

GET/api/v1/hs-chapters.json98 items
GET/api/v1/hs-chapters/{chapter}.json

Harmonized System chapter metadata.

GET/api/v1/guides.json37 items
GET/api/v1/guides/{slug}.json

Long-form explainer metadata. Body lives at the page URL.

GET/api/v1/airports.json78 items
GET/api/v1/airports/{iata}.json

Airport customs profiles (IATA-keyed, lower-cased).

GET/api/v1/airlines.json49 items
GET/api/v1/airlines/{slug}.json

Airline cabin and baggage policies.

GET/api/v1/scenarios.json30 items
GET/api/v1/scenarios/{slug}.json

Procedural cross-border scenarios (HowTo).

GET/api/v1/duty-rates.json3,553 items

Duty rate entries per trade lane × HS chapter.

GET/api/v1/route-pairs.json8 items

Country-pair metadata including FTA status.

GET/api/v1/changelog.json327 items

Curated site-data changelog entries (newest-first).

TypeScript SDK

A tiny, dependency-free client for the API. Source lives in packages/sdk/ in the repo; publish on npm is pending the user-space release pass.

import { createClient } from "@goodsacrossborders/sdk";

const gab = createClient();
const rule = await gab.getRule("vape-e-cigarette", "thailand", "traveling");
console.log(rule.status); // 'prohibited'

const countries = await gab.listCountries();
console.log(countries.length);

Embed widget

Embed a compact rule card on your site with a single <script> tag. See a live demo →

<div data-gab-rule="vape-e-cigarette_thailand_traveling"></div>
<script async src="https://goodsacrossborders.com/embed/rule.js"></script>

By use case

Eight worked examples (TS + Python + curl) live on /developers/examples:

  • Fetch a country profile.
  • Look up a single rule (item × country × purpose).
  • Filter rules client-side.
  • Sync rule changes nightly (changelog).
  • Build a duty-rate lookup.
  • Power a customs-warning widget at checkout.
  • List trade lanes with an active FTA.
  • Drop into an LLM tool-use schema (function calling).

Rate limits

No rate limits. The API is a set of static JSON files served from a CDN. Standard HTTP caching applies. Mirror the files locally for offline use.

Caching

  • Every JSON file under /api/v1/ is static — same URL returns the same bytes between deploys.
  • The CDN sets Cache-Control to a moderate TTL; honour it.
  • Use If-Modified-Since / ETag for conditional refresh — most CDNs respond 304 Not Modified when unchanged.
  • For SDK consumers: listRules() is large (5,000+ entries); fetch once per build cycle and cache in your own layer.
  • /developers/changelog is the canonical signal that the dataset has moved.

Licence & attribution

All data is licensed CC-BY 4.0. When republishing or integrating, attribute as “Goods Across Borders — goodsacrossborders.com”. Commercial use is permitted within that attribution. Honest reproduction of the data requires keeping the lastVerified dates and sourceUrls alongside the content — they are load-bearing, not cosmetic.

Pricing

The public API is free and unmetered, and will remain free for all documented-rule data. Pricing page documents what the future paid tier will and won't cover.

On the roadmap (not yet shipping)

These are not available today. We list them here so you can plan ahead and email if a specific one would unlock something for you.

  • Professional watchlists with email alerts on rule changes.
  • Saved lanes with daily delta digests.
  • CSV exports of arbitrary slices.
  • White-label embeddable widgets.
  • Compliance PDFs (auditable snapshot of a rule on a date).
  • Historical rule changes (point-in-time API queries).

The public API stays CC-BY 4.0 and free. Premium features layer on top — they do not gate the core data.

RULES5,339COUNTRIES85ITEMS111CARRIERS28GUIDES37UNIQUE SOURCES614LATEST VERIFICATION2026-05-13MethodologyChangelog