> For the complete documentation index, see [llms.txt](https://gitbook-docs.coinmetrics.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook-docs.coinmetrics.io/access-our-data/downloading-our-data/google-sheets-integration.md).

# Google Sheets Integration

## Importing Coin Metrics Data to Google Sheets

Where our Coin Metrics API includes a csv format option data can be directly loaded into google sheets.

To do this input you API call into the `=IMPORTDATA()` formula.

Below is an example Once included there is warning that requires you to allow access: steps for setting this up yourself

1. Open a new google sheet
2. Add API Parameters to cells in columns A and add results to column B
   1. Example using time series asset-metrics endpoint

| A           | B                    |
| ----------- | -------------------- |
| API KEY     | {API\_KEY}           |
| ASSETS      | btc                  |
| METRICS     | PriceUSD             |
| PAGE SIZE   | 1000                 |
| START TIME  | 2025-01-01T00:00:00Z |
| END TIME    | 2025-01-31T00:00:00Z |
| PAGING FROM | end                  |
| FREQUENCY   | 1d                   |

3. Leverage this formula for creating your API Query

```
= "https://api.coinmetrics.io/v4/timeseries/asset-metrics?" &
"api_key="& B1 &
"&assets=" & B2 &
"&metrics=" & B3 &
"&page_size=" & B4 &
"&start_time=" & B5 &
"&end_time=" & B6 &
"&paging_from=" & B7 &
"&frequency=" & B8 &
"&format=csv"



```

4. In a new cell enter: `=IMPORTDATA({Cell with API Call})`

At this point you will see a warning where you need to allow access for the API Call

<figure><img src="/files/86GBbjn8a9RFAPxevT7o" alt=""><figcaption></figcaption></figure>

Example results:

<figure><img src="/files/fa88m43PfCstJHhkO08c" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://gitbook-docs.coinmetrics.io/access-our-data/downloading-our-data/google-sheets-integration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
