Skip to content

NEOCP Observations API

The NEOCP Observations API returns observational data for objects currently on the Near-Earth Object Confirmation Page (NEOCP).

Endpoint

https://data.minorplanetcenter.net/api/get-obs-neocp

Method: GET

Parameters

Parameter Type Required Description Default
trksubs List of one single string Yes Tracklet identifier (trksub) on the NEOCP None
output_format List of strings No Output format(s): XML, ADES_DF, OBS_DF, OBS80 XML
ades_version String No ADES version: 2017 or 2022 2022

Note

Only objects currently on the NEOCP can be queried. For confirmed objects, use the Observations API.

Output Formats

Format Type Description
XML String Observations in ADES XML format
OBS80 String Observations in MPC1992 80-column format
ADES_DF List of dicts Dictionary representation of ADES values
OBS_DF List of dicts Dictionary representation of 80-column format

Examples

Note

These examples use tracklet IDs that may no longer be on the NEOCP. Replace with a current tracklet from the NEOCP.

Python - XML Format

import requests

response = requests.get(
    "https://data.minorplanetcenter.net/api/get-obs-neocp",
    json={"trksubs": ["A118xu6"], "output_format": ["XML"]}
)
response.raise_for_status()
xml_string = response.json()[0]['XML']
print(xml_string)

Python - MPC1992 80-column Format

import requests

response = requests.get(
    "https://data.minorplanetcenter.net/api/get-obs-neocp",
    json={"trksubs": ["xkos423"], "output_format": ["OBS80"]}
)
response.raise_for_status()
obs80_string = response.json()[0]['OBS80']
print(obs80_string)

Output:

     xkos423 1B2024 07 15.81527220 06 39.103-56 39 51.72         19.2 VZ     M49
     xkos423 1B2024 07 15.82485020 06 23.639-56 39 28.20         19.5 VZ     M49
...

Python - ADES and MPC1992 data in Pandas DataFrame

import requests
import pandas as pd

response = requests.get(
    "https://data.minorplanetcenter.net/api/get-obs-neocp",
    json={"trksubs": ["xkos423"], "output_format": ["ADES_DF", "OBS_DF"]}
)
response.raise_for_status()
ades_df = pd.DataFrame(response.json()[0]['ADES_DF'])
obs_df = pd.DataFrame(response.json()[0]['OBS_DF'])
print(ades_df)
print(obs_df)

cURL

curl -X GET -H "Content-Type: application/json" \
  -d '{"trksubs": ["SWC0732"]}' \
  https://data.minorplanetcenter.net/api/get-obs-neocp

See Also