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

# Query open satellite data

> Explore available Tilebox open data catalogs and query Sentinel-2 metadata by time and location.

Use this guide when you want to find satellite products in Tilebox open data catalogs before downloading any files. You will first inspect the available open data datasets, then query Sentinel-2 metadata by time and location.

Tilebox Datasets stores searchable metadata for open Earth observation catalogs. Metadata queries are the fastest way to narrow a large catalog to the scenes that match your workflow, notebook, or agent task.

## Prerequisites

* You have a [Tilebox API key](/authentication).
* You have installed the [Python SDK](/sdks/python/install).

```bash theme={"system"}
uv add tilebox shapely
```

## Explore available open data datasets

Tilebox exposes open data catalogs through the same dataset API as your private datasets. To get a list of available open data satellite datasets, run the following snippet.

```python Python theme={"system"}
from tilebox.datasets import Client

client = Client()
datasets = client.datasets()
print(datasets.open_data)
```

The output groups datasets by provider. Open data datasets include Copernicus Sentinel missions, USGS Landsat products, ASF SAR products, and other public catalogs that Tilebox has indexed.

```plaintext Output theme={"system"}
asf:
    ers_sar: European Remote Sensing Satellite (ERS) Synthetic Aperture Radar ...
copernicus:
    sentinel1_sar: The Sentinel-1 mission is the European Radar Observatory ...
    sentinel2_msi: Sentinel-2 is equipped with an optical instrument payload ...
    sentinel3_olci: OLCI (Ocean and Land Colour Instrument) is an optical ...
    ...
usgs:
    ...
    landsat8_oli_tirs: Landsat-8 Operational Land Imager and Thermal Infrared ...
    landsat9_oli_tirs: Landsat-9 Operational Land Imager and Thermal Infrared ...
```

You can also browse open data datasets in the [Tilebox Console](https://console.tilebox.com/datasets/open-data) when you want descriptions, provider details, the dataset schema, and available collections before writing code.

## Select the Sentinel-2 catalog

Access the Sentinel-2 MSI dataset by its slug. The dataset contains collections for Sentinel-2 products such as `S2A_S2MSI2A`.

```python Python theme={"system"}
sentinel2 = client.dataset("open_data.copernicus.sentinel2_msi")

for name, collection in sentinel2.collections().items():
    print(name, collection)
```

## Define the search area

Create a polygon for the area you want to inspect. This example uses a bounding box around Colorado.

```python Python theme={"system"}
from shapely import Polygon

area = Polygon(
    [
        # lon, lat
        (-109.05, 37.0),
        (-102.05, 37.0),
        (-102.05, 41.0),
        (-109.05, 41.0),
        # close the square (repeat the first element)
        (-109.05, 37.0),
    ]
)
```

## Query Sentinel-2 metadata

Query the Sentinel-2 Level-2A collection by time and location. This returns metadata for matching scenes; it does not download image products.

```python Python theme={"system"}
collection = sentinel2.collection("S2A_S2MSI2A")

scenes = collection.query(
    temporal_extent=("2025-10-01", "2025-11-01"),
    spatial_extent=area,
    show_progress=True,
)

print(scenes[["granule_name", "processing_level", "product_type"]])
```

The result is an `xarray.Dataset` containing scene metadata. Use it to inspect candidate scenes, filter by metadata fields, or pass selected datapoints to a workflow task.

## Filter the metadata result

Metadata results behave like regular `xarray.Dataset` objects. You can filter, sort, or select scenes before deciding what to process next.

```python Python theme={"system"}
low_cloud = scenes.where(scenes.cloud_cover < 10, drop=True)
latest = low_cloud.sortby("time").isel(time=-1)

print(latest.granule_name.item())
print(latest.cloud_cover.item())
```

Metadata queries do not download product files. Use a [storage client](/datasets/storage/clients) when you want to read or download the files referenced by a datapoint.

## Next steps

<Columns cols={2}>
  <Card title="Access Copernicus data" icon="database" href="/guides/datasets/access-sentinel2-data" horizontal>
    Download Copernicus product files with the storage client.
  </Card>

  <Card title="Storage clients" icon="hard-drive" href="/datasets/storage/clients" horizontal>
    Configure provider-specific clients for product access.
  </Card>
</Columns>
