Forum Discussion
Pass Postcodes to ofcom API
- 5 years ago
HI Anonymous
Download this PBIX file with code - just enter your API key.
I signed up for an OfCom API key to test this. This code is tested and working. The Post Code has to be in upper case and without spaces e.g. E146NJ
(PostCode as text) => let Source = Json.Document( Web.Contents( "https://api-proxy.ofcom.org.uk/broadband/coverage/"&Text.Replace(Text.Upper(PostCode), " ", ""), [Headers=[#"Ocp-Apim-Subscription-Key"="xxxxxx", Name="api-proxy.ofcom.org.uk"]])), Availability = Source[Availability] in AvailabilityIf you start with a column of post codes, the API will return a list of records for each house in that post code
You can expand these lists to get the records and then expand those records
Regards
Phil
If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.
HI Anonymous
Download this PBIX file with code - just enter your API key.
I signed up for an OfCom API key to test this. This code is tested and working. The Post Code has to be in upper case and without spaces e.g. E146NJ
(PostCode as text) =>
let
Source = Json.Document(
Web.Contents(
"https://api-proxy.ofcom.org.uk/broadband/coverage/"&Text.Replace(Text.Upper(PostCode), " ", ""),
[Headers=[#"Ocp-Apim-Subscription-Key"="xxxxxx", Name="api-proxy.ofcom.org.uk"]])),
Availability = Source[Availability]
in
AvailabilityIf you start with a column of post codes, the API will return a list of records for each house in that post code
You can expand these lists to get the records and then expand those records
Regards
Phil
If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.