| description | Search for stars and deep space objects. |
|---|---|
| layout | editorial |
Search endpoint can be used to get information for stars and deep space objects.
The response of this endpoint is an array of objects which is representing the results. Depending on the matching criteria, the resulting items could be of object type star or a deep space object.
See Search Result Properties for information on response object details.
{% swagger baseUrl="https://api.astronomyapi.com" path="/api/v2/search" method="get" summary="Get available bodies" %} {% swagger-description %} Returns a list of results based on the requested query {% endswagger-description %}
{% swagger-parameter in="header" name="Authorization" type="string" required="true" %} Basic {% endswagger-parameter %}
{% swagger-parameter in="query" name="term" type="string" required="true" %} Search term. Conditionally required if
ra
and
dec
values are not provided for area search. {% endswagger-parameter %}
{% swagger-parameter in="query" name="match_type" type="string" required="true" %} Matching algorithm. Valid values are
fuzzy
or
exact
. A fuzzy match will return results starting with the given term while an exact match will exactly match the term. Defaults to
fuzzy
. Optional for term search. {% endswagger-parameter %}
{% swagger-parameter in="query" name="ra" type="string" required="true" %} Right ascension value to search around. Must be a decimal value as a string representation. Required if
dec
value is provided. {% endswagger-parameter %}
{% swagger-parameter in="query" name="dec" type="string" required="true" %} Declination value to search around. Must be a decimal value as a string representation. Required if
ra
value is provided. {% endswagger-parameter %}
{% swagger-parameter in="query" name="limit" type="string" required="false" %} How many records to return in the request. {% endswagger-parameter %}
{% swagger-parameter in="query" name="offset" type="string" required="false" %} Use offset to paginate the results. 0 will return the first page, adding the limit to the offset will return the next page. {% endswagger-parameter %}
{% swagger-parameter in="query" name="order_by" type="string" required="false" %} Order the results by the field. The supported value is
name
. Does not support during an area search. {% endswagger-parameter %}
{% swagger-response status="200: OK" description="The response with the term as " %}
{
"meta": {
"limit": 10,
"offset": 0
},
"data": [
{
"id": "f9ea7803-44d6-56ea-a4c5-714d74d31237",
"name": "Orion Nebula",
"type": {
"id": "SNR",
"name": "Super Nova Remnant"
},
"subType": {
"id": "EN+RN"
},
"crossIdentification": [
{
"name": "M 42",
"catalogId": "M"
},
{
"name": "NGC 1976",
"catalogId": "NGC"
},
{
"name": "LBN 974",
"catalogId": "LBN"
},
{
"name": "Orion Nebula",
"catalogId": null
},
{
"name": "Great Orion Nebula",
"catalogId": null
}
],
"position": {
"equatorial": {
"rightAscension": {
"hours": "5.59",
"string": "05h 35m 24s"
},
"declination": {
"degrees": "-4.61",
"string": "-5° 23' 24\""
}
},
"constellation": {
"id": "ori",
"short": "Ori",
"name": "Orion"
}
}
}
]
}{% endswagger-response %} {% endswagger %}
Search API can only be used for searching stars and deep space objects. For searching for planets use the positions API instead. For a list of DOS types see DSO enums
The following object catalogs are available for searching. Please note all objects may not be present in the database for some catalogs.
| ID | Name |
|---|---|
| LBN | Lynds' Catalogue of Bright Nebulae |
| NGC | The New General Catalogue |
| HCG | A Hickson Compact Group |
| ZWG | The Catalogue of Galaxies and Clusters of Galaxies |
| HR | Revised Harvard Photometry |
| IC | Index Catalogue |
| UGC | The Uppsala General Catalogue of Galaxies |
| KUG | The Kiso Ultraviolet Galaxy Catalogue |
| FCC | A Catalogue and Photometric Properties of Galaxies |
| DDO | David Dunlap Observatory Catalogue |
| ARP | The Atlas of Peculiar Galaxies |
| MCG | Morphological Catalogue of Galaxies |
| ESO | The European Southern Observatory Catalogue |