Documentation_ | Blog_ | View on Github_ | Download Stable ZIP_ | Download Stable TAR_

.. image:: :target: :alt: Latest PyPI version

.. image:: :target: :alt: Documentation Status

.. image:: :target: :alt: Github Actions CI Status

.. image:: :target: :alt: Coverage results

.. image:: :target: :alt: Zenodo

================================== Accessing Online Astronomical Data ==================================

Astroquery is an astropy <>_ affiliated package that contains a collection of tools to access online Astronomical data. Each web service has its own sub-package. For example, to interface with the SIMBAD website <>_, use the simbad sub-package:

.. code-block:: python

>>> from astroquery.simbad import Simbad
>>> theta1c = Simbad.query_object('tet01 Ori C')
>>> theta1c.pprint()
   MAIN_ID          RA           DEC      ... COO_QUAL COO_WAVELENGTH     COO_BIBCODE
------------- ------------- ------------- ... -------- -------------- -------------------
* tet01 Ori C 05 35 16.4637 -05 23 22.848 ...        A              O 2007A&A...474..653V

Installation and Requirements

Astroquery works with Python 3.7 or later. As an astropy_ affiliate, astroquery requires astropy_ version 4.0 or later.

astroquery uses the requests <>_ module to communicate with the internet. BeautifulSoup <>_ and html5lib' <>_ are needed for HTML parsing for some services. The keyring <>_ module is also required for accessing services that require a login. These can all be installed using pip <>_ or anaconda <>. Running the tests requires curl <> to be installed.

The latest version of astroquery can be conda installed:

.. code-block:: bash

$ conda install -c conda-forge astroquery

or pip installed:

.. code-block:: bash

$ pip install --pre astroquery

and the 'bleeding edge' main version:

.. code-block:: bash

$ pip install

or cloned and installed from source:

.. code-block:: bash

$ # If you have a github account:
$ git clone [email protected]:astropy/astroquery.git
$ # If you do not:
$ git clone
$ cd astroquery
$ python install

Using astroquery

Importing astroquery on its own doesn't get you much: you need to import each sub-module specifically. Check out the docs_ to find a list of the tools available. The API_ shows the standard suite of tools common to most modules, e.g. query_object and query_region.

To report bugs and request features, please use the issue tracker. Code contributions are very welcome, though we encourage you to follow the API_ and contributing guidelines <>_ as much as possible.

List of Modules

The following modules have been completed using a common API:

  • ALMA Archive <>_
  • Atomic Line List <>_: A collection of more than 900,000 atomic transitions.
  • Besancon <>_: Model of stellar population synthesis in the Galaxy.
  • CDS MOC Service <>_: A collection of all-sky survey coverage maps.
  • CADC <>_: Canadian Astronomy Data Centre.
  • CASDA <>_: CSIRO ASKAP Science Data Archive.
  • ESASky <>_: ESASky is a science driven discovery portal providing easy visualizations and full access to the entire sky as observed with ESA Space astronomy missions.
  • ESO Archive <>_
  • FIRST <>_: Faint Images of the Radio Sky at Twenty-cm. 20-cm radio images of the extragalactic sky from the VLA.
  • Gaia <>_: European Space Agency Gaia Archive.
  • ESA XMM <>_: European Space Agency XMM-Newton Science Archive.
  • ESA Hubble <>_: European Space Agency Hubble Science Archive.
  • ESA ISO <>_: European Space Agency ISO Data Archive.
  • GAMA database <>_
  • Gemini <>_: Gemini Archive.
  • HEASARC <>_: NASA's High Energy Astrophysics Science Archive Research Center.
  • IBE <>_: IRSA Image Server program interface (IBE) Query Tool provides access to the 2MASS, WISE, and PTF image archives.
  • IRSA <>_: NASA/IPAC Infrared Science Archive. Science products for all of NASA's infrared and sub-mm missions.
  • IRSA dust <>_: Galactic dust reddening and extinction maps from IRAS 100 um data.
  • MAGPIS <>_: Multi-Array Galactic Plane Imaging Survey. 6 and 20-cm radio images of the Galactic plane from the VLA.
  • MAST <>_: Barbara A. Mikulski Archive for Space Telescopes.
  • Minor Planet Center <>_
  • NASA ADS <>_: SAO/NASA Astrophysics Data System.
  • NED <>_: NASA/IPAC Extragalactic Database. Multiwavelength data from both surveys and publications.
  • NIST <>_: National Institute of Standards and Technology (NIST) atomic lines database.
  • NRAO <>_: Science data archive of the National Radio Astronomy Observatory. VLA, JVLA, VLBA and GBT data products.
  • NVAS archive <>_
  • Simbad <>_: Basic data, cross-identifications, bibliography and measurements for astronomical objects outside the solar system.
  • Skyview <>_: NASA SkyView service for imaging surveys.
  • Splatalogue <>_: National Radio Astronomy Observatory (NRAO)-maintained (mostly) molecular radio and millimeter line list service.
  • UKIDSS <>_: UKIRT Infrared Deep Sky Survey. JHK images of 7500 sq deg. in the northern sky.
  • Vamdc <>_: VAMDC molecular line database.
  • Vizier <>_: Set of 11,000+ published, multiwavelength catalogues hosted by the CDS.
  • VO Simple Cone Search <>_
  • xMatch <>_: Cross-identify sources between very large data sets or between a user-uploaded list and a large catalogue.

These others are functional, but do not follow a common or consistent API:

  • Alfalfa <>_: Arecibo Legacy Fast ALFA survey; extragalactic HI radio data.
  • CosmoSim <>_: The CosmoSim database provides results from cosmological simulations performed within different projects: the MultiDark project, the BolshoiP project, and the CLUES project.
  • Exoplanet Orbit Database <>_
  • Fermi <>_: Fermi gamma-ray telescope archive.
  • HITRAN <>_: Access to the high-resolution transmission molecular absorption database.
  • JPL Horizons <>_: JPL Solar System Dynamics Horizons Service.
  • JPL SBDB <>_: JPL Solar System Dynamics Small-Body Database Browser Service.
  • Lamda <>_: Leiden Atomic and Molecular Database; energy levels, radiative transitions, and collisional rates for astrophysically relevant atoms and molecules.
  • NASA Exoplanet Archive <>_
  • OAC API <>_: Open Astronomy Catalog REST API Service.
  • Ogle <>_: Optical Gravitational Lensing Experiment III; information on interstellar extinction towards the Galactic bulge.
  • Open Expolanet Catalog (OEC) <>_
  • SDSS <>_: Sloan Digital Sky Survey data, including optical images, spectra, and spectral templates.
  • SHA <>_: Spitzer Heritage Archive; infrared data products from the Spitzer Space Telescope.

Citing Astroquery

If you use astroquery, please cite the paper we published in The Astronomical Journal <>__.

The BibTeX entry is available from the package itself::

import astroquery astroquery.citation

In addition you may also want to refer to specific versions of the package. We create a separate Zenodo DOI for each version, they can be looked up at the following Zenodo page <>__

Download Development ZIP_ | Download Development TAR_

Maintained by Adam Ginsburg_ and Brigitta Sipocz <>_ ([email protected]_)

.. _Download Development ZIP: .. _Download Development TAR: .. _Download Stable ZIP: .. _Download Stable TAR: .. _View on Github: .. _docs: .. _Documentation: .. .. _Adam Ginsburg: .. _Blog: .. _API:


Functions and classes to access online data resources. Maintainers: @keflavich and @bsipocz and @ceb8

Astroquery Info

⭐ Stars 573
🔗 Source Code
🕒 Last Update 8 days ago
🕒 Created 9 years ago
🐞 Open Issues 470
➗ Star-Issue Ratio 1
😎 Author astropy