Documentation

Comprehensive documentation for accessing our seafood commodity prices and trade data APIs.

API Authentication

Request Access

All API endpoints require authentication using API tokens. Contact us and get your trial API token.

Use the Token

Include the token in the Authorization header of all requests:

Authorization: Bearer YOUR_API_TOKEN

Prices API Endpoints

Get Price Data

GET /api/prices Returns pricing data for the requested products.
Parameter Type Required Description
products string Yes Comma-separated list of product nicknames (e.g. "guangdong_tilapia_500_800,norwegian_frozen_salmon"; see: /api/prices/products)
from_date string No Start date in YYYY-MM-DD format to filter data from a specific date
to_date string No End date in YYYY-MM-DD format to filter data up to a specific date
format string No Output format ("default" or "structured")

Example Request

curl -X GET \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  "https://api.undercurrentnews.com/api/prices?products=guangdong_tilapia_500_800,norwegian_frozen_salmon&from_date=2023-01-01&to_date=2023-12-31"

Get Available Products

GET /api/prices/products Returns a list of all available products with their codes and descriptions.
Parameter Type Required Description
search string No Search term to filter products by title or nickname (e.g. "salmon", "shrimp")
frequency string No Filter by frequency (e.g. "daily", "weekly", "monthly")
category string No Filter by product category (e.g. "Salmonids")
specie string No Filter by species (e.g. "Atlantic salmon")
origin string No Filter by origin (e.g. "Norway")
limit integer No Maximum number of results to return (default: 100)

Example Request

curl -X GET \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  "https://api.undercurrentnews.com/api/prices/products?search=salmon&frequency=weekly&limit=10"

Trade API Endpoints

Get Trade Data

GET /api/trade Returns trade data for the requested regions, products and partners.
Parameter Type Required Description
regions string Yes Comma-separated list of regions (e.g. "China,India"; see: /api/trade/countries)
flow string Yes Trade flow (either "Import" or "Export")
products string Yes Comma-separated list of HS product codes (e.g. "0307,0304"; see: /api/trade/products)
partners string No Comma-separated list of partner country names (e.g. "EU 27,Japan"; defaults to "World"; see: /api/trade/countries)
startdate string No Start date in MMM_YYYY or YYYY format (e.g. "Oct_2022" or "2022")
enddate string No End date in MMM_YYYY or YYYY format
mirror boolean No Whether to use mirrored trade data (default: false)
format string No Output format ("default" or "structured")

Example Request

curl -X GET \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  "https://api.undercurrentnews.com/api/trade?regions=China,India&flow=Import&products=0307,0304&partners=EU 27,Japan&startdate=Oct_2022&enddate=Dec_2022"

Get Available Countries

GET /api/trade/countries Returns a list of all available countries with their codes and names.

Example Request

curl -X GET \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  "https://api.undercurrentnews.com/api/trade/countries"

Get Available Products

GET /api/trade/products Returns a list of all available trade products with their codes and descriptions.
Parameter Type Required Description
search string No Search term to filter products by description or HS code

Example Request

curl -X GET \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  "https://api.undercurrentnews.com/api/trade/products?search=liver"

Get Extended Trade Data

GET /api/trade/extended Returns extended trade data (8+ digit HS codes) for a single region.
Parameter Type Required Description
regions string Yes Single region (e.g. "Netherlands"; see: /api/trade/countries)
flow string Yes Trade flow (either "Import" or "Export")
products string Yes Comma-separated list of extended HS product codes (e.g. "03038990"; see: /api/trade/extended/products)
partners string No Comma-separated list of partner country names (e.g. "Germany,Suriname"; defaults to "World"; see: /api/trade/countries)
startdate string No Start date in MMM_YYYY or YYYY format (e.g. "Oct_2022" or "2022")
enddate string No End date in MMM_YYYY or YYYY format
mirror boolean No Whether to use mirrored trade data (default: false)
format string No Output format ("default" or "structured")

Example Request

curl -X GET \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  "https://api.undercurrentnews.com/api/trade/extended?regions=Netherlands&flow=Import&products=03038990&partners=Germany,Suriname&startdate=Oct_2022&enddate=Dec_2022&format=structured"