# Builder.io Analytics API

Deprecated

With the Analytics API you can query any analytics you have in Builder using SQL.

**Tip:** For more detailed information, read [Programming Custom Dashboards](/content/c/docs/programming-custom-dashboards/index.html).

## Prerequisites

To use the Builder Analytics API, you must have a [Private API Key](/content/c/docs/using-your-api-key#managing-private-keys/index.html). **_Remember to keep your Private API secret._**

## Using the API

To query your analytics in Builder, send a `GET` request as in the following example:

```bash
curl --location --request POST 'https://cdn.builder.io/api/v1/query-metrics?apiKey=API_KEY' \
--header 'Authorization: Bearer PRIVATE_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"query": "SELECT COUNT(*) FROM @events WHERE TYPE = \"CLICK\" "
}'
```

### Example response

```json
{
  "results": [{ COUNT: 123 }]
}
```

The Analytics API is only available with Builder Enterprise plans. For full details on usage of the API, please [contact the Builder support team](/content/c/docs/help-and-support#contacting-us/index.html).
