Minor Planet Center API

Beginner's Pick Science & Math / No Auth Required Beginner HTTP
Free to Use
58 C
Measured Score 0 50 100 Speed 18/30 Consistency 17/20 Security 0/20 Browser access 15/15 Transparency 8/15 TESTED 2026-08-10

Overview

The Minor Planet Center API (via Asterank) gives you access to data about asteroids, comets, and other small solar system bodies. It returns orbital parameters, estimated value, and other scientific data in an easy-to-use format. No API key is needed, making it a great choice for space enthusiasts learning to work with astronomical data.

Beginner Tip

Use the "limit" query parameter to keep initial responses small — start with limit=5 so you can read through the JSON structure without being overwhelmed.

Measurement Record

What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.

Request
GET http://www.asterank.com/api/mpc?query={%22e%22:{%22%24lt%22:0.1}}&limit=5
Result
HTTP 200 · application/json · 1,857 bytes · compressed
Response time
211 ms (median of 3) · fastest 199 ms
Browser CORS
Allowed — Access-Control-Allow-Origin: *
Served by
cloudflare
Recorded
2026-08-10

Fields Returned

Top-level fields present in the response we captured, with the type and value we actually received.

Field Type Value received
rms number 0.6
epoch string K194R
readable_des string (1) Ceres
H number 3.34
num_obs integer 6725
ref string MPO452155
G number 0.12
last_obs string 20180430
comp string MPCLINUX
M number 77.37215
U string
e number 0.0760091
a number 2.7691652
om number 80.30553

Captured Response

Captured from a real request to http://www.asterank.com/api/mpc?query={%22e%22:{%22%24lt%22:0.1}}&limit=5 on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.

JSON Response · Captured
[
  {
    "rms": 0.6,
    "epoch": "K194R",
    "readable_des": "(1) Ceres",
    "H": 3.34,
    "num_obs": 6725,
    "ref": "MPO452155",
    "G": 0.12,
    "last_obs": "20180430",
    "comp": "MPCLINUX  ",
    "M": 77.37215,
    "U": " ",
    "e": 0.0760091,
    "a": 2.7691652,
    "om": 80.30553,
    "…": "(8 more fields)"
  }
]

Field Reference

a Semi-major axis of the orbit in astronomical units (AU).
e Orbital eccentricity — 0 is a perfect circle, closer to 1 means more elliptical.
H Absolute magnitude, used to estimate the size of the object.

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "http://www.asterank.com/api/mpc?query={%22e%22:{%22%24lt%22:0.1}}&limit=5";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

How This API Fails

We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.

HTTP 404 Requesting a path that does not exist text/html

Returned an HTML error page rather than JSON — worth knowing if your client assumes every response can be parsed as JSON.

HTTP 500 Sending an invalid value for "query" application/json
{
  "error": "bad request"
}

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

Empty array response [] The MongoDB-style query filter did not match any records.
Check your query syntax. Use simple filters like {"e":{"$lt":0.1}} (eccentricity less than 0.1) as a starting point.
Connection timeout The server may be temporarily unavailable or slow due to high load.
Wait a moment and retry. Add a longer timeout to your request if scripting: curl --max-time 30.
Invalid JSON in query parameter The query string is not properly URL-encoded or is malformed JSON.
URL-encode curly braces and quotes, or use a library like requests in Python which handles encoding automatically.

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 18/30
Consistency 17/20
Security 0/20
Browser access 15/15
Transparency 8/15
Endpoint Response Time 211ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth No Auth
HTTPS NO
CORS UNKNOWN
Category Science & Math
Difficulty Beginner
Endpoint last called: 2026-08-10

Related Tags

Similar APIs

View All →