# Tendata Customs Trade Record Count API

> Count the customs records that match a trade query before paying for rows, to check that filters are narrow enough.

Source: https://www.sandbase.ai/apis/tendata/trade/record-count
API reference: https://www.sandbase.ai/apis/tendata/trade/record-count#api

## Facts

- Provider: Tendata
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/tendata/trade/record-count`
- Price: From $0 per call
- Capabilities: api, tendata, trade data, business data
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

`POST https://api.sandbase.ai/v1/api/tendata/trade/record-count` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `catalog` | string | yes | imports, exports |
| `endDate` | string | yes |  |
| `startDate` | string | yes |  |
| `hsCode` | string | no |  |
| `weight` | array | no |  |
| `exporter` | string | no |  |
| `importer` | string | no |  |
| `quantity` | array | no |  |
| `sumOfUSD` | array | no |  |
| `searchMode` | string | no |  |
| `productDesc` | string | no |  |
| `quantityUnit` | string | no |  |
| `portOfArrival` | string | no |  |
| `transportType` | string | no |  |
| `containProducer` | boolean | no |  |
| `portOfDeparture` | string | no |  |
| `filterBlankFields` | array | no |  |
| `optimizationModel` | boolean | no |  |
| `weightUnitPriceUSD` | array | no |  |
| `countryOfOriginCode` | string | no |  |
| `filterLogisticFields` | array | no |  |
| `quantityUnitPriceUSD` | array | no |  |
| `countryOfDestinationCode` | string | no |  |

## FAQ

### How do I use the Customs Trade Record Count API?

Send a POST request to https://api.sandbase.ai/v1/api/tendata/trade/record-count with your SandBase API key in the Authorization header (Bearer) and the parameters as a JSON body. You can also try it in the Playground on this page without writing code.

### How much does the Customs Trade Record Count API cost?

From $0 per call, billed from your SandBase balance. You are only charged for calls you make; there is no subscription.

### What parameters does the Customs Trade Record Count API accept?

Required: catalog (one of imports, exports), endDate (string) and startDate (string). Optional: hsCode (string), weight (array), exporter (string), importer (string), quantity (array) and sumOfUSD (array) and 14 more. The Parameters table and the Playground on this page list every field.

### What does the Customs Trade Record Count API return?

A JSON result. This endpoint runs asynchronously, so the response tells you how to fetch the finished result.

### Do I need a Tendata developer account or API key?

No. Customs Trade Record Count runs through SandBase, so one SandBase API key covers this endpoint and every other API and model in the catalog. You do not need to apply for Tendata API access separately.

## README

### Customs Trade Record Count

Count the customs records that match a trade query before paying for rows, to check that filters are narrow enough.
