Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

The downloaded data is HTML, which isn't the expected type

i am basically trying to get country name from a list of IP Address. Below is the query i am using from this Community itself. unfortunaltly i am getting below error.

"The downloaded data is HTML, which isn't the expected type. The URL may be wrong or you might not have provided the right credentials to the server.

I tired checking whether anyone got the same error in the post where i got the query. however 1 guy got the error and was not able to resolve it. So posting a fresh one. Could any one help on this ?

 

let
Source = (#"IP Address" as text) => let
Source = Json.Document(Web.Contents("http://freegeoip.net/json/" & #"IP Address")),
#"Converted to Table" = Record.ToTable(Source),
#"Transposed Table" = Table.Transpose(#"Converted to Table"),
#"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table")
in
#"Promoted Headers"
in
Source

 

 

1 Reply

  • That URL is not valid (any more?).  In general you can specify the content type you expect back.