> ## 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.

# Tilebox Datasets

> A high-performance platform for structuring and querying satellite metadata, with curated open data catalogs and support for custom dataset collections.

Tilebox Datasets ingests and structures metadata for efficient querying, reducing data transfer and storage costs.

Create your own [Custom Datasets](/datasets/concepts/datasets) and easily set up a private, custom, strongly typed and highly available catalogue, or
explore any of the wide range of [available public open data datasets](/datasets/open-data) available on Tilebox.

Learn more about datasets by exploring the following sections:

<Columns cols={2}>
  <Card title="Datasets" icon="database" href="/datasets/concepts/datasets" horizontal>
    Learn what dataset types are available on Tilebox and how to create, list and access them.
  </Card>

  <Card title="Collections" icon="layer-group" href="/datasets/concepts/collections" horizontal>
    Learn what collections are and how to access them.
  </Card>

  <Card title="Querying Data" icon="server" href="/datasets/query/querying-data" horizontal>
    Find out how to access data from a collection for specific time intervals.
  </Card>

  <Card title="Ingesting Data" icon="up-from-bracket" href="/datasets/ingest" horizontal>
    Learn how to ingest data into a collection.
  </Card>
</Columns>

<Note>
  For a quick reference to API methods or specific parameter meanings, [check out the complete datasets API Reference](/api-reference/python/tilebox.datasets/Client).
</Note>

## Terminology

Get familiar with some key terms when working with time series datasets.

<AccordionGroup>
  <Accordion title="Data points">
    Data points are the individual entities that form a dataset. Each data point has a set of required [fields](/datasets/types/timeseries) determined by the dataset type, and can have custom user-defined fields.
  </Accordion>

  <Accordion title="Datasets">
    Datasets act as containers for data points. All data points in a dataset share the same type and fields. Tilebox supports different types of datasets, currently those are [Timeseries](/datasets/types/timeseries) and [Spatio-temporal](/datasets/types/spatiotemporal) datasets.
  </Accordion>

  <Accordion title="Collections">
    Collections group data points within a dataset. They help represent logical groupings of data points that are often queried together.
  </Accordion>
</AccordionGroup>

## Creating a datasets client

Prerequisites

* You have installed the [python](/sdks/python/install) `tilebox-datasets` package or [go](/sdks/go/install) library.
* You have [created](/authentication) a Tilebox API key.

After meeting these prerequisites, you can create a client instance to interact with Tilebox Datasets.

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

  client = Client(token="YOUR_TILEBOX_API_KEY")
  ```

  ```go Go theme={"system"}
  import (
  	"github.com/tilebox/tilebox-go/datasets/v1"
  )

  client := datasets.NewClient(
  	datasets.WithAPIKey("YOUR_TILEBOX_API_KEY"),
  )
  ```
</CodeGroup>

You can also set the `TILEBOX_API_KEY` environment variable to your API key. You can then instantiate the client without passing the `token` argument. Python will automatically use this environment variable for authentication.

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

  # requires a TILEBOX_API_KEY environment variable
  client = Client()
  ```

  ```go Go theme={"system"}
  import (
  	"github.com/tilebox/tilebox-go/datasets/v1"
  )

  // requires a TILEBOX_API_KEY environment variable
  client := datasets.NewClient()
  ```
</CodeGroup>

<Tip>
  Tilebox datasets provide a standard synchronous API by default but also offers an [asynchronous client](/sdks/python/async) if needed.
</Tip>

### Exploring datasets

After creating a client instance, you can start exploring available datasets. A straightforward way to do this in an interactive environment is to [list all datasets](/api-reference/python/tilebox.datasets/Client.datasets) and use the autocomplete feature in your Jupyter notebook.

<CodeGroup>
  ```python Python theme={"system"}
  datasets = client.datasets()
  datasets. # trigger autocomplete here to view available datasets
  ```

  ```go Go theme={"system"}
  package main

  import (
  	"context"
  	"github.com/tilebox/tilebox-go/datasets/v1"
  	"log"
  )

  func main() {
  	client := datasets.NewClient()

  	ctx := context.Background()
  	allDatasets, err := client.Datasets.List(ctx)
  	if err != nil {
  		log.Fatalf("Failed to list datasets: %v", err)
  	}

  	for _, dataset := range allDatasets {
  		log.Printf("Dataset: %s", dataset.Name)
  	}
  }
  ```
</CodeGroup>

<Tip>
  The Console also provides an [overview](https://console.tilebox.com/datasets/explorer) of all available datasets.
</Tip>

### Errors you might encounter

#### AuthenticationError

`AuthenticationError` occurs when the client fails to authenticate with the Tilebox API. This may happen if the provided API key is invalid or expired. A client instantiated with an invalid API key won't raise an error immediately, but an error will occur when making a request to the API.

<CodeGroup>
  ```python Python theme={"system"}
  client = Client(token="invalid-key") # runs without error
  datasets = client.datasets() # raises AuthenticationError
  ```

  ```go Go theme={"system"}
  package main

  import (
  	"context"
  	"github.com/tilebox/tilebox-go/datasets/v1"
  	"log"
  )

  func main() {
  	// runs without error
  	client := datasets.NewClient(datasets.WithAPIKey("invalid-key"))

  	// returns an error
  	_, err := client.Datasets.List(context.Background())
  	if err != nil {
  		log.Fatalf("Failed to list datasets: %v", err)
  	}
  }
  ```
</CodeGroup>

## Next steps

<Columns cols={2}>
  <Card title="Accessing datasets" icon="database" href="/datasets/concepts/datasets" horizontal />

  <Card title="Async support" icon="rotate" href="/sdks/python/async" horizontal />

  <Card title="Working with Xarray" icon="chart-bar" href="/sdks/python/xarray" horizontal />
</Columns>
