Index Statistics
...
Loading
Query Interface
API Documentation
Region Query
Results
Run a query to see results
REST API Reference
All endpoints return JSON with {"success": true, "data": ...} on success
or {"success": false, "error": "..."} on failure.
GET
/api/query/paginated
Query stars in a rectangular region with pagination. Returns full star details (RA, Dec, magnitude, parallax, color).
| Parameter | Type | Description |
|---|---|---|
| ra_min required | f64 | Minimum Right Ascension (0-360°) |
| ra_max required | f64 | Maximum Right Ascension (0-360°) |
| dec_min required | f64 | Minimum Declination (-90 to 90°) |
| dec_max required | f64 | Maximum Declination (-90 to 90°) |
| max_mag required | f32 | Maximum magnitude filter (brighter = lower) |
| offset required | usize | Skip first N results |
| limit required | usize | Maximum results to return |
Example
curl "https://lumen.deepskies.observer/api/query/paginated?ra_min=180&ra_max=181&dec_min=0&dec_max=1&max_mag=15&offset=0&limit=10"
Response
{
"success": true,
"data": {
"stars": [
{
"source_id": 3698956337898276352,
"ra": 180.0526,
"dec": 0.0042,
"magnitude": 13.99,
"parallax": 1.02,
"bp_rp": 0.84
}
],
"total_count": 4187,
"offset": 0,
"has_more": true
}
}
GET
/api/query/binary
Binary endpoint for efficient bulk data transfer. Returns raw bytes optimized for GPU upload. Same parameters as /api/query/paginated.
Binary Format
Header (12 bytes): - star_count: u32 LE (4 bytes) - total_count: u32 LE (4 bytes) - has_more: u8 (1 byte) - padding: 3 bytes Per Star (28 bytes): - source_id: u64 LE (8 bytes) - ra: f32 LE (4 bytes) - dec: f32 LE (4 bytes) - magnitude: f32 LE (4 bytes) - parallax: f32 LE (4 bytes) - bp_rp: f32 LE (4 bytes)
Example (JavaScript)
const response = await fetch('/api/query/binary?ra_min=180&ra_max=181&dec_min=0&dec_max=1&max_mag=15&offset=0&limit=1000');
const buffer = await response.arrayBuffer();
const view = new DataView(buffer);
const starCount = view.getUint32(0, true);
const totalCount = view.getUint32(4, true);
const hasMore = view.getUint8(8) === 1;
for (let i = 0; i < starCount; i++) {
const offset = 12 + i * 28;
const sourceId = view.getBigUint64(offset, true);
const ra = view.getFloat32(offset + 8, true);
const dec = view.getFloat32(offset + 12, true);
const mag = view.getFloat32(offset + 16, true);
// ...
}
GET
/api/count
Count stars in a region without returning data. Fast way to check query size before fetching.
| Parameter | Type | Description |
|---|---|---|
| ra_min | f64 | Minimum RA |
| ra_max | f64 | Maximum RA |
| dec_min | f64 | Minimum Dec |
| dec_max | f64 | Maximum Dec |
curl "https://lumen.deepskies.observer/api/count?ra_min=0&ra_max=360&dec_min=-90&dec_max=90"
{"success": true, "data": 1347293721}
GET
/api/count/filtered
Count stars with magnitude filter.
| Parameter | Type | Description |
|---|---|---|
| ra_min, ra_max, dec_min, dec_max | f64 | Region bounds |
| max_mag | f32 | Maximum magnitude |
curl "https://lumen.deepskies.observer/api/count/filtered?ra_min=180&ra_max=181&dec_min=0&dec_max=1&max_mag=15"
{"success": true, "data": 20}
GET
/api/nearest
Find K nearest stars to a point.
| Parameter | Type | Description |
|---|---|---|
| ra required | f64 | Right Ascension (0-360°) |
| dec required | f64 | Declination (-90 to 90°) |
| k | usize | Number of nearest stars (default: 10) |
curl "https://lumen.deepskies.observer/api/nearest?ra=180&dec=0&k=5"
GET
/api/stats
Get index statistics including entry count and memory usage.
curl "https://lumen.deepskies.observer/api/stats"
{
"success": true,
"data": {
"num_entries": 1347293721,
"morton_bytes": 6245881660,
"source_id_bytes": 10701874505,
"magnitude_bytes": 1347293721,
"parallax_bytes": 2694587442,
"color_bytes": 1347293721,
"total_bytes": 22336931049
}
}
GET
/api/ping
Health check endpoint.
curl "https://lumen.deepskies.observer/api/ping"
{"success": true, "data": "pong"}
Star Data Reference
| Field | Type | Unit | Description |
|---|---|---|---|
| source_id | u64 | - | Gaia DR3 unique source identifier |
| ra | f64 | degrees | Right Ascension (ICRS J2016.0) |
| dec | f64 | degrees | Declination (ICRS J2016.0) |
| magnitude | f32 | mag | G-band mean magnitude |
| parallax | f32 | null | mas | Parallax (null if not available, ~20% have parallax) |
| bp_rp | f32 | null | mag | BP-RP color index (blue stars < 0, red stars > 2) |
Color Classification (BP-RP)
| Range | Color | Spectral Type |
|---|---|---|
| < 0.0 | Blue | O, B (hot, massive) |
| 0.0 - 0.8 | White | A, F (hot-warm) |
| 0.8 - 1.4 | Yellow | G (Sun-like) |
| 1.4 - 2.0 | Orange | K (cool) |
| > 2.0 | Red | M (cool, small) |
Distance from Parallax
distance_parsecs = 1000 / parallax_mas distance_light_years = distance_parsecs * 3.26156