Skip to content
Open
Binary file added docs-public/docs/images/download.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs-public/docs/images/mpc-logo.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 0 additions & 13 deletions docs-public/docs/mpc-ops-docs/apis.md

This file was deleted.

79 changes: 79 additions & 0 deletions docs-public/docs/mpc-ops-docs/apis/action-codes-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Action Codes API

Action codes are automatically generated and sent to the submitters of new NEO and new comet candidates as well as to the NEO/NEOPC follow-up reporters. Action codes are used to retract or replace submitted observations. The Action Codes API allows you to request that your action codes be resent to your original email address. The codes can then be used at the [MPC action codes submission page](https://www.minorplanetcenter.net/submit_action_code).

## Endpoint

```
https://data.minorplanetcenter.net/api/action-codes/retrieve
```

**Method:** POST

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `label` | String | Yes | Identifier for the submission |

### Label Formats

The following identifier formats are accepted:

| Format | Example | Regex | Description |
|--------|---------|-------|-------------|
| trksub | `A10cnQO` | `^[-A-Za-z0-9_]{1,8}$` | Tracklet submission ID (1-8 alphanumeric characters) |
| trkid | `00000DwbEz` | `^[-A-Za-z0-9_]{8,12}$` | Track ID (8-12 alphanumeric characters) |
| submission block id | `2024-05-02T21:03:35.001_0000FzZw_01` | `^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-6]\d\.\d{3}_\w{8}_\d{2}$` | Full submission block identifier |
| submission id | `2024-05-02T21:03:35.001_0000FzZw` | `^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-6]\d\.\d{3}_\w{8}$` | Submission identifier |

## Response

The response will be intentionally minimal (vacuous), but you should expect that an email was sent to the original submitter's address.

**Important:** Action codes are sent via email to the original submitter's email address. They are NOT returned in the API response.

## Examples

### Python

```python
import requests
import json
import sys

terms = {'label': '[your-label]'}
response = requests.post(
"https://data.minorplanetcenter.net/api/action-codes/retrieve",
json=terms
)
response.raise_for_status()
json.dump(response.json(), sys.stdout, indent=4) # Response is minimal
```

### curl

```bash
curl -X POST -H "Accept: application/json" \
https://data.minorplanetcenter.net/api/action-codes/retrieve \
-H "Content-type: application/json" \
-d '{"label": "[your-label]"}'
```

## What Are Action Codes?

Action Codes are sent to users who submit observations with email addresses on file. They allow you to:

- Retract (delete) submitted observations
- Replace observations with corrected versions
- Prove ownership of submissions

If you've lost your action code, this API allows you to have it resent to your original email address.

## Using Action Codes

After receiving your action code, you can use it at the [MPC Action Codes Submission Page](https://www.minorplanetcenter.net/submit_action_code).

## See Also

- [MPC Action Codes Submission Page](https://www.minorplanetcenter.net/submit_action_code)
95 changes: 95 additions & 0 deletions docs-public/docs/mpc-ops-docs/apis/cnd-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Check Near-Duplicates (CND) API

The Check Near-Duplicates API identifies observations in the MPC database that are potential duplicates of observations you provide. This helps detect duplicate submissions before they enter the database.

## Endpoint

```
https://data.minorplanetcenter.net/api/cnd
```

**Method:** GET

## Parameters

| Parameter | Type | Required | Description | Default |
|-----------|------|----------|-------------|---------|
| `obs` | List of strings | Yes | 80- or 160-character observation records in MPC format | None |
| `time_separation_s` | Float | No | Temporal threshold (0-60 seconds) | 60 |
| `angle_separation_arcsec` | Float | No | Spatial threshold (0-10 arcseconds) | 5 |
| `omit_separation` | Boolean | No | Exclude separation values from results | false |

**Limits:**

- Up to 10,000 observations per request
- Searches against publicly published MPC observations only

## Response Format

The response contains:

| Field | Description |
|-------|-------------|
| `request` | Echo of the original query parameters |
| `results` | Dictionary mapping each input observation to matching near-duplicates |

Each match includes:

| Field | Type | Description |
|-------|------|-------------|
| `obs80` | String | The near-duplicate observation record |
| `time_separation_s` | Float | Temporal gap in seconds |
| `angle_separation_arcsec` | Float | Angular distance in arcseconds |

## Examples

### Python

```python
import requests

obs_list = [
" K10CM6D C2023 05 16.43686615 56 36.807-23 12 43.67 21.55wX~6o8oF51"
]

request = {
'obs': obs_list,
'time_separation_s': 60,
'angle_separation_arcsec': 5
}

response = requests.get("https://data.minorplanetcenter.net/api/cnd", json=request)

if response.ok:
result = response.json()
for obs_query, matches in result.get('results', {}).items():
if matches:
print(f"Found {len(matches)} near-duplicate(s)")
for match in matches:
print(f" Time: {match['time_separation_s']}s")
print(f" Angle: {match['angle_separation_arcsec']} arcsec")
else:
print("No duplicates found")
else:
print("Error:", response.status_code)
```

### curl

```bash
curl -X GET -H "Accept: application/json" \
https://data.minorplanetcenter.net/api/cnd \
-H "Content-type: application/json" \
-d '{"obs": [" K10CM6D C2023 05 16.43686615 56 36.807-23 12 43.67 21.55wX~6o8oF51"]}'
```

## Use Cases

- Check if observations have already been submitted to the MPC
- Identify potential duplicate observations in your data before submission
- Verify that your observations are unique

## Notes

- Exact matches may occasionally show non-zero angular separation values. This is due to the numerical difference between the RA/dec values stored in the database and those given in the obs80 string.
- The matching criteria require both time AND angle thresholds to be satisfied
122 changes: 122 additions & 0 deletions docs-public/docs/mpc-ops-docs/apis/designation-identifier-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# Designation Identifier API

The Designation Identifier API returns information about the various designations assigned to any given object.

## Endpoint

```
https://data.minorplanetcenter.net/api/query-identifier
```

**Method:** GET

## Parameters

You can search for up to 100 designations at once. The response will be a dictionary of results, using the input IDs as keys.

Input search terms can be any of the following (you may mix and match):

1. **Unpacked Provisional Designations:** `1984 KB`, `A/2017 U1`, `S/1900 J 10`
2. **Packed Provisional Designations:** `J84K00B`, `AK17U010`, `SJ00J100`
3. **Names:** `Jason`, `ʻOumuamua`, `Lysithea`
4. **Permanent IDs:** `6063`, `1I`, `Jupiter X`
5. **Packed Permanent IDs:** `06063`, `0001I`, `J010S`

### Fuzzy Name Searching

For name searches, you can use comparison operators:

| Operator | Description |
|----------|-------------|
| `=` | Exact match |
| `ILIKE` | Case-insensitive partial match |
| `%` | Wildcard/similar to |

You can also filter by group: `Minor Planets`, `Natural Satellites`, `Comets`, `Interstellar`

## Response Fields

| Field | Type | Description |
|-------|------|-------------|
| `found` | Integer | 0 if no match, 1 if found, >1 if disambiguation needed |
| `object_type` | List | [String name, Numeric index] |
| `orbfit_name` | String | Orbfit-friendly ID (IAU designation without spaces) |
| `name` | String | Object name (if assigned) |
| `citation` | String | Citation text (if assigned) |
| `iau_designation` | String | IAU designation |
| `permid` | String | Permanent ID |
| `packed_permid` | String | Packed permanent ID |
| `packed_primary_provisional_designation` | String | Packed primary provisional designation |
| `packed_secondary_provisional_designations` | List[str] | Packed secondary designations |
| `unpacked_primary_provisional_designation` | String | Unpacked primary provisional designation |
| `unpacked_secondary_provisional_designations` | List[str] | Unpacked secondary designations |
| `disambiguation_list` | List[dict] | Populated when multiple matches found |

## Examples

### Python - Basic Query

```python
import requests
import json

my_list = {"ids": ["Ceres", "2020 AB1"]}
response = requests.get("https://data.minorplanetcenter.net/api/query-identifier", json=my_list)
response.raise_for_status()
print(json.dumps(response.json(), indent=4))
```

**Output:**

```json
{
"2020 AB1": {
"citation": null,
"disambiguation_list": null,
"found": 1,
"iau_designation": "2020 AB1",
"name": null,
"object_type": ["Minor Planet", 0],
"orbfit_name": "2020AB1",
"packed_permid": null,
"packed_primary_provisional_designation": "K20A01B",
"packed_secondary_provisional_designations": ["K16D00O"],
"permid": null,
"unpacked_primary_provisional_designation": "2020 AB1",
"unpacked_secondary_provisional_designations": ["2016 DO"]
},
"Ceres": {
"citation": null,
"disambiguation_list": null,
"found": 1,
"iau_designation": "1",
"name": "Ceres",
"object_type": ["Minor Planet", 0],
"orbfit_name": "1",
"packed_permid": "00001",
"packed_primary_provisional_designation": "I01A00A",
"packed_secondary_provisional_designations": ["I99O00F", "J43X00B"],
"permid": "1",
"unpacked_primary_provisional_designation": "A801 AA",
"unpacked_secondary_provisional_designations": ["A899 OF", "1943 XB"]
}
}
```

### Python - Fuzzy Name Search

```python
import requests
import json

req = {"ids": ["Boriso"], "comparison": "%", "group": "Minor Planets"}
response = requests.get("https://data.minorplanetcenter.net/api/query-identifier", json=req)
response.raise_for_status()
print(json.dumps(response.json(), indent=4))
```

This returns a disambiguation list for minor planets with names similar to 'Boriso'.

## See Also

- [PostgreSQL Pattern Matching Documentation](https://www.postgresql.org/docs/current/functions-matching.html)
17 changes: 17 additions & 0 deletions docs-public/docs/mpc-ops-docs/apis/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# MPC APIs

This page provides links to documentation for the MPC's REST APIs.

<div id="contents-grid"></div>

- [WAMO (Where Are My Observations)](wamo-api.md)
- [Submission Status](submission-status-api.md)
- [Designation Identifier](designation-identifier-api.md)
- [Observations](observations-api.md)
- [NEOCP Observations](neocp-observations-api.md)
- [Check Near-Duplicates (CND)](cnd-api.md)
- [Orbits](orbits-api.md)
- [Observatory Codes](obscodes-api.md)
- [MPECs](mpecs-api.md)
- [Action Codes](action-codes-api.md)
- [Lists of Objects](list-api.md)
Loading
Loading