# How to use the Analytics query builder outside of the Dashboard?

**URL:** <https://community.bitmovin.com/t/how-to-use-the-analytics-query-builder-outside-of-the-dashboard/3042>\
**Category:** Knowledge\
**Created:** [June 26, 2024, 7:29pm UTC](https://community.bitmovin.com/t/how-to-use-the-analytics-query-builder-outside-of-the-dashboard/3042 "2024-06-26T19:29:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ludovic.michaud](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/ludovic.michaud/32/811_2.png) [@ludovic.michaud](https://community.bitmovin.com/u/ludovic.michaud)\
**Post date:** [June 26, 2024, 7:29pm UTC](https://community.bitmovin.com/t/how-to-use-the-analytics-query-builder-outside-of-the-dashboard/3042/1 "2024-06-26T19:29:05Z")

</div>

To use the Query Builder, you can install our legacy JS API client and run the following code :

```auto
const Bitmovin = require("bitmovin-javascript").default;

const BITMOVIN_API_KEY = 'YOUR_API_KEY_HERE';
const myAnalyticsKey = 'YOUR_ANALYTICS_KEY_HERE;
const bitmovin = new Bitmovin({apiKey: BITMOVIN_API_KEY, debug: true});
const queryBuilder = bitmovin.analytics.queries.builder;

queryBuilder
.licenseKey(myAnalyticsKey)
.count('IMPRESSION_ID')
.between('2024-05-23T20:09:23.69Z', '2024-06-25T15:09:23.69Z')
.groupBy("DEVICE_CLASS")
.query()
.then(console.log);

```

Bitmovin Javascript repository :

> **[GitHub - bitmovin/bitmovin-javascript: DEPRECATED: JavaScript client for the...](https://github.com/bitmovin/bitmovin-javascript)**
>
> DEPRECATED: JavaScript client for the Bitmovin API, see https://github.com/bitmovin/bitmovin-api-sdk-javascript - bitmovin/bitmovin-javascript

To use the query builder within the Dashboard, you can visit the following link :

> **[Bitmovin Dashboard](https://dashboard.bitmovin.com/analytics/api-explore)**
>
> Manage your Bitmovin account with the dashboard. Bitmovin's API based products help developers solve complex video problems.
