Web.Page
Accessing DataReturns the contents of an HTML document parsed into a table of tables, extracting all HTML tables found on the page.
Syntax
Web.Page(webPage as any) as tableParameters
| Name | Type | Required | Description |
|---|---|---|---|
webPage | any | Yes | The HTML content to parse. Typically the result of Web.Contents, but can also be a text value containing raw HTML. |
Return Value
table — A table where each row represents an HTML table or element found in the document, with a Data column containing the extracted table.
Remarks
Input: The Navigation table columns: Each row in the result represents one detected Authentication: Limitations:
- Query folding: Not supported. ```powerquery ```powerquery ```powerquery ```powerqueryWeb.Page parses an HTML document and returns a navigation table listing every element found in the document. It is the simplest way to extract tabular data from a web page — no CSS selectors or manual parsing required. Use
Html.Table instead when you need to target non-table HTML structures or want column-level CSS selector control.webPage parameter accepts the binary result of Web.Contents or a text string containing raw HTML. Power Query automatically handles decoding binary HTML using the encoding declared in the response headers or document. element and includes:
-
Caption (text) — the table's text, or an auto-generated name like "Table 0" if no caption is present.
- Source (text) — a representation of the HTML context surrounding the table.
- ClassName (text) — the class attribute of the element.
-
Id (text) — the id attribute of the element.
-
Data (table) — the extracted table content. The first row is typically used as headers if the HTML uses elements; otherwise use Table.PromoteHeaders.Web.Page does not make HTTP requests — it only parses HTML. Authentication is handled by Web.Contents or whichever function provides the HTML binary.Web.Page is not available in Power BI Service for direct cloud refresh. It requires an on-premises data gateway for scheduled refresh.
- JavaScript-rendered content is not executed. Tables dynamically loaded by JavaScript will not appear. Use Web.BrowserContents first, then pass the result to Web.Page.
- A page may contain many incidental tables (menus, footers, ad containers). Inspect the result interactively in Power Query to identify the correct table by index, Caption, or Id.Examples
Example 1: Extract all tables from a web page
Web.Page(Web.Contents("https://en.wikipedia.org/wiki/List_of_countries_by_GDP"))Example 2: Select the first table from a web page
let
Source = Web.Page(Web.Contents("https://en.wikipedia.org/wiki/List_of_countries_by_GDP")),
FirstTable = Source{0}[Data]
in
FirstTableExample 3: Find a specific table by its Id attribute
let
Source = Web.Page(Web.Contents("https://example.com/data")),
TargetTable = Source{[Id="sales-table"]}[Data]
in
TargetTableExample 4: Chain with Web.BrowserContents for JavaScript-rendered tables
let
Html = Web.BrowserContents(
"https://example.com/dynamic-page",
[WaitFor = [Element = "table.results"]]
),
Tables = Web.Page(Html),
FirstTable = Tables{0}[Data]
in
FirstTableCompatibility