Call it
curl https://api.peume.com/v1/call/search-source-records \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"pageNo": 10,
"pageSize": 10,
"catalog": "imports",
"startDate": "your startDate",
"endDate": "your endDate",
"country": "your country"
}
}'const res = await fetch("https://api.peume.com/v1/call/search-source-records", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"pageNo": 10,
"pageSize": 10,
"catalog": "imports",
"startDate": "your startDate",
"endDate": "your endDate",
"country": "your country"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/search-source-records",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"pageNo": 10,
"pageSize": 10,
"catalog": "imports",
"startDate": "your startDate",
"endDate": "your endDate",
"country": "your country"
}
},
)
print(res.json()["output"])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: search-source-records.
Parameters
pageNoRequiredintegerPage number, starting at 1.
pageSizeRequiredintegerRows per page (1-100). Paginated rows are what you pay for — this is your cost budget per call.
catalogRequiredstringData-source side: customs import records or export records.
imports · exports
startDateRequiredstringQuery window start, YYYY-MM-DD. The window may span at most three years.
endDateRequiredstringQuery window end, YYYY-MM-DD.
countryRequiredstringSource 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').
importerstringImporter (consignee) company name, min 2 chars. Drop company suffixes and special characters for better matching.
exporterstringExporter company name (min 2 chars). Drop company suffixes and special characters for better matching.
productDescstringProduct description keywords; separate multiple keywords with semicolons (e.g. 'electronics; home appliance').
hsCodestringCustoms HS code, 4+ digits (e.g. '630492'). A 2-digit chapter code works only combined with productDesc or a company name.
countryOfOriginCodestringOrigin country ISO3 code(s), semicolon-separated (e.g. 'CHN;USA').
countryOfDestinationCodestringDestination country ISO3 code(s), semicolon-separated (e.g. 'USA;CHN').
portOfDeparturestringDeparture port name.
portOfArrivalstringArrival port name.
transportTypestringTransport mode (e.g. sea, air, road).
weightarrayWeight range in kilograms, as [min, max].
quantityarrayQuantity range, as [min, max].
quantityUnitstringQuantity unit filter (e.g. 'PCS', 'PKG').
sumOfUSDarrayTotal USD value range, as [min, max].
weightUnitPriceUSDarrayUSD unit price per kilogram range, as [min, max].
quantityUnitPriceUSDarrayUSD unit price per quantity range, as [min, max].
filterBlankFieldsarrayDrop records whose named party is blank (e.g. ["importer"]).
filterLogisticFieldsarrayDrop records whose named party is a logistics company (e.g. ["exporter"]). Buyers have reported forwarders still being returned, so screen party names yourself.
searchModestringSet to FUZZY_SINGLE for single-keyword fuzzy matching; omit for the default smart search.
containProducerbooleanInclude producer companies (available on Russia/Kazakhstan sources).
optimizationModelbooleanPrefer the vendor's optimized data sources.
