Skip to main content
GET
/
stats
Dataset Statistics
curl --request GET \
  --url https://htsapi.com/v1/stats
{
  "dataset": {
    "total_codes": 123,
    "chapters": 123,
    "breakdown": {},
    "version": {
      "name": "<string>",
      "year": 123,
      "revision": "<string>"
    },
    "country": "<string>",
    "last_updated": "<string>"
  },
  "api": {
    "version": "<string>",
    "status": "<string>"
  }
}
Returns dataset and API statistics. This endpoint does not require authentication.

Example Request

curl -X GET "https://htsapi.com/v1/stats"

Example Response

{
  "dataset": {
    "total_codes": 34377,
    "chapters": 99,
    "breakdown": {
      "chapters": 99,
      "headings": 1247,
      "subheadings": 5201,
      "statistical_suffixes": 27830
    },
    "version": {
      "name": "HTS 2020 Revision 18",
      "year": 2020,
      "revision": "18"
    },
    "country": "US",
    "last_updated": "2024-01-15"
  },
  "api": {
    "version": "1.0.0",
    "status": "healthy"
  }
}

Response Fields

  • dataset.total_codes: Total number of HTS codes in the database
  • dataset.chapters: Number of chapters (2-digit codes)
  • dataset.breakdown: Breakdown by code level
  • dataset.version: HTS data version information
  • dataset.country: Country code (US for HTS)
  • dataset.last_updated: Date when data was last updated
  • api.version: API version
  • api.status: API health status

Use Cases

  • Display dataset information
  • Health checks
  • Version verification
  • Data freshness checks

Response

200 - application/json

Statistics

dataset
object
api
object