Skip to content

Errors

All error responses use a consistent JSON schema:

{
  "error": "ErrorType",
  "message": "Human-readable description of what went wrong.",
  "status": 400
}

Error codes

Status Error Description
400 BadRequest Invalid parameters (e.g., malformed NORAD ID, invalid date format, TLE requested for high catalog number)
403 Forbidden Missing or invalid API key
404 NotFound Object not found in catalog, or no element sets matching query
429 TooManyRequests Rate limit exceeded — see Rate Limits
500 InternalError Unexpected server error — if persistent, please report it

Common scenarios

Invalid NORAD ID

curl -H "X-Api-Key: YOUR_KEY" \
  https://orbital-data-api.davidhsu.cc/api/v1/gp/0
{
  "error": "BadRequest",
  "message": "NORAD catalog ID must be between 1 and 999999999.",
  "status": 400
}

Object not found

curl -H "X-Api-Key: YOUR_KEY" \
  https://orbital-data-api.davidhsu.cc/api/v1/gp/999999999
{
  "error": "NotFound",
  "message": "No element set found for NORAD ID 999999999.",
  "status": 404
}

Missing API key

curl https://orbital-data-api.davidhsu.cc/api/v1/gp/25544
{
  "error": "Forbidden",
  "message": "Missing or invalid API key. Include X-Api-Key header.",
  "status": 403
}

Rate limit exceeded

{
  "error": "TooManyRequests",
  "message": "Rate limit exceeded. Try again in 3 seconds.",
  "status": 429
}