Web.Contents

 

This topic applies to the Power Query Formula Language (informally known as "M") which can be used with Power Query and Power BI Desktop to build queries that mashup data. See the list of function categories.

Returns the contents downloaded from a web url as a binary value.

Web.Contents(url as text, optional options as nullable record) as binary  

ArgumentDescription
urlThe URL for the Web site.
optionsAn options record to control the behavior of this function.

options Field

FieldDescription
QueryProgrammatically add query parameters to the URL.
ApiKeyNameSpecify the name of the API key parameter for the target site. The actual key is provided in the credentials dialog.
ContentThe content of the POST web request (specifying this values changes the web request from a GET to a POST).
HeadersSpecifying this value as a record will supply additional headers to an HTTP request
TimeoutSpecifying this value as a duration will change the timeout for an HTTP request. The default value is 100 seconds.
ExcludedFromCacheKeySpecifying this value as a list will exclude these HTTP header keys from being part of the calculation for caching data.
IsRetrySpecifying this logical value as true will ignore any existing response in the cache when fetching data.
ManualStatusHandlingSpecifying this value as a list will prevent any builtin handling for HTTP requests whose response has one of these status codes.
RelativePathSpecifying this value as text appends it to the base URL before making the request.
Web.Contents("www.microsoft.com") equals  The binary contents from the URL www.microsoft.com when accessed via HTTP  

Show: