skillfed

astroquery

Functions and classes to access online astronomical data resources

astroquery v0.4.11 431.3K downloads/30d#6,718 on PyPI788
Permissive license BSD Active released

What it is and what it does

Astroquery is an astropy-affiliated package that wraps access to multiple online astronomical databases and web services into a unified Python interface. Rather than writing HTTP requests or parsing HTML manually, you import a sub-package for the service you need (SIMBAD, VizieR, NED, etc.) and call standard query methods like `query_object` or `query_region` to retrieve structured data. It handles authentication (via keyring), parsing HTML and XML responses (using beautifulsoup4 and html5lib), and returning results as astropy tables.

The package is designed for astronomers and researchers who need to programmatically fetch observational data, object catalogs, or survey results from public databases. It abstracts away the details of each service's API or web interface, letting you write portable code that works across multiple data sources. Dependencies include numpy for numerical work, requests for HTTP communication, and pyvo for Virtual Observatory protocol support.

Use it for:

  • Query SIMBAD to retrieve coordinates, magnitudes, and cross-references for a named astronomical object.
  • Retrieve spectroscopic or photometric data from online surveys for a region of sky defined by coordinates and radius.
  • Automate batch lookups of multiple objects across different catalogs without manually visiting web interfaces.
  • Integrate astronomical data retrieval into a data reduction or analysis pipeline.
  • Access Virtual Observatory services programmatically for interoperable data discovery.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Astroquery provides a Python interface to query and retrieve data from online astronomical databases and web services, with sub-packages for each service like SIMBAD, VizieR, and others.

Yes. Astroquery is actively maintained, has no known vulnerabilities, low install friction, and a permissive license. It is the standard tool in the Python astronomy ecosystem for programmatic access to online data. Install it if you need to query astronomical databases from Python; skip it only if you work exclusively with local data or have no need for online lookups.

Install

astroquery on PyPI

pip

pip install astroquery

uv

uv add astroquery

poetry

poetry add astroquery

Installing astroquery

Before you install

Low install friction with a pure-Python wheel distribution. Actively maintained as of 2026-08-13 with regular releases; last release was 328 days ago. Depends on well-established packages (numpy, astropy, requests, beautifulsoup4) with no exotic system requirements.

License in practice

BSD license (permissive) places no restrictions on use, modification, or distribution in proprietary or academic contexts.

Quickstart

pip install astroquery

from astroquery.simbad import Simbad
result = Simbad.query_object('tet01 Ori C')
print(result)

Requires Python 3.9 or later and astropy version 5.0 or later.

Verify before relying

  • Whether all available sub-packages (e.g. VizieR, NED, Gaia) are documented or discoverable in the current version.
  • Performance characteristics when querying large result sets or multiple services in sequence.
  • Rate-limiting or throttling policies enforced by the underlying web services.

Package facts

License BSD (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 7 — numpy, astropy, requests, beautifulsoup4, html5lib, keyring, pyvo
Maintenance actively maintained — 328 days since the last release
Last repo commit
First released
Downloads 431,349/month — #6,718 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: astroquery-0.4.11-py3-none-any.whl

Intended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Topic :: DatabaseTopic :: Scientific/Engineering :: AstronomyTopic :: Software Development :: Libraries

Tags

astronomical data queryonline astronomy databasesSIMBAD interfaceastronomical web servicesastronomy data retrievalastropy affiliated packagequery astronomical objects
astronomydata-retrievalweb-services

More Libraries packages