-
-
Notifications
You must be signed in to change notification settings - Fork 0
NASA API
SpaceEngineerSS edited this page Dec 18, 2025
·
1 revision
CosmoRisk uses the NASA NeoWs (Near Earth Object Web Service) API for real asteroid data.
- Visit api.nasa.gov
- Fill in your email
- Receive instant API key
- Free tier: 1,000 requests/hour
GET https://api.nasa.gov/neo/rest/v1/neo/browse
Returns paginated list of all known NEOs.
GET https://api.nasa.gov/neo/rest/v1/feed?start_date=YYYY-MM-DD&end_date=YYYY-MM-DD
Returns NEOs with close approaches in date range.
GET https://api.nasa.gov/neo/rest/v1/neo/{asteroid_id}
Returns detailed data for specific asteroid.
| Field | Description |
|---|---|
name |
Asteroid name/designation |
neo_reference_id |
Unique NASA ID |
absolute_magnitude_h |
Brightness (size indicator) |
estimated_diameter |
Size range in meters |
is_potentially_hazardous |
Boolean (MOID < 0.05 AU, H < 22) |
orbital_data |
Keplerian elements |
close_approach_data |
Future Earth encounters |
| Element | API Field |
|---|---|
| Semi-major axis (AU) | semi_major_axis |
| Eccentricity | eccentricity |
| Inclination (deg) | inclination |
| Longitude of Ascending Node | ascending_node_longitude |
| Argument of Perihelion | perihelion_argument |
| Mean Anomaly | mean_anomaly |
| Epoch | epoch_osculation |
| Tier | Limit |
|---|---|
| Free (DEMO_KEY) | 30 requests/hour |
| Free (with key) | 1,000 requests/hour |
| Enterprise | Contact NASA |
| Status | Meaning |
|---|---|
| 200 | Success |
| 403 | Invalid API key |
| 429 | Rate limit exceeded |
| 503 | Service unavailable |
CosmoRisk caches asteroid data locally to:
- Reduce API calls
- Enable offline viewing
- Improve performance
Cache is stored in application data directory.