# Add a Dataset and query data

To add a dataset to the Spice app, navigate to the [**Code**](https://github.com/spicehq/docs/blob/trunk/cloud/portal/app-spicepod/README.md) tab.

Use the **Components sidebar** on the right to select from available **Data Connectors**, **Model Providers**, and ready-to-use **Datasets**.

### Adding a ready-to-use Dataset

1. Navigate to **Code** tab.
2. In **Components** sidebar, click the **Datasets** tab.
3. Select and add the **NYC Taxi Trips** dataset
   1. Note the configuration has been added to the editor
4. Click **Save** in the code toolbar and then **Deploy** on popup card that appears in the bottom right.
5. Navigate to the [**Playground**](https://github.com/spicehq/docs/blob/trunk/cloud/portal/playground/README.md) tab, open the dataset reference, and click on the `spice.samples.taxi_trips` dataset to insert a sample query into the SQL editor. Then, click **Run Selection**.

### \[Optional] Execute a SQL query using cURL

6. Go app **Settings** and copy one of the app API Keys.
7. Replace `[API-KEY]` in the sample below with your API Key and execute from a terminal.

{% tabs %}
{% tab title="cURL" %}

```sh
curl --request POST \
  --url 'https://data.spiceai.io/v1/sql' \
  --header 'Content-Type: text/plain' \
  --header 'X-API-KEY: [API-KEY]' \
  --data 'select * from spice.samples.taxi_trips limit 3'
```

{% endtab %}
{% endtabs %}

🎉 Congratulations, you've now added a dataset and queried it.

Continue to [Step 4 to add an AI Model and chat with the dataset](/getting-started/get-started/step-3-add-ai-model-and-chat-with-your-app.md).

{% hint style="info" %}
Need help? Ask a question, raise issues, and provide feedback to the Spice AI team on [Slack](https://spiceai.org/slack).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.spice.ai/getting-started/get-started/step-2-add-dataset-and-query-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
