Minor Planet Center API

Overview

Asterank offers a database API for the Minor Planet Center's MPCORB.DAT data files. This API is a simple way to quickly apply constraints to a set of over 600,000 asteroids. Users can construct queries with specific constraints across all data attributes recorded by the MPC. Information is updated nightly from the MPC's MPCORB.dat dataset.

The database queries are based on mongodb's json-formatted 'find' operation. See below for an example of a complex query.

Format

Requests are of the form:

http://asterank.com/api/mpc?query={query}&limit={limit}

MPC results are parsed per the orbit format specified here. In some cases, a field may not be present in the results if it was not present in MPCORB.dat.

Sample Requests

List all asteroids

This sample request lists all asteroids. The query and limit parameters are optional:

http://asterank.com/api/mpc

Results:

[
   {
      "rms":0.6,
      "epoch":"K134I",
      "readable_des":"(1) Ceres",
      "H":3.34,
      "num_obs":6342,
      "ref":"MPO247369",
      "G":0.12,
      "last_obs":"20121203",
      "comp":"MPCLINUX  ",
      "M":327.85412,
      "U":" ",
      "e":0.0761669,
      "a":2.767993,
      "om":80.33008,
      "pert_p":"30h",
      "d":0.2140211,
      "i":10.59423,
      "des":"00001",
      "flags":"0000",
      "num_opp":100,
      "w":72.16707,
      "pert_c":"M-v"
   },
   ...
]
  

A more complicated query

query takes a JSON object that uses the MongoDB query language. Specifically, it can be treated like a find() operation.

For example, let's build a request that returns 10 asteroids with roughly circular orbits, low inclination, and semi-major axis less than 1.5 AU.

We construct the following query:

{
   "e":{
      "$lt":0.1
   },
   "i":{
      "$lt":4
   },
   "a":{
      "$lt":1.5
   }
}
  

In plain English, we filter objects by the following conditions:

Finally, put it in our API request:

http://asterank.com/api/mpc?query={"e":{"$lt":0.1},"i":{"$lt":4},"a":{"$lt":1.5}}&limit=10

Results:

[
   {
      "rms":0.52,
      "epoch":"K134I",
      "readable_des":"(138911) 2001 AE2",
      "H":19.1,
      "num_obs":366,
      "ref":"MPO229693",
      "G":0.15,
      "last_obs":"20120417",
      "comp":"MPCLINUX  ",
      "M":199.38482,
      "U":" ",
      "e":0.0816832,
      "a":1.3496897,
      "om":171.48693,
      "pert_p":"38h",
      "d":0.62856933,
      "i":1.66115,
      "des":"D8911",
      "flags":"0804",
      "num_opp":8,
      "w":43.09756,
      "pert_c":"M-v"
   },
   {
      "rms":0.5,
      "epoch":"K134I",
      "readable_des":"(163000) 2001 SW169",
      "H":19.0,
      "num_obs":429,
      "ref":"MPO232154",
      "G":0.15,
      "last_obs":"20120506",
      "comp":"MPCLINUX  ",
      "M":157.71014,
      "U":" ",
      "e":0.0515752,
      "a":1.2484544,
      "om":8.4609,
      "pert_p":"38h",
      "d":0.70655345,
      "i":3.55425,
      "des":"G3000",
      "flags":"0804",
      "num_opp":5,
      "w":284.78542,
      "pert_c":"M-v"
   },
   ...
]