SPACEDEBRIS API
Every panel on the SpaceDebris dashboard is backed by a public JSON endpoint. 8 of the 14 operations are deterministic and make no AI call. Most of them pass public data through: /api/debris and /api/iss relay Space-Track.org element sets and CDMs, /api/spaceweather relays NOAA SWPC indices (deriving the G-scale and a drag regime), and /api/health and /api/openapi report subsystem status and the OpenAPI document. Two run physics server-side: /api/screen (SGP4 conjunction screening with a 2-D probability of collision) and /api/cola (two-body ascent screened against the SGP4-propagated catalog sample). The other 6 operations are Claude-backed and spend the project's own Anthropic credits. Each card below is marked. Every /api/* route is rate-limited per IP — 120 requests/min in general, 10/min sustained for expensive calls (every Claude-backed POST, GET /api/screen and /api/cola, uncached Space-Track lookups; the two Claude-backed GETs are served from a route cache and stay in the general tier) — and GET responses are CORS-enabled for any origin.
Token buckets per client IP (IPv6: per /64). Every /api/* request spends from the general bucket: burst 120, refill 2/s (120 requests/min sustained). Expensive requests — every POST (all Claude-backed), GET /api/screen and GET /api/cola (uncached Space-Track lookup and/or up to ~20 s of server CPU per call), and GET /api/debris with search or with a limit other than 500 or 2000 (a fresh Space-Track query) — must also pass a stricter bucket: burst 20, 10 requests/min. Responses carry X-RateLimit-Tier plus X-RateLimit-Limit / X-RateLimit-Remaining of the bucket that applies; an empty bucket returns 429 { error, retryAfterSeconds } with a Retry-After header. Enforced in Edge middleware per instance — best-effort, not a global guarantee.
curl -si "https://space-debris-two.vercel.app/api/health" \ | grep -i x-ratelimit
GET and HEAD responses carry Access-Control-Allow-Origin: *, and preflights asking for GET or HEAD are answered with 204 and the same header. Preflights for POST get no CORS headers, so browsers refuse cross-origin POSTs, and a POST whose Origin header names another host is rejected with 403 before it reaches a route. Server-side callers such as curl send no Origin and are unaffected.
Deterministic endpoints make no AI call (Space-Track and NOAA are free but rate-limited upstream, so responses are cached). Claude-backed endpoints run at temperature 0 and spend real tokens — please do not script them.
Endpoints
13 routes · 14 operations| GET | /api/debris | Newest-epoch element-set sample (list mode) | $0 |
| GET | /api/debris | Look up one object by name or NORAD ID (search mode) | $0 |
| POST | /api/analyze | AI collision-risk score for one satellite | Claude |
| POST | /api/maneuver | AI collision-avoidance maneuver plan | Claude |
| GET | /api/conjunctions | Upcoming public CDMs with AI plain-English summaries | Claude |
| POST | /api/cascade | AI Kessler-cascade scenario for one conjunction | Claude |
| GET | /api/screen | Deterministic SGP4 conjunction screen of one target | $0 |
| POST | /api/assess | AI conjunction-assessment memo for a screening run | Claude |
| GET | /api/fleet | Fleet intelligence brief | Claude |
| GET | /api/iss | ISS element set + public CDMs involving NORAD 25544 | $0 |
| GET | /api/cola | Launch collision-avoidance (COLA) window screen | $0 |
| GET | /api/spaceweather | Planetary Kp, F10.7 solar flux and LEO drag regime | $0 |
| GET | /api/health | Subsystem health + live Space-Track request budget | $0 |
| GET | /api/openapi | This API as an OpenAPI 3.1 document | $0 |
Catalog
/api/debris
Newest-epoch element-set sample (list mode)
Returns the limit most recently updated objects from Space-Track's gp class (newest EPOCH first) — the sample the 3D map and every catalog panel use. All Space-Track fields are strings. The sample is dominated by recently updated payloads (Starlink); it is not the ~46,000-object catalog.
Only limit 500 or 2000 (or no limit) is in the general tier; any other value is a fresh Space-Track pull and uses the expensive tier.
- limitquery · integeroptionalRows to return. Non-numeric or ≤ 0 falls back to 500; the Space-Track client clamps to 10,000. The dashboard uses 2000 — reuse it to share the server's cached sample.default 500 — e.g. 2000
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| limit | query | integer | no | Rows to return. Non-numeric or ≤ 0 falls back to 500; the Space-Track client clamps to 10,000. The dashboard uses 2000 — reuse it to share the server's cached sample. default 500 — e.g. 2000 |
curl -s "https://space-debris-two.vercel.app/api/debris?limit=2000"
{
"count": 2000,
"objects": [
{
"OBJECT_NAME": "ISS (ZARYA)",
"OBJECT_ID": "1998-067A",
"NORAD_CAT_ID": "25544",
"EPOCH": "2024-01-01T12:00:00.000000",
"TLE_LINE1": "1 25544U 98067A 24001.50000000 .00016717 00000-0 10270-3 0 9997",
"TLE_LINE2": "2 25544 51.6400 208.9163 0006703 130.5360 325.0288 15.49560532 25006",
"INCLINATION": "51.6400",
"RA_OF_ASC_NODE": "208.9163",
"ECCENTRICITY": "0.0006703",
"ARG_OF_PERICENTER": "130.5360",
"MEAN_ANOMALY": "325.0288",
"MEAN_MOTION": "15.49560532",
"SEMIMAJOR_AXIS": "6796.148",
"PERIOD": "92.930",
"APOAPSIS": "422.566",
"PERIAPSIS": "413.455"
}
]
}- 500Space-Track fetch failed — { error, detail }.
- 429Rate limit exceeded (middleware, general bucket) — { error, retryAfterSeconds } + Retry-After.
/api/debris
Look up one object by name or NORAD ID (search mode)
When search is present the route switches to single-object lookup: a numeric value matches NORAD_CAT_ID, anything else is a wildcard OBJECT_NAME match ordered by newest epoch. object is null (HTTP 200) when nothing matches. Note the bare word ISS also matches ISS DEB objects by wildcard — use 25544 for the station.
- searchquery · stringrequiredSatellite name or NORAD catalog number. Takes precedence over
limit.e.g. 25544
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| search | query | string | yes | Satellite name or NORAD catalog number. Takes precedence over limit.e.g. 25544 |
curl -s "https://space-debris-two.vercel.app/api/debris?search=25544"
{
"object": {
"OBJECT_NAME": "ISS (ZARYA)",
"OBJECT_ID": "1998-067A",
"NORAD_CAT_ID": "25544",
"EPOCH": "2024-01-01T12:00:00.000000",
"TLE_LINE1": "1 25544U 98067A 24001.50000000 .00016717 00000-0 10270-3 0 9997",
"TLE_LINE2": "2 25544 51.6400 208.9163 0006703 130.5360 325.0288 15.49560532 25006",
"INCLINATION": "51.6400",
"RA_OF_ASC_NODE": "208.9163",
"ECCENTRICITY": "0.0006703",
"ARG_OF_PERICENTER": "130.5360",
"MEAN_ANOMALY": "325.0288",
"MEAN_MOTION": "15.49560532",
"SEMIMAJOR_AXIS": "6796.148",
"PERIOD": "92.930",
"APOAPSIS": "422.566",
"PERIAPSIS": "413.455"
}
}- 500Space-Track fetch failed — { error, detail }.
- 429Rate limit exceeded (middleware, expensive tier) — { error, retryAfterSeconds } + Retry-After.
Risk & maneuvers
/api/analyze
AI collision-risk score for one satellite
Resolves the object on Space-Track, gathers up to 15 objects within ±100 km of its mean altitude from a 300-object sample, and asks Claude (temperature 0) for a scored risk assessment: three 0-100 bars, a threat level and plain-English advice. The resolved Space-Track row is attached as tle (all fields strings) so callers can chain POST /api/maneuver without a second lookup. Scores are model judgement, not a computed Pc.
- querybody · stringrequiredSatellite name (wildcard match) or NORAD catalog number.e.g. 25544
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| query | body | string | yes | Satellite name (wildcard match) or NORAD catalog number. e.g. 25544 |
curl -s -X POST "https://space-debris-two.vercel.app/api/analyze" \
-H "Content-Type: application/json" \
-d '{
"query": "25544"
}'{
"collisionProbability": 12,
"debrisDensity": 46,
"orbitalStability": 88,
"overallThreat": "LOW",
"closestApproach": "4.1 km in 6.2 hours",
"recommendation": "No maneuver required; continue routine screening.",
"summary": "ISS operates in a moderately populated 420 km shell…",
"altitudeKm": 418,
"periodMinutes": 92.93,
"inclinationDeg": 51.64,
"tle": {
"OBJECT_NAME": "ISS (ZARYA)",
"NORAD_CAT_ID": "25544",
"TLE_LINE1": "1 25544U …",
"TLE_LINE2": "2 25544 …"
}
}- 400Body is not JSON or `query` is missing — { error }.
- 404No catalog object matches `query` — { error }.
- 502Claude returned an unparseable score — { error, detail }.
- 500Space-Track or Claude call failed — { error, detail }.
- 403Browser POST from another origin (middleware; Origin names another host) — { error }.
- 429Rate limit exceeded (middleware, expensive tier) — { error, retryAfterSeconds } + Retry-After.
/api/maneuver
AI collision-avoidance maneuver plan
Takes a risk score (as returned by POST /api/analyze) and asks Claude for a plain-text plan — primary maneuver, alternatives, confidence, rationale — with hydrazine estimates (Tsiolkovsky, Isp 220 s and 1,000 kg wet mass assumed) and a trailing RECOMMENDATION line, extracted into recommendation (MONITOR | PREPARE | EXECUTE | EMERGENCY; PREPARE when the line is missing). For the deterministic Clohessy-Wiltshire trade study see the Avoidance Burn Planner panel on the dashboard.
- satelliteNamebody · stringrequiredDisplay name.e.g. ISS (ZARYA)
- noradIdbody · stringrequiredNORAD catalog number.e.g. 25544
- altitudeKmbody · numberrequiredMean altitude (km).e.g. 418
- periodMinutesbody · numberrequiredOrbital period (min).e.g. 92.93
- inclinationDegbody · numberrequiredInclination (deg).e.g. 51.64
- collisionProbabilitybody · numberrequired0-100 score from /api/analyze (not a Pc).e.g. 12
- debrisDensitybody · numberrequired0-100 score from /api/analyze.e.g. 46
- orbitalStabilitybody · numberrequired0-100 score from /api/analyze.e.g. 88
- overallThreatbody · stringrequiredThreat level from /api/analyze.one of LOW · MEDIUM · HIGH · CRITICAL — e.g. MEDIUM
- closestApproachbody · stringrequiredFree-text closest approach from /api/analyze.e.g. 4.1 km in 6.2 hours
- tleLine1body · stringoptionalOptional raw TLE line 1.
- tleLine2body · stringoptionalOptional raw TLE line 2.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| satelliteName | body | string | yes | Display name. e.g. ISS (ZARYA) |
| noradId | body | string | yes | NORAD catalog number. e.g. 25544 |
| altitudeKm | body | number | yes | Mean altitude (km). e.g. 418 |
| periodMinutes | body | number | yes | Orbital period (min). e.g. 92.93 |
| inclinationDeg | body | number | yes | Inclination (deg). e.g. 51.64 |
| collisionProbability | body | number | yes | 0-100 score from /api/analyze (not a Pc). e.g. 12 |
| debrisDensity | body | number | yes | 0-100 score from /api/analyze. e.g. 46 |
| orbitalStability | body | number | yes | 0-100 score from /api/analyze. e.g. 88 |
| overallThreat | body | string | yes | Threat level from /api/analyze. one of LOW · MEDIUM · HIGH · CRITICAL — e.g. MEDIUM |
| closestApproach | body | string | yes | Free-text closest approach from /api/analyze. e.g. 4.1 km in 6.2 hours |
| tleLine1 | body | string | no | Optional raw TLE line 1. |
| tleLine2 | body | string | no | Optional raw TLE line 2. |
curl -s -X POST "https://space-debris-two.vercel.app/api/maneuver" \
-H "Content-Type: application/json" \
-d '{
"satelliteName": "ISS (ZARYA)",
"noradId": "25544",
"altitudeKm": 418,
"periodMinutes": 92.93,
"inclinationDeg": 51.64,
"collisionProbability": 12,
"debrisDensity": 46,
"orbitalStability": 88,
"overallThreat": "MEDIUM",
"closestApproach": "4.1 km in 6.2 hours"
}'{
"satelliteName": "ISS (ZARYA)",
"text": "PRIMARY MANEUVER\nDirection: PROGRADE\n…\nRECOMMENDATION: PREPARE",
"recommendation": "PREPARE",
"generatedAt": "2024-01-01T12:00:00.000Z"
}- 400Missing / mistyped fields — { error } lists the required ones.
- 500Claude call failed — { error, detail }.
- 403Browser POST from another origin (middleware; Origin names another host) — { error }.
- 429Rate limit exceeded (middleware, expensive tier) — { error, retryAfterSeconds } + Retry-After.
Conjunctions
/api/conjunctions
Upcoming public CDMs with AI plain-English summaries
The 10 soonest-TCA conjunction data messages from Space-Track's cdm_public class (owner/operator-released messages only), merged with ONE batched Claude call that adds plainEnglish, recommendation and urgency. CDM fields stay strings exactly as Space-Track publishes them. No Claude call is made when the feed is empty.
No parameters.
curl -s "https://space-debris-two.vercel.app/api/conjunctions"
{
"count": 10,
"alerts": [
{
"cdmId": "812345678",
"sat1Name": "STARLINK-1234",
"sat1Id": "44935",
"sat2Name": "FENGYUN 1C DEB",
"sat2Id": "31141",
"tca": "2024-01-01T18:42:10.000000",
"missDistanceKm": "0.412",
"probability": "0.0000312",
"plainEnglish": "A Starlink satellite passes 412 m from a Fengyun-1C fragment…",
"recommendation": "Operator should evaluate an avoidance maneuver.",
"urgency": "HIGH"
}
]
}- 500Space-Track or Claude call failed — { error, detail }.
- 429Rate limit exceeded (middleware, general bucket) — { error, retryAfterSeconds } + Retry-After.
/api/cascade
AI Kessler-cascade scenario for one conjunction
Takes one alert from GET /api/conjunctions and asks Claude for a 5-section worst-case fragmentation narrative ending in a CASCADE STATUS line, extracted into status (CONTAINED | WARNING | CRITICAL | CATASTROPHIC; WARNING when the line is missing). Narrative scenario, not a debris-evolution model run.
- cdmIdbody · stringrequiredCDM_ID of the alert.e.g. 812345678
- sat1Namebody · stringrequiredPrimary object name.e.g. STARLINK-1234
- sat1Idbody · stringrequiredPrimary NORAD ID.e.g. 44935
- sat2Namebody · stringrequiredSecondary object name.e.g. FENGYUN 1C DEB
- sat2Idbody · stringrequiredSecondary NORAD ID.e.g. 31141
- tcabody · stringrequiredTime of closest approach as published.e.g. 2024-01-01T18:42:10.000000
- missDistanceKmbody · stringrequiredMiss distance in km as a STRING (converted from the CDM's MIN_RNG, which Space-Track publishes in metres).e.g. 0.412
- probabilitybody · stringrequiredPc — a STRING, as in the CDM.e.g. 0.0000312
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| cdmId | body | string | yes | CDM_ID of the alert. e.g. 812345678 |
| sat1Name | body | string | yes | Primary object name. e.g. STARLINK-1234 |
| sat1Id | body | string | yes | Primary NORAD ID. e.g. 44935 |
| sat2Name | body | string | yes | Secondary object name. e.g. FENGYUN 1C DEB |
| sat2Id | body | string | yes | Secondary NORAD ID. e.g. 31141 |
| tca | body | string | yes | Time of closest approach as published. e.g. 2024-01-01T18:42:10.000000 |
| missDistanceKm | body | string | yes | Miss distance in km as a STRING (converted from the CDM's MIN_RNG, which Space-Track publishes in metres). e.g. 0.412 |
| probability | body | string | yes | Pc — a STRING, as in the CDM. e.g. 0.0000312 |
curl -s -X POST "https://space-debris-two.vercel.app/api/cascade" \
-H "Content-Type: application/json" \
-d '{
"cdmId": "812345678",
"sat1Name": "STARLINK-1234",
"sat1Id": "44935",
"sat2Name": "FENGYUN 1C DEB",
"sat2Id": "31141",
"tca": "2024-01-01T18:42:10.000000",
"missDistanceKm": "0.412",
"probability": "0.0000312"
}'{
"cdmId": "812345678",
"text": "1. INITIAL IMPACT\n…\nCASCADE STATUS: WARNING",
"status": "WARNING",
"generatedAt": "2024-01-01T12:00:00.000Z"
}- 400Invalid JSON or a missing / non-string field — { error }.
- 500Claude call failed — { error, detail }.
- 403Browser POST from another origin (middleware; Origin names another host) — { error }.
- 429Rate limit exceeded (middleware, expensive tier) — { error, retryAfterSeconds } + Retry-After.
/api/screen
Deterministic SGP4 conjunction screen of one target
All-on-one screen of the target against the 2,000-object sample: perigee/apogee band prefilter (±75 km) → 60 s coarse SGP4 sweep → golden-section refinement of each local minimum → miss distance, relative velocity, RIC separation in the target frame, 2-D encounter-plane Pc under an ASSUMED TLE-grade covariance (1-σ RIC 0.3 / 1.0 / 0.3 km per object, hard-body radius 20 m) and the NASA ISS keep-out box test. Closest approach per secondary, sorted by miss distance. The compute budget (≤ 20 s) sets truncated when it trips. Each approach also carries both ECI (TEME) states at TCA.
- targetquery · stringrequiredSatellite name or NORAD ID, 1-64 chars. The bare word ISS is aliased to NORAD 25544.max 64 chars — e.g. ISS
- hoursquery · integeroptionalScreening window length from now (hours).one of 6 · 12 · 24 · 48 — default 24 — e.g. 24
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| target | query | string | yes | Satellite name or NORAD ID, 1-64 chars. The bare word ISS is aliased to NORAD 25544. max 64 chars — e.g. ISS |
| hours | query | integer | no | Screening window length from now (hours). one of 6 · 12 · 24 · 48 — default 24 — e.g. 24 |
curl -s "https://space-debris-two.vercel.app/api/screen?target=ISS&hours=24"
{
"target": {
"noradId": "25544",
"name": "ISS (ZARYA)",
"meanAltitudeKm": 418,
"inclinationDeg": 51.64,
"periodMinutes": 92.93,
"epoch": "2024-01-01T12:00:00.000Z"
},
"generatedAt": "2024-01-01T12:00:00.000Z",
"windowStart": "2024-01-01T12:00:00.000Z",
"windowEnd": "2024-01-02T12:00:00.000Z",
"sampleSize": 2000,
"candidatesScreened": 412,
"propagations": 1268544,
"computeMs": 1384,
"truncated": false,
"assumptions": {
"sigmaRicKm": [0.3, 1, 0.3],
"hardBodyRadiusM": 20,
"keepOutBoxKm": {
"radial": 2,
"inTrack": 25,
"crossTrack": 25
},
"coarseStepSeconds": 60,
"windowHours": 24,
"reportThresholdKm": 50
},
"closeApproaches": [
{
"noradId": "49863",
"name": "COSMOS 1408 DEB",
"objectClass": "DEBRIS",
"tca": "2024-01-02T03:17:42.315Z",
"missDistanceKm": 3,
"relativeVelocityKmS": 13.13,
"radialKm": -2.298,
"inTrackKm": -0.997,
"crossTrackKm": 1.65,
"altitudeKm": 420.4,
"probabilityOfCollision": 1.5e-11,
"insideKeepOutBox": false,
"severity": "MEDIUM",
"targetStateEci": {
"position": [-2228.49, -4808.38, 4244.899],
"velocity": [6.7553, 0.0808, 3.62]
},
"secondaryStateEci": {
"position": [-2229.177, -4805.597, 4244.015],
"velocity": [-0.8413, -4.819, -5.8985]
}
}
]
}- 400Missing / over-long target, or hours not in 6 | 12 | 24 | 48 — { error }.
- 404Target not found in the catalog — { error }.
- 500Space-Track fetch or screening failed — { error, detail }.
- 429Rate limit exceeded (middleware, expensive tier) — { error, retryAfterSeconds } + Retry-After.
/api/assess
AI conjunction-assessment memo for a screening run
Forward the corresponding fields of a GET /api/screen result. The body is validated strictly (finite numbers, enum fields, ≤ 500 approaches) and the 8 lowest-miss approaches are sent to Claude, which writes a CARA-style 5-section memo ending in a DISPOSITION line → disposition GREEN | YELLOW | RED (YELLOW when missing). Claude interprets the screening numbers; it never recomputes them. ECI state vectors are accepted but not forwarded to the model.
- targetbody · objectrequiredScreeningTarget: { noradId, name, epoch } strings + finite meanAltitudeKm, inclinationDeg, periodMinutes.
- windowStartbody · stringrequiredISO window start from the screen.e.g. 2024-01-01T12:00:00.000Z
- windowEndbody · stringrequiredISO window end from the screen.e.g. 2024-01-02T12:00:00.000Z
- candidatesScreenedbody · numberrequiredFinite, ≥ 0.e.g. 412
- assumptionsbody · objectrequiredScreeningAssumptions: sigmaRicKm[3], hardBodyRadiusM, keepOutBoxKm { radial, inTrack, crossTrack }, coarseStepSeconds, windowHours, reportThresholdKm.
- closeApproachesbody · arrayrequiredScreeningCloseApproach[] (≤ 500; may be empty). Each: noradId, name, objectClass, tca, missDistanceKm, relativeVelocityKmS, radialKm, inTrackKm, crossTrackKm, altitudeKm, probabilityOfCollision, insideKeepOutBox, severity.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| target | body | object | yes | ScreeningTarget: { noradId, name, epoch } strings + finite meanAltitudeKm, inclinationDeg, periodMinutes. |
| windowStart | body | string | yes | ISO window start from the screen. e.g. 2024-01-01T12:00:00.000Z |
| windowEnd | body | string | yes | ISO window end from the screen. e.g. 2024-01-02T12:00:00.000Z |
| candidatesScreened | body | number | yes | Finite, ≥ 0. e.g. 412 |
| assumptions | body | object | yes | ScreeningAssumptions: sigmaRicKm[3], hardBodyRadiusM, keepOutBoxKm { radial, inTrack, crossTrack }, coarseStepSeconds, windowHours, reportThresholdKm. |
| closeApproaches | body | array | yes | ScreeningCloseApproach[] (≤ 500; may be empty). Each: noradId, name, objectClass, tca, missDistanceKm, relativeVelocityKmS, radialKm, inTrackKm, crossTrackKm, altitudeKm, probabilityOfCollision, insideKeepOutBox, severity. |
curl -s -X POST "https://space-debris-two.vercel.app/api/assess" \
-H "Content-Type: application/json" \
-d '{
"target": {
"noradId": "25544",
"name": "ISS (ZARYA)",
"meanAltitudeKm": 418,
"inclinationDeg": 51.64,
"periodMinutes": 92.93,
"epoch": "2024-01-01T12:00:00.000Z"
},
"windowStart": "2024-01-01T12:00:00.000Z",
"windowEnd": "2024-01-02T12:00:00.000Z",
"candidatesScreened": 412,
"assumptions": {
"sigmaRicKm": [0.3, 1, 0.3],
"hardBodyRadiusM": 20,
"keepOutBoxKm": {
"radial": 2,
"inTrack": 25,
"crossTrack": 25
},
"coarseStepSeconds": 60,
"windowHours": 24,
"reportThresholdKm": 50
},
"closeApproaches": [
{
"noradId": "49863",
"name": "COSMOS 1408 DEB",
"objectClass": "DEBRIS",
"tca": "2024-01-02T03:17:42.315Z",
"missDistanceKm": 3,
"relativeVelocityKmS": 13.13,
"radialKm": -2.298,
"inTrackKm": -0.997,
"crossTrackKm": 1.65,
"altitudeKm": 420.4,
"probabilityOfCollision": 1.5e-11,
"insideKeepOutBox": false,
"severity": "MEDIUM"
}
]
}'{
"targetNoradId": "25544",
"text": "SCREENING SUMMARY\n…\nDISPOSITION: GREEN",
"disposition": "GREEN",
"generatedAt": "2024-01-01T12:00:00.000Z"
}- 400Invalid JSON or a malformed field — { error } names it.
- 500Claude call failed — { error, detail }.
- 403Browser POST from another origin (middleware; Origin names another host) — { error }.
- 429Rate limit exceeded (middleware, expensive tier) — { error, retryAfterSeconds } + Retry-After.
Fleet
/api/fleet
Fleet intelligence brief
Counts are computed server-side from the 2,000-object sample and the 25 soonest public CDMs (heuristic thresholds: CRITICAL Pc ≥ 1e-3 or miss < 0.1 km; HIGH Pc ≥ 1e-4 or miss < 1 km). ONE Claude call then adds shell statuses, the executive brief, risk trend, top-3 threat reasoning and three recommended actions.
No parameters.
curl -s "https://space-debris-two.vercel.app/api/fleet"
{
"generatedAt": "2024-01-01T12:00:00.000Z",
"totalObjects": 2000,
"activeConjunctions": 25,
"highPriorityCount": 3,
"criticalCount": 0,
"shells": {
"leo": {
"count": 1815,
"status": "ELEVATED"
},
"meo": {
"count": 42,
"status": "NOMINAL"
},
"geo": {
"count": 143,
"status": "NOMINAL"
}
},
"executiveBrief": "LEO congestion remains the dominant risk driver…",
"riskTrend": "STABLE",
"topThreats": [
{
"name": "STARLINK-1234 ↔ FENGYUN 1C DEB",
"reasoning": "412 m miss at 1e-5-class Pc…",
"severity": "HIGH"
}
],
"recommendedActions": [
"Starlink operations: confirm autonomous avoidance for the 44935 conjunction…"
]
}- 502Claude returned an unparseable brief — { error, detail }.
- 500Space-Track or Claude call failed — { error, detail }.
- 429Rate limit exceeded (middleware, general bucket) — { error, retryAfterSeconds } + Retry-After.
ISS
/api/iss
ISS element set + public CDMs involving NORAD 25544
Latest ISS gp element set plus any public CDMs naming 25544, filtered from the 100 soonest-TCA messages catalogue-wide (an ISS CDM further out than that window will not appear). An empty cdms array is a valid NOMINAL state. HTTP 200 when at least one source answered — per-source failures are reported in errors. The dashboard derives ground track, JSC passes and RED/YELLOW grading (Pc ≥ 1e-4 / 1e-5) client-side.
No parameters.
curl -s "https://space-debris-two.vercel.app/api/iss"
{
"tle": {
"OBJECT_NAME": "ISS (ZARYA)",
"OBJECT_ID": "1998-067A",
"NORAD_CAT_ID": "25544",
"EPOCH": "2024-01-01T12:00:00.000000",
"TLE_LINE1": "1 25544U 98067A 24001.50000000 .00016717 00000-0 10270-3 0 9997",
"TLE_LINE2": "2 25544 51.6400 208.9163 0006703 130.5360 325.0288 15.49560532 25006",
"INCLINATION": "51.6400",
"RA_OF_ASC_NODE": "208.9163",
"ECCENTRICITY": "0.0006703",
"ARG_OF_PERICENTER": "130.5360",
"MEAN_ANOMALY": "325.0288",
"MEAN_MOTION": "15.49560532",
"SEMIMAJOR_AXIS": "6796.148",
"PERIOD": "92.930",
"APOAPSIS": "422.566",
"PERIAPSIS": "413.455"
},
"cdms": [],
"fetchedAt": "2024-01-01T12:00:00.000Z",
"errors": {}
}- 503BOTH Space-Track sources failed — { error, detail }.
- 500Unexpected server error — { error, detail }.
- 429Rate limit exceeded (middleware, general bucket) — { error, retryAfterSeconds } + Retry-After.
Launch
/api/cola
Launch collision-avoidance (COLA) window screen
For every liftoff minute in the window, a simplified ascent model inserts the vehicle into the target orbit at T+9 min, 20° downrange in the plane through the pad, coasts it two-body for 20 min and screens it at 30 s steps against the catalog sample (±50 km altitude prefilter). Each minute is NO-GO (< 5 km), CAUTION (< 25 km) or GO; summary.nextClearWindow is the first run of consecutive GO minutes. Every model constant is returned in assumptions. 400 when the orbit's inclination is below the site latitude (no direct-ascent plane). Simplified model — not a range-safety COLA product. The compute budget sets truncated when it trips.
- sitequery · stringoptionalLaunch site: SLC-40 · Cape Canaveral SFS; LC-39A · Kennedy Space Center; SLC-4E · Vandenberg SFB; Starbase · Boca Chica.one of slc-40 · lc-39a · slc-4e · starbase — default slc-40 — e.g. slc-40
- orbitquery · stringoptionalTarget orbit: Starlink 550 km / 53° (Gen1 design shell); Starlink Gen2 530 km / 43°; ISS 420 km / 51.64°; SSO 560 km / 97.6°.one of starlink-550 · starlink-gen2-530 · iss · sso-560 — default starlink-550 — e.g. starlink-550
- minutesquery · integeroptionalLaunch-window length (minutes), one liftoff time per minute.one of 60 · 120 · 240 — default 120 — e.g. 120
- startquery · stringoptionalWindow start as an ISO-8601 date-time (YYYY-MM-DDTHH:MM[:SS]Z; no offset means UTC) within ±7 days of the request; rounded down to the minute. Defaults to now.max 64 chars — format date-time
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| site | query | string | no | Launch site: SLC-40 · Cape Canaveral SFS; LC-39A · Kennedy Space Center; SLC-4E · Vandenberg SFB; Starbase · Boca Chica. one of slc-40 · lc-39a · slc-4e · starbase — default slc-40 — e.g. slc-40 |
| orbit | query | string | no | Target orbit: Starlink 550 km / 53° (Gen1 design shell); Starlink Gen2 530 km / 43°; ISS 420 km / 51.64°; SSO 560 km / 97.6°. one of starlink-550 · starlink-gen2-530 · iss · sso-560 — default starlink-550 — e.g. starlink-550 |
| minutes | query | integer | no | Launch-window length (minutes), one liftoff time per minute. one of 60 · 120 · 240 — default 120 — e.g. 120 |
| start | query | string | no | Window start as an ISO-8601 date-time (YYYY-MM-DDTHH:MM[:SS]Z; no offset means UTC) within ±7 days of the request; rounded down to the minute. Defaults to now. max 64 chars — format date-time |
curl -s "https://space-debris-two.vercel.app/api/cola?site=slc-40&orbit=starlink-550&minutes=120"
{
"site": {
"id": "slc-40",
"label": "SLC-40 · Cape Canaveral SFS",
"latitudeDeg": 28.5619,
"longitudeDeg": -80.5772,
"heightKm": 0.003
},
"orbit": {
"id": "starlink-550",
"label": "Starlink 550 km / 53° (Gen1 design shell)",
"altitudeKm": 550,
"inclinationDeg": 53
},
"windowStart": "2024-01-01T12:00:00.000Z",
"windowEnd": "2024-01-01T14:00:00.000Z",
"stepMinutes": 1,
"minutes": [
{
"launchTime": "2024-01-01T12:00:00.000Z",
"status": "GO",
"minMissKm": 41.7,
"objectName": "STARLINK-3121",
"noradId": "53122",
"tca": "2024-01-01T12:21:30.000Z"
}
],
"candidatesScreened": 640,
"sampleSize": 2000,
"propagations": 183360,
"computeMs": 912,
"truncated": false,
"summary": {
"go": 117,
"caution": 3,
"noGo": 0,
"nextClearWindow": {
"start": "2024-01-01T12:00:00.000Z",
"minutes": 37
}
},
"assumptions": {
"insertionDelayS": 540,
"downrangeDeg": 20,
"screenAfterInsertionS": 1200,
"screenStepS": 30,
"altBandKm": 50,
"redKm": 5,
"yellowKm": 25
}
}- 400site / orbit / minutes not in the allowed sets, bad start, or an unreachable site-orbit pair — { error }.
- 500Space-Track fetch or screening failed — { error, detail }.
- 429Rate limit exceeded (middleware, expensive tier) — { error, retryAfterSeconds } + Retry-After.
Space weather
/api/spaceweather
Planetary Kp, F10.7 solar flux and LEO drag regime
Two public NOAA SWPC feeds (planetary K-index and F10.7 cm radio flux); each parser picks the NEWEST time tag. Derives the NOAA G-scale from Kp and a heuristic LEO atmospheric-drag regime (LOW | MODERATE | ELEVATED | HIGH | UNKNOWN). HTTP 200 when at least one feed parsed — the other feed's failure is in errors.
No parameters.
curl -s "https://space-debris-two.vercel.app/api/spaceweather"
{
"fetchedAt": "2024-01-01T12:00:00.000Z",
"kp": {
"value": 2.33,
"timeTag": "2024-01-01 09:00:00.000"
},
"f107": {
"value": 142,
"timeTag": "2024-01-01T20:00:00"
},
"gScale": "G0",
"dragRegime": "MODERATE",
"errors": {}
}- 503BOTH SWPC feeds failed — { error, detail }.
- 500Unexpected server error — { error, detail }.
- 429Rate limit exceeded (middleware, general bucket) — { error, retryAfterSeconds } + Retry-After.
Ops
/api/health
Subsystem health + live Space-Track request budget
Times one uncached limit-1 Space-Track gp query (ONLINE < 4 s, DEGRADED ≥ 4 s, OFFLINE on error/timeout), reports whether an Anthropic key is configured (NO API call is made), the serving region and instance uptime. spaceTrackBudget is recomputed on every response, even when the probe is cached. Never returns 500.
No parameters.
curl -s "https://space-debris-two.vercel.app/api/health"
{
"checkedAt": "2024-01-01T12:00:00.000Z",
"region": "iad1",
"uptimeSeconds": 812,
"spaceTrack": {
"status": "ONLINE",
"latencyMs": 640,
"newestEpoch": "2024-01-01T11:58:02.000000"
},
"anthropic": {
"status": "READY"
},
"spaceTrackCredentials": true,
"spaceTrackBudget": {
"requestsLastHour": 41,
"requestsLastMinute": 2,
"hourlyLimit": 300,
"perMinuteLimit": 30,
"lastLoginAt": "2024-01-01T11:31:09.000Z",
"sessionCookieAgeSeconds": 1731,
"sharedCacheEntries": 2,
"sharedCacheHits": 57,
"sharedCacheMisses": 6
}
}- 429Rate limit exceeded (middleware, general bucket) — { error, retryAfterSeconds } + Retry-After.
/api/openapi
This API as an OpenAPI 3.1 document
Machine-readable description of every route on this page, generated from the same endpoint list that renders /docs. Import it into Postman, Insomnia or an OpenAPI code generator.
No parameters.
curl -s "https://space-debris-two.vercel.app/api/openapi"
{
"openapi": "3.1.0",
"info": {
"title": "SpaceDebris API",
"version": "0.1.0"
},
"paths": {
"/api/debris": {
"get": {
"operationId": "getDebris"
}
}
}
}- 429Rate limit exceeded (middleware, general bucket) — { error, retryAfterSeconds } + Retry-After.