---
title: "How to connect data to Power BI using the Supermetrics API"
slug: "how-to-connect-data-to-power-bi-using-the-supermetrics-api"
description: "Connect your data to Power BI using Supermetrics API. Follow our guide for seamless integration and efficient data management in Power BI."
updated: 2025-08-29T11:52:58Z
published: 2025-08-29T11:52:58Z
stale: true
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.supermetrics.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How to connect data to Power BI using the Supermetrics API

> [!NOTE]
> Note
> 
> Supermetrics offers two ways of pulling data to Power BI: via API (a weblink) and with the help of a custom connector that offers an interface and lists your queries.
> 
> This guide applies to connecting your data to Power BI using the Supermetrics API weblink. To use our Power BI connector, see [our guide on installing the Supermetrics connector for Power BI](/v1/docs/how-to-launch-the-supermetrics-connector-in-power-bi).

Using the [Supermetrics Query Manager](/v1/docs/how-to-use-the-query-manager), you can easily create queries and connect your data from various data sources to Power BI via the Supermetrics API. Once you're set up, you can [schedule refreshes for your data in Power BI](/v1/docs/how-to-refresh-data-in-power-bi-using-the-supermetrics-api).

We recommend using the KEY-JSON output format. Follow [these steps to turn KEY-JSON data into a table](/v1/docs/how-to-connect-data-to-power-bi-using-the-supermetrics-api#convert-keyjson-to-a-table-in-power-bi) in Power BI.

## Before you begin

See Power BI’s documentation to learn more about [connecting to a data source](https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-data-sources#connecting-to-a-data-source).

## Instructions

[Embedded content](https://www.youtube.com/embed/50X3gwcdUUc?&amp;wmode=opaque)

1. On the [Supermetrics Hub](https://hub.supermetrics.com/), go to **API queries** under **Manage**.
2. Click **Select data source**.
3. Select a data source and connection to use.
4. In the sidebar on the left, [build your query](/v1/docs/how-to-use-the-query-manager). Click **Run** to test it and review your data in the preview.
5. From the URL format options, select **K-JSON**.
6. Copy the K-JSON URL.

> [!CAUTION]
> The query URL includes an API key that gives anyone with the URL access to your data. Treat this as you would a password and keep it safe. If you need to share the URL publicly, use the Short URL option that does not display your API key.
7. Open your PowerBI workbook.
8. Navigate to **Home → Get data**.
9. Search for and select **Web**, then click **Connect**.
10. In the **From Web** view, select the **Basic** setting, and paste the query URL you copied from the Query Manager into the URL field. Click **OK**.
11. Give your data source a memorable name.
12. Click **Close & Apply** in the top menu bar to complete the setup.

## Convert KEY-JSON to a table in Power BI

These instructions are based on [these steps in Stack Overflow](https://stackoverflow.com/questions/54966563/convert-json-list-record-to-table-value-in-powerbi).

1. Define the KEYJSON output format in the URL you generated in the Query Manager. Replace the value after /`data`/ with keyjson. For example, a URL ending in /`query`/`data`/`powerbi` would become a URL ending in /`query`/`data`/`keyjson.`
2. Open the Power BI query editor.
3. Convert the list "to table".
4. Click the **expand column icon** for "Column1".
5. You'll see a popup that lists every column in your query.
6. Select your columns and click **OK**. Unclick the **Use original column name as prefix** option to avoid having "Column1" as a prefix in every column.
7. Select data types for your columns. Power BI interprets all columns as "Text" by default.
8. Click **Close & Apply**.

## More resources

- [How to refresh data in Power BI](/v1/docs/how-to-refresh-data-in-power-bi-using-the-supermetrics-api)
