Find documents
Retrieve documents from a catalog using MongoDB query filters.Request
Name of the catalog to query (e.g.,
ztf_alerts, lsst_alerts)MongoDB query filter to match documents
Fields to include or exclude in results (MongoDB projection syntax)
Maximum number of documents to return
Number of documents to skip (for pagination)
Sort order specification (e.g.,
{"field": 1} for ascending, -1 for descending)Maximum query execution time in milliseconds
Response
Returns an array of matching documents.Count documents
Count the number of documents matching a filter.Request
Name of the catalog to query
MongoDB query filter
Response
Returns the count as a number.Estimated count
Get an approximate count of all documents in a catalog (fast, uses collection metadata).Request
Name of the catalog
Response
Returns the estimated count as a number.This endpoint is very fast as it uses collection metadata, but the count may not be exact.
Cone search
Perform spatial queries to find objects near specified coordinates.Request
Name of the catalog to search
Search radius in the specified units
Radius unit:
Degrees, Radians, Arcseconds, or ArcminutesObject names mapped to
[RA, Dec] coordinate pairs in degrees. Multiple objects can be searched simultaneously.Additional MongoDB filter to apply
Fields to include in results
Maximum results per object
Number of results to skip per object
Sort order for results
Maximum query execution time in milliseconds
Response
Returns an object where each key is an object name and the value is an array of matching documents.Coordinate constraints
- RA must be in the range [0, 360) degrees
- Dec must be in the range [-90, 90] degrees
- Coordinates are provided as
[RA, Dec]arrays
Pipeline query
Execute a custom MongoDB aggregation pipeline for advanced analysis.Request
Name of the catalog to query
MongoDB aggregation pipeline stages
Maximum pipeline execution time in milliseconds
Response
Returns an array of documents produced by the pipeline.MongoDB filter syntax
All query endpoints support standard MongoDB query operators:Comparison operators
$eq- Equal to$ne- Not equal to$gt- Greater than$gte- Greater than or equal to$lt- Less than$lte- Less than or equal to$in- Matches any value in array$nin- Matches no values in array
Logical operators
$and- Joins query clauses with AND$or- Joins query clauses with OR$not- Inverts query expression$nor- Joins query clauses with NOR
Element operators
$exists- Matches documents with the field$type- Matches documents where field is of specified type
Array operators
$all- Matches arrays containing all elements$elemMatch- Matches documents with array element matching criteria$size- Matches arrays with specified size
Error handling
Common error responses:- 404 Not Found - Catalog doesn’t exist
- 400 Bad Request - Invalid filter or pipeline syntax
- 500 Internal Server Error - Query execution error