AstroQ API

One HTTP API for public astronomy data. It works without a key (a daily per-IP quota); a free key raises the quota. Every answer carries provenance: source, release, license and retrieval time.

Basics

  • Base URL: https://astroq.ai3discovery.com/api/v1 · OpenAPI: /openapi.json, /openapi.yaml
  • Auth (optional): Authorization: Bearer aq_… — get a key
  • Daily quota: anonymous 300 calls and 30 heavy / free key 10,000 calls and 1,000 heavy (reset at UTC midnight). Status, 3D tiles and sky events are not counted.
  • How failures look: 404 absent = searched, nothing there (with what was searched) · 503 unavailable = layer not loaded or upstream failed (with the reason) · 400 bad_parameter · 429 quota_exceeded(resets_at)
  • AI agents: MCP https://astroq.ai3discovery.com/mcp (Streamable HTTP) · /llms.txt
claude mcp add --transport http astroq https://astroq.ai3discovery.com/mcp
curl -fsSL https://astroq.ai3discovery.com/install.sh | sh && astroq object TRAPPIST-1

GET/api/v1/health

not countededge cache 15schecking

Liveness, layer readiness and the boot gate result (no key needed)

curl -s -H "Authorization: Bearer $ASTROQ_API_KEY" "https://astroq.ai3discovery.com/api/v1/health"
astroq raw GET /health
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
r = requests.get("https://astroq.ai3discovery.com/api/v1/health", headers=H, params={})
print(r.status_code, r.json())
Sends this example to the gateway (counts against the anonymous quota).

GET/api/v1/catalog

not countededge cache 300schecking

Datasets the engine answers from (rows, release, license, coverage, local|federated)

curl -s -H "Authorization: Bearer $ASTROQ_API_KEY" "https://astroq.ai3discovery.com/api/v1/catalog"
astroq catalog
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
r = requests.get("https://astroq.ai3discovery.com/api/v1/catalog", headers=H, params={})
print(r.status_code, r.json())
Sends this example to the gateway (counts against the anonymous quota).

GET/api/v1/freshness

not countededge cache 300schecking

Data vintage per layer (upstream date, basis, age, stale?)

curl -s -H "Authorization: Bearer $ASTROQ_API_KEY" "https://astroq.ai3discovery.com/api/v1/freshness"
astroq raw GET /freshness
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
r = requests.get("https://astroq.ai3discovery.com/api/v1/freshness", headers=H, params={})
print(r.status_code, r.json())
Sends this example to the gateway (counts against the anonymous quota).

GET/api/v1/resolve

1 calledge cache 86400schecking

Name → ICRS position and identifiers (SIMBAD/Sesame, Gaia, TIC, …)

ParameterTypeDefault · maxDescription
name requiredstring
curl -s -H "Authorization: Bearer $ASTROQ_API_KEY" "https://astroq.ai3discovery.com/api/v1/resolve?name=Vega"
astroq resolve Vega
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
r = requests.get("https://astroq.ai3discovery.com/api/v1/resolve", headers=H, params={"name": "Vega"})
print(r.status_code, r.json())
Sends this example to the gateway (counts against the anonymous quota).

GET/api/v1/object

1 calledge cache 3600schecking

One object's unified record — cross-identifications, photometry, parallax, proper motion, variability, light curves available, literature count

The flagship route. Resolves `id` (any name or identifier SIMBAD/Gaia/TIC knows, or "ra,dec"), then asks every catalog it holds or can federate. Each section reports its own status (`ok` | `absent` | `unavailable`), so a partial failure is visible, never silent.

ParameterTypeDefault · maxDescription
id requiredstring
radius_arcsecnumber3 ≤ 60match radius for positional cross-identification
curl -s -H "Authorization: Bearer $ASTROQ_API_KEY" "https://astroq.ai3discovery.com/api/v1/object?id=TRAPPIST-1"
astroq object TRAPPIST-1
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
r = requests.get("https://astroq.ai3discovery.com/api/v1/object", headers=H, params={"id": "TRAPPIST-1"})
print(r.status_code, r.json())
Sends this example to the gateway (counts against the anonymous quota).

GET/api/v1/cone

1 calledge cache 3600schecking

Cone search on one catalog (local HEALPix index, else federated TAP)

ParameterTypeDefault · maxDescription
ra requirednumber ≤ 360deg ICRS
dec requirednumber ≤ 90deg ICRS
radius requirednumber ≤ 5deg (max 5; larger areas → POST /query)
catalogstringgaia_dr3layer id from /catalog (gaia_dr3, hipparcos, tycho2, twomass, allwise, tic, simbad, vsx, …)
limitinteger500 ≤ 10000
columnsstringcomma-separated column names (default: a compact set)
curl -s -H "Authorization: Bearer $ASTROQ_API_KEY" "https://astroq.ai3discovery.com/api/v1/cone?ra=83.63308&dec=22.0145&radius=0.05&limit=20"
astroq cone 83.63308 22.01450 0.05 --limit 20
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
r = requests.get("https://astroq.ai3discovery.com/api/v1/cone", headers=H, params={"ra": 83.63308, "dec": 22.0145, "radius": 0.05, "limit": 20})
print(r.status_code, r.json())
Sends this example to the gateway (counts against the anonymous quota).

POST/api/v1/xmatch

1 heavy callchecking

Cross-match a list of positions against one catalog

Body fieldTypeDefault · maxDescription
positions requiredarray ≤ 5000 items
catalogstring"gaia_dr3"
radius_arcsecnumber2 ≤ 60
best_onlybooleantrue
curl -s -H "Authorization: Bearer $ASTROQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"positions":[{"id":"crab","ra":83.63308,"dec":22.0145},{"id":"vega","ra":279.23473,"dec":38.78369}],"catalog":"gaia_dr3","radius_arcsec":2}' \
  https://astroq.ai3discovery.com/api/v1/xmatch
astroq raw POST /xmatch --data @positions.json
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
r = requests.post("https://astroq.ai3discovery.com/api/v1/xmatch", headers=H, timeout=180,
                  json={"positions":[{"id":"crab","ra":83.63308,"dec":22.0145},{"id":"vega","ra":279.23473,"dec":38.78369}],"catalog":"gaia_dr3","radius_arcsec":2})
print(r.status_code, r.json())
Sends this example to the gateway (counts against the anonymous quota).

POST/api/v1/query

1 heavy callchecking

Read-only SQL over local layers (ADQL subset → DuckDB); row and time caps

`SELECT` only; one statement; tables are layer ids from /catalog (e.g. `exoplanets`, `hipparcos`, `gaia_dr3`). ADQL helpers accepted: `TOP n`, `CONTAINS(POINT(ra,dec), CIRCLE(ra0,dec0,r))`, `DISTANCE(POINT(...), POINT(...))`. Answers "how many objects satisfy X" with `count(*)`.

Body fieldTypeDefault · maxDescription
sql requiredstring
max_rowsinteger1000 ≤ 100000
timeout_snumber20 ≤ 120
curl -s -H "Authorization: Bearer $ASTROQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"sql":"SELECT pl_name, pl_orbper, pl_rade FROM exoplanets WHERE hostname = 'TRAPPIST-1' ORDER BY pl_orbper","max_rows":100}' \
  https://astroq.ai3discovery.com/api/v1/query
astroq query "SELECT pl_name, pl_orbper FROM exoplanets WHERE hostname = 'TRAPPIST-1'"
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
r = requests.post("https://astroq.ai3discovery.com/api/v1/query", headers=H, timeout=180,
                  json={"sql":"SELECT pl_name, pl_orbper, pl_rade FROM exoplanets WHERE hostname = 'TRAPPIST-1' ORDER BY pl_orbper","max_rows":100})
print(r.status_code, r.json())
Sends this example to the gateway (counts against the anonymous quota).

GET/api/v1/cutout

1 calledge cache 86400schecking

Image cutout (CDS hips2fits, federated)

ParameterTypeDefault · maxDescription
ra requirednumber
dec requirednumber
surveystringCDS/P/DSS2/colorHiPS id
sizenumber0.25 ≤ 5field of view, deg
pixelsinteger512 ≤ 2048
formatstring
jpg | png | fits
jpg
curl -s -H "Authorization: Bearer $ASTROQ_API_KEY" "https://astroq.ai3discovery.com/api/v1/cutout?ra=83.63308&dec=22.0145&size=0.2&pixels=512" -o out.jpg
astroq cutout 83.63308 22.01450 --size 0.2 -o crab.jpg
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
r = requests.get("https://astroq.ai3discovery.com/api/v1/cutout", headers=H, params={"ra": 83.63308, "dec": 22.0145, "size": 0.2, "pixels": 512})
open("cutout.jpg", "wb").write(r.content)
Sends this example to the gateway (counts against the anonymous quota).

GET/api/v1/lightcurve

1 calledge cache 3600schecking

Light curve (ZTF, TESS, Kepler/K2, Gaia epoch, ASAS-SN…; local first, else federated)

ParameterTypeDefault · maxDescription
idstringname or identifier (TIC 123, Gaia DR3 …, ZTF oid); or give ra/dec
ranumber
decnumber
surveystring
ztf | tess | kepler | k2 | gaia | asassn
ztf
radius_arcsecnumber2 ≤ 10
bandstring
curl -s -H "Authorization: Bearer $ASTROQ_API_KEY" "https://astroq.ai3discovery.com/api/v1/lightcurve?id=RR%20Lyr&survey=ztf"
astroq lightcurve "RR Lyr" --survey ztf
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
r = requests.get("https://astroq.ai3discovery.com/api/v1/lightcurve", headers=H, params={"id": "RR Lyr", "survey": "ztf"})
print(r.status_code, r.json())
Sends this example to the gateway (counts against the anonymous quota).

GET/api/v1/spectrum

1 calledge cache 86400schecking

Spectrum (SDSS, DESI, LAMOST, Gaia XP)

ParameterTypeDefault · maxDescription
idstring
ranumber
decnumber
surveystring
sdss | desi | lamost | gaia_xp
sdss
radius_arcsecnumber2
curl -s -H "Authorization: Bearer $ASTROQ_API_KEY" "https://astroq.ai3discovery.com/api/v1/spectrum?id=Betelgeuse&survey=gaia_xp"
astroq spectrum Betelgeuse --survey gaia_xp
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
r = requests.get("https://astroq.ai3discovery.com/api/v1/spectrum", headers=H, params={"id": "Betelgeuse", "survey": "gaia_xp"})
print(r.status_code, r.json())
Sends this example to the gateway (counts against the anonymous quota).

POST/api/v1/periodogram

1 heavy callchecking

Lomb-Scargle or BLS periodogram with false-alarm probability (server-side, astropy)

Body fieldTypeDefault · maxDescription
methodstring
lomb_scargle | bls
"lomb_scargle"
tarray ≤ 200000 itemsMJD (days)
yarray
dyarray
idstringalternative to t/y: fetch /lightcurve first
surveystring
bandstring
min_periodnumberdays
max_periodnumberdays
samples_per_peakinteger10
durationsarrayBLS durations (days)
n_peaksinteger5 ≤ 50
curl -s -H "Authorization: Bearer $ASTROQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":"RR Lyr","survey":"ztf","band":"g","method":"lomb_scargle","min_period":0.1,"max_period":2}' \
  https://astroq.ai3discovery.com/api/v1/periodogram
astroq periodogram "RR Lyr" --survey ztf --band g --max-period 2
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
r = requests.post("https://astroq.ai3discovery.com/api/v1/periodogram", headers=H, timeout=180,
                  json={"id":"RR Lyr","survey":"ztf","band":"g","method":"lomb_scargle","min_period":0.1,"max_period":2})
print(r.status_code, r.json())
Sends this example to the gateway (counts against the anonymous quota).

GET/api/v1/jobs/{id}

not countedchecking

Result of a long computation started with 202

curl -s -H "Authorization: Bearer $ASTROQ_API_KEY" "https://astroq.ai3discovery.com/api/v1/jobs/job_0123abcd"
astroq raw GET /jobs/job_0123abcd
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
r = requests.get("https://astroq.ai3discovery.com/api/v1/jobs/job_0123abcd", headers=H, params={})
print(r.status_code, r.json())
Sends this example to the gateway (counts against the anonymous quota).

GET/api/v1/exoplanets

1 calledge cache 3600schecking

Confirmed exoplanets (NASA Exoplanet Archive PSCompPars) — filter & page

ParameterTypeDefault · maxDescription
qstringname / identifier / free text filter
hoststring
discoverymethodstring
limitinteger50 ≤ 1000
offsetinteger0
curl -s -H "Authorization: Bearer $ASTROQ_API_KEY" "https://astroq.ai3discovery.com/api/v1/exoplanets?host=TRAPPIST-1"
astroq list exoplanets --q TRAPPIST-1
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
r = requests.get("https://astroq.ai3discovery.com/api/v1/exoplanets", headers=H, params={"host": "TRAPPIST-1"})
print(r.status_code, r.json())
Sends this example to the gateway (counts against the anonymous quota).

GET/api/v1/transients

1 calledge cache 300schecking

Transients (TNS public objects; ALeRCE/Fink classifications)

ParameterTypeDefault · maxDescription
qstringname / identifier / free text filter
typestring
since_mjdnumber
limitinteger50 ≤ 1000
offsetinteger0
curl -s -H "Authorization: Bearer $ASTROQ_API_KEY" "https://astroq.ai3discovery.com/api/v1/transients?limit=20"
astroq list transients --limit 20
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
r = requests.get("https://astroq.ai3discovery.com/api/v1/transients", headers=H, params={"limit": 20})
print(r.status_code, r.json())
Sends this example to the gateway (counts against the anonymous quota).

GET/api/v1/frb

1 calledge cache 3600schecking

Fast radio bursts (CHIME/FRB catalog, TNS FRB)

ParameterTypeDefault · maxDescription
qstringname / identifier / free text filter
repeaterboolean
limitinteger50 ≤ 1000
offsetinteger0
curl -s -H "Authorization: Bearer $ASTROQ_API_KEY" "https://astroq.ai3discovery.com/api/v1/frb?q=FRB%2020121102A"
astroq list frb --q "FRB 20121102A"
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
r = requests.get("https://astroq.ai3discovery.com/api/v1/frb", headers=H, params={"q": "FRB 20121102A"})
print(r.status_code, r.json())
Sends this example to the gateway (counts against the anonymous quota).

GET/api/v1/pulsars

1 calledge cache 86400schecking

Pulsars (ATNF Pulsar Catalogue)

ParameterTypeDefault · maxDescription
qstringname / identifier / free text filter
limitinteger50 ≤ 1000
offsetinteger0
curl -s -H "Authorization: Bearer $ASTROQ_API_KEY" "https://astroq.ai3discovery.com/api/v1/pulsars?q=Crab"
astroq list pulsars --q Crab
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
r = requests.get("https://astroq.ai3discovery.com/api/v1/pulsars", headers=H, params={"q": "Crab"})
print(r.status_code, r.json())
Sends this example to the gateway (counts against the anonymous quota).

GET/api/v1/gw

1 calledge cache 3600schecking

Gravitational-wave events (GWOSC event catalog, GWTC)

ParameterTypeDefault · maxDescription
qstringname / identifier / free text filter
limitinteger50 ≤ 1000
offsetinteger0
curl -s -H "Authorization: Bearer $ASTROQ_API_KEY" "https://astroq.ai3discovery.com/api/v1/gw?q=GW170817"
astroq list gw --q GW170817
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
r = requests.get("https://astroq.ai3discovery.com/api/v1/gw", headers=H, params={"q": "GW170817"})
print(r.status_code, r.json())
Sends this example to the gateway (counts against the anonymous quota).

GET/api/v1/grb

1 calledge cache 900schecking

Gamma-ray bursts (Fermi GBM burst catalog, Swift)

ParameterTypeDefault · maxDescription
qstringname / identifier / free text filter
limitinteger50 ≤ 1000
offsetinteger0
curl -s -H "Authorization: Bearer $ASTROQ_API_KEY" "https://astroq.ai3discovery.com/api/v1/grb?limit=20"
astroq list grb --limit 20
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
r = requests.get("https://astroq.ai3discovery.com/api/v1/grb", headers=H, params={"limit": 20})
print(r.status_code, r.json())
Sends this example to the gateway (counts against the anonymous quota).

GET/api/v1/smallbodies

1 calledge cache 3600schecking

Small bodies (JPL SBDB; MPCORB when local)

ParameterTypeDefault · maxDescription
qstringname / identifier / free text filter
limitinteger50 ≤ 1000
offsetinteger0
curl -s -H "Authorization: Bearer $ASTROQ_API_KEY" "https://astroq.ai3discovery.com/api/v1/smallbodies?q=Apophis"
astroq list smallbodies --q Apophis
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
r = requests.get("https://astroq.ai3discovery.com/api/v1/smallbodies", headers=H, params={"q": "Apophis"})
print(r.status_code, r.json())
Sends this example to the gateway (counts against the anonymous quota).

GET/api/v1/variables

1 calledge cache 3600schecking

Variable stars (AAVSO VSX; Gaia DR3 vari_classifier_result)

ParameterTypeDefault · maxDescription
qstringname / identifier / free text filter
typestring
limitinteger50 ≤ 1000
offsetinteger0
curl -s -H "Authorization: Bearer $ASTROQ_API_KEY" "https://astroq.ai3discovery.com/api/v1/variables?q=RR%20Lyr"
astroq list variables --q "RR Lyr"
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
r = requests.get("https://astroq.ai3discovery.com/api/v1/variables", headers=H, params={"q": "RR Lyr"})
print(r.status_code, r.json())
Sends this example to the gateway (counts against the anonymous quota).

POST/api/v1/controls/sample

1 heavy callchecking

Matched random control sample (same magnitude/colour/galactic-latitude distribution) — reproducible with seed

For Parallax null distributions. Give the target set (positions or ids) or explicit bins; the engine draws, from the chosen catalog, objects matching the targets' joint distribution in the chosen covariates (histogram matching on bins), excluding the targets themselves. Same `seed` + same catalog release ⇒ same sample (the release is in provenance).

Body fieldTypeDefault · maxDescription
catalogstring"gaia_dr3"
targetsarray ≤ 5000 items
match_onarray["g_mag","bp_rp","abs_b"]
n_per_targetinteger10 ≤ 100
seed requiredinteger
exclude_radius_arcsecnumber5
curl -s -H "Authorization: Bearer $ASTROQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"targets":[{"ra":83.63308,"dec":22.0145,"g_mag":16.5,"bp_rp":1.1}],"n_per_target":10,"seed":42}' \
  https://astroq.ai3discovery.com/api/v1/controls/sample
astroq raw POST /controls/sample --data @targets.json
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
r = requests.post("https://astroq.ai3discovery.com/api/v1/controls/sample", headers=H, timeout=180,
                  json={"targets":[{"ra":83.63308,"dec":22.0145,"g_mag":16.5,"bp_rp":1.1}],"n_per_target":10,"seed":42})
print(r.status_code, r.json())
Sends this example to the gateway (counts against the anonymous quota).

GET/api/v1/known

1 calledge cache 600schecking

"Is this already known?" — SIMBAD, VSX, TNS, NED, Gaia variability, exoplanet lists at once; per-upstream status

Each upstream reports `answered` (with hits, possibly zero) or `failed` (with reason). Overall `status` is `complete` when every upstream answered, `partial` when some failed. A failed upstream is never reported as "no match".

ParameterTypeDefault · maxDescription
ra requirednumber
dec requirednumber
radiusnumber0.00278 ≤ 0.1deg (default 10 arcsec)
curl -s -H "Authorization: Bearer $ASTROQ_API_KEY" "https://astroq.ai3discovery.com/api/v1/known?ra=197.4504&dec=-23.3814&radius=0.003"
astroq known 197.4504 -23.3814 --radius 10arcsec
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
r = requests.get("https://astroq.ai3discovery.com/api/v1/known", headers=H, params={"ra": 197.4504, "dec": -23.3814, "radius": 0.003})
print(r.status_code, r.json())
Sends this example to the gateway (counts against the anonymous quota).

GET/api/v1/sky/events

not countededge cache 15schecking

Sentinel events (alerts, circulars, transients) — newest first

ParameterTypeDefault · maxDescription
since_mjdnumber
kindstring
limitinteger50 ≤ 1000
curl -s -H "Authorization: Bearer $ASTROQ_API_KEY" "https://astroq.ai3discovery.com/api/v1/sky/events?limit=20"
astroq events --limit 20
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
r = requests.get("https://astroq.ai3discovery.com/api/v1/sky/events", headers=H, params={"limit": 20})
print(r.status_code, r.json())
Sends this example to the gateway (counts against the anonymous quota).

GET/api/v1/sky/anomalies

not countededge cache 30schecking

Sentinel anomaly candidates (scored), newest first

ParameterTypeDefault · maxDescription
min_scorenumber
limitinteger50 ≤ 1000
curl -s -H "Authorization: Bearer $ASTROQ_API_KEY" "https://astroq.ai3discovery.com/api/v1/sky/anomalies?limit=10"
astroq anomalies --limit 10
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
r = requests.get("https://astroq.ai3discovery.com/api/v1/sky/anomalies", headers=H, params={"limit": 10})
print(r.status_code, r.json())
Sends this example to the gateway (counts against the anonymous quota).

GET/api/v1/sky/stream

not countedchecking

Server-sent events stream of new Sentinel events (text/event-stream)

curl -N -H "Authorization: Bearer $ASTROQ_API_KEY" https://astroq.ai3discovery.com/api/v1/sky/stream
astroq watch
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
with requests.get("https://astroq.ai3discovery.com/api/v1/sky/stream", headers=H, stream=True) as r:
    for line in r.iter_lines(decode_unicode=True):
        if line.startswith("data:"):
            print(line[5:])

GET/api/v1/viz/stars

not countededge cache 86400schecking

Near/bright stars as a binary tile for the 3D view (Float32 little-endian)

Body = header JSON length (uint32 LE) + header JSON + N records of 6 float32: x, y, z (pc, ICRS-aligned heliocentric), bp_rp (mag), g_abs (mag), g_mag (mag). The header carries `n`, `fields`, `units`, `selection`, `provenance`.

ParameterTypeDefault · maxDescription
max_dist_pcnumber200 ≤ 5000
max_gnumber12
limitinteger500000 ≤ 3000000
curl -s -H "Authorization: Bearer $ASTROQ_API_KEY" "https://astroq.ai3discovery.com/api/v1/viz/stars?max_dist_pc=100&limit=1000" -o out.bin
astroq raw GET "/viz/stars?max_dist_pc=100&limit=1000" > stars.bin
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
import json, struct
import numpy as np
b = requests.get("https://astroq.ai3discovery.com/api/v1/viz/stars", headers=H, params={"max_dist_pc": 100, "limit": 1000}).content
n = struct.unpack("<I", b[:4])[0]
header = json.loads(b[4:4 + n])
data = np.frombuffer(b[4 + n:], "<f4").reshape(-1, len(header["fields"]))
Sends this example to the gateway (counts against the anonymous quota).

GET/api/v1/viz/density

not countededge cache 86400schecking

HEALPix star-count map (nested ordering) as Float32 binary or JSON

ParameterTypeDefault · maxDescription
orderinteger6 ≤ 8
formatstring
bin | json
bin
curl -s -H "Authorization: Bearer $ASTROQ_API_KEY" "https://astroq.ai3discovery.com/api/v1/viz/density?order=5" -o out.bin
astroq raw GET "/viz/density?order=5" > density.bin
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
import json, struct
import numpy as np
b = requests.get("https://astroq.ai3discovery.com/api/v1/viz/density", headers=H, params={"order": 5}).content
n = struct.unpack("<I", b[:4])[0]
header = json.loads(b[4:4 + n])
data = np.frombuffer(b[4 + n:], "<f4").reshape(-1, len(header["fields"]))
Sends this example to the gateway (counts against the anonymous quota).

GET/api/v1/viz/events

not countededge cache 30schecking

Recent sky events with positions for the 3D view (JSON)

ParameterTypeDefault · maxDescription
limitinteger50 ≤ 1000
curl -s -H "Authorization: Bearer $ASTROQ_API_KEY" "https://astroq.ai3discovery.com/api/v1/viz/events?limit=100"
astroq raw GET "/viz/events?limit=100"
import os, requests
H = {"Authorization": f"Bearer {os.environ['ASTROQ_API_KEY']}"}  # optional
r = requests.get("https://astroq.ai3discovery.com/api/v1/viz/events", headers=H, params={"limit": 100})
print(r.status_code, r.json())
Sends this example to the gateway (counts against the anonymous quota).