PeumeAPI

Developer & public data

Count Source Records

Count customs records in named source datasets — free sizing check before pulling.

$0.0005 per call

Call it

curl https://api.peume.com/v1/call/count-source-records \
  -H "Authorization: Bearer $PEUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "catalog": "imports",
    "startDate": "your startDate",
    "endDate": "your endDate",
    "country": "your country"
  }
}'

Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: count-source-records.

Parameters

catalogRequiredstring

Data-source side: customs import records or export records.

imports · exports

startDateRequiredstring

Query window start, YYYY-MM-DD. The window may span at most three years.

endDateRequiredstring

Query window end, YYYY-MM-DD.

countryRequiredstring

Source dataset name(s), comma-separated: the lowercase English country name (e.g. 'america,argentina', 'india'). These are dataset identifiers matching the `database` field on returned records, not ISO country codes; some carry suffixed variants (e.g. 'malaysia_pro').

importerstring

Importer (consignee) company name, min 2 chars. Drop company suffixes and special characters for better matching.

exporterstring

Exporter company name (min 2 chars). Drop company suffixes and special characters for better matching.

productDescstring

Product description keywords; separate multiple keywords with semicolons (e.g. 'electronics; home appliance').

hsCodestring

Customs HS code, 4+ digits (e.g. '630492'). A 2-digit chapter code works only combined with productDesc or a company name.

countryOfOriginCodestring

Origin country ISO3 code(s), semicolon-separated (e.g. 'CHN;USA').

countryOfDestinationCodestring

Destination country ISO3 code(s), semicolon-separated (e.g. 'USA;CHN').

portOfDeparturestring

Departure port name.

portOfArrivalstring

Arrival port name.

transportTypestring

Transport mode (e.g. sea, air, road).

weightarray

Weight range in kilograms, as [min, max].

quantityarray

Quantity range, as [min, max].

quantityUnitstring

Quantity unit filter (e.g. 'PCS', 'PKG').

sumOfUSDarray

Total USD value range, as [min, max].

weightUnitPriceUSDarray

USD unit price per kilogram range, as [min, max].

quantityUnitPriceUSDarray

USD unit price per quantity range, as [min, max].

filterBlankFieldsarray

Drop records whose named party is blank (e.g. ["importer"]).

filterLogisticFieldsarray

Drop records whose named party is a logistics company (e.g. ["exporter"]). Buyers have reported forwarders still being returned, so screen party names yourself.

searchModestring

Set to FUZZY_SINGLE for single-keyword fuzzy matching; omit for the default smart search.

containProducerboolean

Include producer companies (available on Russia/Kazakhstan sources).

optimizationModelboolean

Prefer the vendor's optimized data sources.

Start free · $1 of calls included

Every API your product needs. One key.

7,267 endpoints, one bill, and you only pay for calls that work.