Datalab Query
datalab_queryRun an ADQL (SQL) query against NSF NOIRLab Astro Data Lab — the DECam, Mayall and Blanco survey catalogues (Legacy Surveys/DECaLS, DES, DELVE, DECaPS, SMASH, NSC) alongside the all-sky catalogues queryable alongside them (Gaia DR3, AllWISE, CatWISE, 2MASS, SDSS, DESI). AUTHORITATIVE for catalogue-level astronomy at scale: these are the survey teams' own reduced photometry and astrometry, tens of billions of rows, joinable across surveys in a single query — which no web page or per-object API can do. PREFER OVER WEB SEARCH for any question about many objects at once (colour cuts, magnitude distributions, cross-matches). Read-only SELECT; a TOP clause is added if you omit one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | An ADQL SELECT. Tables are fully qualified schema.table, e.g. "SELECT ra, dec, phot_g_mean_mag FROM gaia_dr3.gaia_source WHERE phot_g_mean_mag < 12". Row limits use ADQL's "SELECT TOP n", not "LIMIT n". ADQL geometry functions (CONTAINS/POINT/CIRCLE) are NOT available here — use datalab_cone_search instead. | |
| limit | No | Row ceiling injected as SELECT TOP n when the query has none (default 100, max 1000). |