TL;DR
The Asterank Minor Planet Center API provides a MongoDB-powered query interface to the MPC's comprehensive database of over 600,000 known asteroids and minor planets. Search by orbital parameters, limit results, and retrieve JSON with semi-major axis, eccentricity, inclination, orbital period, albedo, diameter estimates, and absolute magnitude. No API key needed. This is the same data used by NASA's planetary defense coordination office for near-Earth object tracking.
Quick start: http://asterank.com/api/mpc?limit=10
No API key needed — data courtesy of the MPC!
Getting Orbital Data
1. Fetch Recent Asteroids
http://asterank.com/api/mpc?limit=10
Returns 10 asteroids with full orbital parameters: a (semi-major axis in AU), e (eccentricity), i (inclination in degrees), H (absolute magnitude), diameter (estimated km), and albedo.
2. Query by Orbital Characteristics
Find near-Earth asteroids (eccentricity > 0.5, semi-major axis < 2 AU):
http://asterank.com/api/mpc?query={"e":{"$gte":0.5},"a":{"$lte":2}}&limit=20
The query parameter accepts MongoDB query operators: $gte (greater or equal), $lte (less or equal), $gt, $lt.
3. JavaScript — Find Large Near-Earth Objects
const query = JSON.stringify({
"e": {"$gte": 0.5},
"diameter": {"$gte": 1},
"a": {"$lte": 1.5}
});
fetch(`http://asterank.com/api/mpc?query=${encodeURIComponent(query)}&limit=50`)
.then(r => r.json())
.then(asteroids => {
asteroids.forEach(a => {
console.log(`${a.principal_desig || 'Unknown'}:`,
`diameter=${a.diameter}km,`,
`orbit=${a.a}AU,`,
`albedo=${a.albedo}`);
});
});
4. Python — Query by Albedo
import requests, json
query = json.dumps({"albedo": {"$gte": 0.3}, "e": {"$lte": 0.1}})
r = requests.get('http://asterank.com/api/mpc',
params={'query': query, 'limit': 5})
data = r.json()
for ast in data:
print(f"Designation: {ast.get('principal_desig', 'N/A')}")
print(f" Diameter: {ast.get('diameter', '?')} km")
print(f" Orbit: {ast.get('a', '?')} AU")
http://asterank.com/api/mpc?limit=10
Frequently Asked Questions
- How many asteroids are in the database?
- Over 600,000 known minor planets, including near-Earth objects, main-belt asteroids, Jupiter Trojans, and trans-Neptunian objects.
- What orbital parameters can I query?
- All standard MPC fields:
a(semi-major axis AU),e(eccentricity),i(inclination deg),node,per(perihelion),epoch,H(abs magnitude),diameter(km), andalbedo. - Can I search by asteroid name or number?
- The query API does not directly support name search. Use
query={"principal_desig":"Ceres"}to search by principal designation. - How are diameters estimated?
- Diameters are calculated from absolute magnitude (H) and albedo. Where albedo is unknown, a default value is assumed, so diameter estimates have some uncertainty.
- Is this the same data NASA uses?
- Yes — the MPC is the official international body that catalogs minor planets. NASA's JPL Small-Body Database uses the same source data.
- Can I get data for all asteroids at once?
- The API is designed for queries with limits. For bulk access, the MPC provides full database downloads separately from their website.
API Details
- API URL
http://asterank.com/api/mpc- Documentation
- asterank.com/mpc
- Category
- Science
- Authentication
- Not Required
- Geographic Coverage
- Global — entire solar system minor planet catalog
- Response Format
- JSON — array of asteroid objects with orbital parameters
What You Can Build
- Near-Earth object tracking dashboard with orbital visualization
- Classroom tool for teaching Keplerian orbital elements
- Asteroid mining feasibility analyzer by albedo and orbit
- Solar system simulation pulling real asteroid positions
- Data sonification project mapping orbital eccentricities to music