> ## Documentation Index
> Fetch the complete documentation index at: https://api-reference.scale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Querying Objects

Besides images, Nucleus provides a way to query `Annotation`, `Prediction`, or `EvaluationMatch` objects through the `query_objects` method, utilising the same query engine used for dataset items. The method returns an iterable; wrap it in `list(...)` to get a list:

```python theme={null}
from nucleus.dataset import ObjectQueryType

annotations = dataset.query_objects(
  "annotations.metadata.distance_to_device > 150", 
  ObjectQueryType.GROUND_TRUTH_ONLY
)
#annotations: [CuboidAnnotation(label='traffic_sign', position=Point3D(...)), ...]

predictions = dataset.query_objects(
  "<query>", 
  ObjectQueryType.PREDICTIONS_ONLY, 
  model_run_id="<modelRunId>"
)
#predictions: [CuboidPrediction(label='vehicle', position=Point3D(...), confidence=0.27), ...]

iou_matches = dataset.query_objects(
  "<query>",
  ObjectQueryType.IOU,
  model_run_id="<modelRunId>"
)
#iou_matches: [EvaluationMatch(iou=0.5276925, confusion_category='true_positive', model_prediction_label='Car', ground_truth_annotation_label='vehicle'), ...]
```
