Market data API v1
Weekly export volumes of fresh produce and coffee, from customs declarations. First source: SUNAT (Peru), definitive export declarations; first product: blueberries. Other sources: DIAN (Colombia) and Servicio Nacional de Aduanas (Chile, legalised export declarations).
Units. Volumes are net tonnes (t), values are USD FOB, prices are USD per net kg.
Week attribution. A shipment counts in the ISO week of its shipment date. A season is made
of whole ISO weeks (Peruvian blueberries: May to April, label 2026-27).
Provisional weeks. Customs files are cut on regularisation date, so recent shipment weeks keep
filling up for several weeks. The most recent meta.provisional_weeks weeks (by default 5 for Peru, 8 for
Colombia, 7 for Chile) are flagged provisional: true in weekly volumes: never read them as final. They may carry
estimated_tonnes. For Colombia the tonnes of those weeks are expected values: DIAN publishes provisional
filings first, replaced by definitive ones weeks to months later, and the provisional ones are scaled by each
exporter's historical provisional-to-definitive ratio. For Chile a week fills up as declarations are legalised
(1 to 6 weeks after the bill of lading) and published, a month's file about a month after it.
Chile. Aduana publishes no exporter or consignee identity, so Chile has volumes, values, destinations and vessels but no exporter data. Values are FOB as declared at shipment, before consignment sales settle: final values run roughly 20-35% higher for grapes and cherries. They are not scaled.
Authentication. Send Authorization: Bearer (or X-API-Key: ). A key is optional
on public endpoints (it raises the rate limit) and required on the others. A key that is present
but invalid is rejected with 401 everywhere.
Rate limits. Fixed window per client: anonymous callers are counted per IP address, callers with a key per
account. Defaults: 30 requests per minute anonymous, 300 per minute with a key (configurable by the
host application). Responses carry X-RateLimit-Limit and X-RateLimit-Remaining; above the limit the
API answers 429 with a Retry-After header (seconds).
Origins. {origin} is the lowercase ISO 3166-1 alpha-2 code of the exporting country (pe, co, cl).
Rate limits
- Anonymous: 30 requests per 1 minute
- Authenticated: 300 requests per 1 minute
Endpoints
Base path: /data/api/v1. Machine-readable spec: docs/api.yml (OpenAPI 3.1.0).
GET /products
Products, their origins, the seasons with data and labels
Responses: 200, 429
GET /arrivals
Fresh produce expected to arrive, week by week, in every destination market (Peru, Colombia and Chile)
market(query): Destination market slug (`europe`, `north-america`, `asia`... as in `/data/arrivals?market=`). Default: every market.product(query): Product slug, as returned by `/products`. Default: every product.origin(query): Lowercase ISO-2 origin (`pe`, `co`, `cl`). Default: every origin.from(query): A date in the first week wanted (YYYY-MM-DD; weeks start on Monday). Give both `from` and `to`, or neither (two weeks before today to four weeks after). At most 26 weeks, starting no more than 3 years before today (an older `from` is a 400).to(query): A date in the last week wanted (YYYY-MM-DD).
Responses: 200, 400, 401, 404, 429
GET /{origin}/{product}/weekly_volumes
Net tonnes per ISO week of a season, next to the same ISO week a year before (also available as .csv)
origin(path, required): Lowercase ISO 3166-1 alpha-2 code of the exporting country.product(path, required): Product slug, see `/products`.season(query): Season label such as `2026-27` (default is the current season).
Responses: 200, 400, 401, 404, 429
GET /{origin}/{product}/destinations
Tonnes and FOB per destination country and per destination port
origin(path, required): Lowercase ISO 3166-1 alpha-2 code of the exporting country.product(path, required): Product slug, see `/products`.from(query): First shipment date (inclusive, YYYY-MM-DD). Give both `from` and `to`, or neither (current season).to(query): Last shipment date (inclusive, YYYY-MM-DD).
Responses: 200, 400, 401, 404, 429
GET /{origin}/{product}/departures
Recent vessel departures carrying the product, per sailing and destination port (confirmed and estimated tonnes)
origin(path, required): Lowercase ISO 3166-1 alpha-2 code of the exporting country.product(path, required): Product slug, see `/products`.region(query): Destination region: `Europe` (default) or `all` for every destination.from(query): First sailing date (inclusive, YYYY-MM-DD). Give both `from` and `to`, or neither (last 30 days up to today). At most 180 days between them.to(query): Last sailing date (inclusive, YYYY-MM-DD).
Responses: 200, 400, 401, 404, 429
GET /{origin}/{product}/exporters (API key required)
Exporters ranked by net tonnes (API key required; also available as .csv)
origin(path, required): Lowercase ISO 3166-1 alpha-2 code of the exporting country.product(path, required): Product slug, see `/products`.from(query): First shipment date (inclusive, YYYY-MM-DD). Give both `from` and `to`, or neither (current season).to(query): Last shipment date (inclusive, YYYY-MM-DD).limit(query): Number of exporters returned (market share stays relative to all exporters).
Responses: 200, 400, 401, 404, 429
GET /{origin}/exporters/{tax_id} (API key required)
One exporter, by tax id (RUC in Peru): destinations, seasonality, trend (API key required; also .csv)
origin(path, required): Lowercase ISO 3166-1 alpha-2 code of the exporting country.tax_id(path, required): Exporter tax id, unique per origin (RUC for Peru).product(query): Restrict the profile to one product slug (default is all tracked products).
Responses: 200, 401, 404, 429
Errors
Errors are JSON: { "error": { "code": "...", "message": "..." } }, with status 400 (bad parameters), 401 (missing or invalid key), 404 (unknown origin, product, exporter or endpoint), 406 (unsupported format) or 429 (rate limited, see Retry-After).