Version: 1.0 (2021 August)
change log
Several SBDB-related APIs benefit by the ability to consider a filtered subset of the complete SBDB. This document details the common set of query parameters used in these APIs.
For more information about JPL’s SBDB, see this page from the SSD website.
Note that all parameter names are prefixed with sb-
to reduce the chance of
name conflicts with other API query parameters.
Parameter | Type | Allowable Values | Mode | Description |
---|---|---|---|---|
sb-ns | string | n ,u |
Q |
Numbered status: restrict query results to eher numbered (n ) or unnumbered (u ) small-bodies |
sb-kind | string | a ,c |
Q |
Limit results to either asteroids-only (a ) or comets-only (c ) |
sb-group | string | neo ,pha |
Q |
Limit results to NEOs-only (neo ) or PHAs-only (pha ) |
sb-class | string | see description | Q |
Limit results to small-bodies with orbits of the specified class (or classes). Allowable values are valid 3-character orbit-class codes (see section below on orbit classes). If specifying more than one class, separate entities with a comma (e.g., TJN,CEN ). Codes are case-sensitive. |
sb-sat | boolean | true or 1 , false or 0 |
Q |
Limit results to small-bodies with at least one known satellite. |
sb-xfrag | boolean | true or 1 , false or 0 |
Q |
Exclude all comet fragments (if any) from results. |
sb-cdata | string | see description | Q |
Custom field constraints. See section detailing this parameter below. Maximum length is 2048 characters. |
sb-defs | string | class ,field ,all |
I |
Return SBDB definitions and data related to available filter constraints. These data are typically only useful in supporting webpage apps. See “mode” I section below for details. |
Orbit class codes are listed in the table below, ordered by asteroids and increasing semimajor axis, then by comets.
The “Kind” column indicates whether the class is generally associated with asteroids or comets.
Those classes for which the object is not clearly associated with asteroids or comets is indicated with a blank value for “Kind”.
Comet class names with a trailing *
indicate a classical definition for that orbit class.
Orbit class codes are case-sensitive.
Code | Name | Kind | Description |
---|---|---|---|
IEO | Atira | asteroid | An asteroid orbit contained entirely within the orbit of the Earth (Q < 0.983 au). Also known as an Interior Earth Object |
ATE | Aten | asteroid | Near-Earth asteroid orbits similar to that of 2062 Aten (a < 1.0 au; Q > 0.983 au) |
APO | Apollo | asteroid | Near-Earth asteroid orbits which cross the Earth’s orbit similar to that of 1862 Apollo (a > 1.0 au; q < 1.017 au) |
AMO | Amor | asteroid | Near-Earth asteroid orbits similar to that of 1221 Amor (1.017 au < q < 1.3 au) |
MCA | Mars-crossing Asteroid | asteroid | Asteroids that cross the orbit of Mars constrained by (1.3 au < q < 1.666 au; a < 3.2 au) |
IMB | Inner Main-belt Asteroid | asteroid | Asteroids with orbital elements constrained by (a < 2.0 au; q > 1.666 au) |
MBA | Main-belt Asteroid | asteroid | Asteroids with orbital elements constrained by (2.0 au < a < 3.2 au; q > 1.666 au) |
OMB | Outer Main-belt Asteroid | asteroid | Asteroids with orbital elements constrained by (3.2 au < a < 4.6 au) |
TJN | Jupiter Trojan | asteroid | Asteroids trapped in Jupiter’s L4/L5 Lagrange points (4.6 au < a < 5.5 au; e < 0.3) |
AST | Asteroid | asteroid | Asteroid orbit not matching any defined orbit class |
CEN | Centaur | Objects with orbits between Jupiter and Neptune (5.5 au < a < 30.1 au) | |
TNO | TransNeptunian Object | Objects with orbits outside Neptune (a > 30.1 au) | |
PAA | Parabolic “Asteroid” | “Asteroids” (objects other than comets) on parabolic orbits (e = 1.0) | |
HYA | Hyperbolic “Asteroid” | “Asteroids” (objects other than comets) on hyperbolic orbits (e > 1.0) | |
ETc | Encke-type Comet | comet | Encke-type comet, as defined by Levison and Duncan (Tj > 3; a < aJ) |
JFc | Jupiter-family Comet | comet | Jupiter-family comet, as defined by Levison and Duncan (2 < Tj < 3) |
JFC | Jupiter-family Comet* | comet | Jupiter-family comet, classical definition (P < 20 y) |
CTc | Chiron-type Comet | comet | Chiron-type comet, as defined by Levison and Duncan (Tj > 3; a > aJ) |
HTC | Halley-type Comet* | comet | Halley-type comet, classical definition (20 y < P < 200 y) |
PAR | Parabolic Comet | comet | Comets on parabolic orbits (e = 1.0) |
HYP | Hyperbolic Comet | comet | Comets on hyperbolic orbits (e > 1.0) |
COM | Comet | comet | Comet orbit not matching any defined orbit class |
Orbit class descriptions above use the following symbols to indicate orbit parameters:
e
- eccentricityq
- perihelion distancea
- semimajor axisQ
- aphelion distanceP
- orbital periodTj
- Jupiter Tisserand parameteraJ
- Jupiter nominal semimajor axisCustom constraints provide a method of selecting only the objects of interest from the SBDB.
A constraint is defined for a specific SBDB field using a variety of forms.
For example, you might constrain the orbital inclination to be less than 8 degrees,
constrain the orbital semimajor axis to be between 3.1 and 9.9 au,
limit results to object for which a diameter is defined (i.e., exists in the SBDB),
and/or match objects with a designation matching 2018 L*
.
A constraint operator relates the field with user-specified values (limits, ranges, flags).
For example, the operator LT
says the field value must be less than the user-specified value.
Each constraint can be combined with other constraints using the appropriate logical operator
(either a logical AND
or a logical OR
).
The sections below provide a list of fields available for constraint, a list of constraint operators, constraint format specification, and some examples.
The following tables list fields available for use in custom field constraints.
Field names are case-sensitive.
Field Name | Type | Description |
---|---|---|
H | number | absolute magnitude (magnitude at 1 au from the Sun and the observer) |
G | number | magnitude slope parameter used in the standard asteroid H/G magnitude law |
M1 | number | comet total magnitude parameter |
K1 | number | comet nuclear magnitude parameter |
M2 | number | comet total magnitude slope parameter |
K2 | number | comet nuclear magnitude slope parameter |
PC | number | comet nuclear magnitude law - phase coefficient |
diameter | number | effective body diameter (km) |
extent | string | tri(or bi)-axial body dimensions (km) |
GM | number | mass expressed as a product of the mass “M” and gravitational constant “G” (km3/s2) |
density | number | bulk density (g/cm3) |
rot_per | number | body rotation period (synodic) (h) |
pole | string | spin-pole direction in R.A./Dec. (deg) |
albedo | number | geometric albedo |
BV | number | color index B-V |
UB | number | color index U-B |
IR | number | color index I-R |
spec_T | string | Tholen spectral taxonomic classification |
spec_B | string | SMASSII spectral taxonomic classification |
Field Name | Type | Description |
---|---|---|
e | number | eccentricity |
a | number | semimajor axis (au) |
q | number | perihelion distance (au) |
i | number | inclination (deg) |
om | number | longitude of the ascending node (deg) |
w | number | argument of perihelion (deg) |
ma | number | mean anomaly (deg) |
tp | number | time of perihelion passage in Julian day form (TDB) |
per | number | orbital period (d) |
n | number | mean motion (deg/d) |
ad | number | aphelion distance (au) |
sigma_e | number | 1-sigma uncertainty in the eccentricity |
sigma_a | number | 1-sigma uncertainty in the semimajor axis (au) |
sigma_q | number | 1-sigma uncertainty in the perihelion distance (au) |
sigma_i | number | 1-sigma uncertainty in the inclination (deg) |
sigma_om | number | 1-sigma uncertainty in the longitude of the ascending node (deg) |
sigma_w | number | 1-sigma uncertainty in the argument of perihelion (deg) |
sigma_tp | number | 1-sigma uncertainty in the time of perihelion passage (d) |
sigma_ma | number | 1-sigma uncertainty in the mean anomaly (deg) |
sigma_per | number | 1-sigma uncertainty in the period (d) |
sigma_n | number | 1-sigma uncertainty in the mean motion (deg/d) |
sigma_ad | number | 1-sigma uncertainty in the aphelion distance (au) |
t_jup | number | Jupiter Tisserand parameter |
moid | number | minimum distance between the orbits of Earth and the small-body (au) |
moid_jup | number | minimum distance between the orbits of Jupiter and the small-body (au) |
A1 | number | non-grav. radial parameter |
A2 | number | non-grav. transverse parameter |
A3 | number | non-grav. normal parameter |
DT | number | non-grav. peri.-maximum offset |
Field Name | Type | Description |
---|---|---|
condition_code | string | MPC “U” parameter: orbit uncertainty estimate 0-9, with 0 being good, and 9 being highly uncertain |
data_arc | number | number of days spanned by the observations used in the orbit determination |
n_obs_used | number | total number of observations of all types used in the orbit |
n_del_obs_used | number | number of radar delay observations used in the orbit |
n_dop_obs_used | number | number of radar Doppler observations used in the orbit |
two_body | string | flag (T or F ) indicating a low-precision two-body dynamic model was used in the OD |
source | string | code indicating the source of the orbit: ORB =”JPL orbit file”, MPC:mpn =”MPC numbered asteroid orbit file”, MPC:mpu =”MPC unnumbered asteroid multi-opposition orbit file”, MPC:mpo =”MPC single-opposition orbit file”, MPC:mp1 =”MPC single-opposition two-body dynamics orbit file” |
Field Name | Type | Description |
---|---|---|
field | type | description |
.
, sign -
or +
and exponent character e
or E
.
, -
, /
, :
, (
, )
, '
and `
.
, -
, +
, /
, :
, (
, )
, ^
, $
, \
, *
, [
, ]
, '
and `
Code | Description |
---|---|
EQ | equal |
NE | not equal |
LT | less than |
GT | greater than |
LE | less than or equal |
GE | greater than or equal |
RG | inclusive range: matches values greater than or equal to the minimum and less than or equal to the maximum |
RE | regular expression |
DF | the value is defined (not NULL) |
ND | the value is not defined (is NULL) |
The set of desired constraints are specified using the following JSON format. Examples of this constraint specification are given in the next section.
C-OBJ [,
C-OBJ]…
{
LOP :
[
CON [,
CON]…]
}
"AND"
or "OR"
"
FIELD|
OP[|
VALUE[|
VALUE2] ]"
DF
)RG
)Consider the following query where the desired set of small-bodies are constrained as follows.
C
as well as CDX:
)
spec_B
matches ^[CD]
OR spec_T
matches ^[CD]
( where ^[CD]
matches any string starting with C
or D
)BV IS DEFINED
OR UB IS DEFINED
OR IR IS DEFINED
i<10.5
6<=H<=7
diameter IS DEFINED
OR (albedo IS DEFINED
AND H IS DEFINED
)Each of these four conditions must be met which implies they should be combined with a logical AND. Here is the JSON-form of the above constraints.
{
"AND":[
{ "OR":["spec_B|RE|^[CD]","spec_T|RE|^[CD]"] },
{ "OR":["BV|DF","UB|DF","IR|DF"] },
"i|LT|10",
"H|RG|7|8",
{ "AND":["condition_code|EQ|0","source|EQ|ORB"] },
{ "OR":[ "diameter|DF",{ "AND":["albedo|DF","H|DF"] } ] }
]
}
In this example, limit results to small-bodies for which a rotation pole direction is available.
pole IS DEFINED
The JSON format in this example is as follows.
{ "AND" : [ "pole|DF" ] }
Note that even though there is only one constraint, we still require a logical operator
and a list of constraints.
In this example, the logical operator is effectively ignored
so "OR"
works just as well as "AND"
.
The constraint specification in JSON format must be converted into a URI-encoded string before being used in the API call. There are many tools available to convert an arbitrary string to a URI-encoded string.
Given this JSON-format constraint data
{ "AND" : [ "pole|DF" ] }
the corresponding URI-encoded string is as follows.
%7B%20%22AND%22%20%3A%20%5B%20%22pole%7CDF%22%20%5D%20%7D
With extraneous white-space removed (recommended best practice), the JSON becomes
{"AND":["pole|DF"]}
the corresponding URI-encoded string (as follows) is significantly shorter.
%7B%22AND%22%3A%5B%22pole%7CDF%22%5D%7D
I
: Definitions and InformationContainer for all sections is sb_defs
Sample Output Sections:
"class" : [
{ "code" : "AMO",
"kind" : "A",
"title" : "Amor",
"description" : "Near-Earth asteroid orbits similar to that of 1221 Amor (1.017 au < q < 1.3 au)."
},
{ "code" : "PAR",
"kind" : "C",
"title" : "Parabolic Comet",
"description" : "Comets on parabolic orbits (e = 1.0)."
},
...
]
"field" : {
"object" : {
"field_label" : "Object Fields",
"constraint_label" : null,
"list" : [
FIELD_INFO_RECORD,
...
]
},
"orbit" : {
"field_label" : "Orbit and Model Parameter Fields",
"constraint_label" : "Orbital Parameter",
"list" : [
FIELD_INFO_RECORD,
...
]
},
"phys_par" : {
"field_label" : "Physical Parameter Fields",
"constraint_label" : "Physical Parameter",
"list" : [
FIELD_INFO_RECORD,
...
]
}
FIELD_INFO_RECORD
example:
{
"name" : "IR",
"title" : "I-R",
"description" : "color index I-R",
"units" : "mag",
"is_numeric" : "Y",
"is_constraint" : "Y",
"align_comp" : null,
"align_full" : "C"
}
RE
Regular expressions provide a subset of those specified in Henry Spencer’s implementation. See the regex(7) man-page for more details.
Only the characters from the following subset are allowed in regular expressions.
0
-9
]A
-Z
] and [a
-z
]^
, $
, .
, *
, ?
, +
, :
, <
, >
, (
, )
, [
, ]
, '
, ` ``, /
, \
Special characters and constructs:
character/construct | description |
---|---|
^ |
If ‘^’ is the first character of a regular expression, then it anchors the regular expression to the beginning of a line. |
$ |
If ‘$’ is the last character of a regular expression, it anchors the regular expression to the end of a line. |
. |
Matches any single character. |
* |
Matches the single character regular expression or subexpression immediately preceding it zero or more times. |
? |
Optionally matches the single character regular expression or subexpression immediately preceding it. |
+ |
Matches the single character regular expression or subexpression immediately preceding it one or more times. |
| |
Matches either the expression before or after | . |
[8G-J] |
Matches any of the characters 8 , G , H , I , J . If prefixed by ^ , then negate the matching set of characters (e.g., [^8G-J] ). |
[[:<:]] |
Match the beginning of a “word”. A “word” is a sequence of alphanumeric characters including underbar _ . Any non-word character including the beginning and end of the string marks the word boundary. |
[[:>:]] |
Match the end of a “word”. See description above. |