Menu

Connecting to Web Data and APIs

Connecting to Web Data and APIs

Web-based data sources allow Power BI to retrieve information from supported websites and services.

Connecting to a Web Page

Power BI includes a Web connector for supported web-based content.

To try it:

  1. Open Power BI Desktop.
  2. Select Home → Get data → Web.
  3. Enter the URL of a supported public data source.
  4. Complete any required authentication.
  5. Review the available data in the Navigator window.
  6. Select the required content and load it or transform it.

Not every web page exposes its information in a format that Power BI can directly retrieve. Websites that rely on complex client-side rendering, restricted access, or dynamic content may require another approach.

Understanding APIs

An Application Programming Interface (API) allows software systems to exchange information through defined requests and responses.

Many APIs return data in JSON format, which represents structured information using objects and arrays.

For example, an API might return product information in this format:

{

"products": [

{

"productId": 101,

"name": "Laptop",

"price": 55000

},

{

"productId": 102,

"name": "Monitor",

"price": 18000

}

]

}

Power Query can work with supported JSON responses and transform nested objects or lists into tabular structures.

Connecting to an API

A typical API connection involves these steps:

  1. Obtain the API endpoint from the service documentation.
  2. Select a suitable connector, such as the Web connector, or use Power Query capabilities where appropriate.
  3. Configure authentication and required request parameters.
  4. Retrieve the response.
  5. Expand JSON objects or lists into columns and rows.
  6. Check the data types and load the prepared data.

Some APIs require API keys, OAuth authentication, pagination, or custom request handling. These requirements must be implemented according to the API's documentation and Power BI's supported connection behavior.

Never embed confidential API keys directly into report content or share them in screenshots. Use appropriate credential and security mechanisms.


Power BI Tutorial

VA

Vishalini A



Learn via Video Course

Microsoft Power BI Logo

Microsoft Power BI

3 hrs



Get in Touch For Details