APIs with Power BI and Excel

Please i need some assistance, the connection to APIs with Power BI and Excel , doesn’t work, this was slightly addressed in Getting companies data into PowerBI through Rest APIs , but the full process wasn’t revealed

First: which API are you accessing? There is the Public Data API or the Streaming API. They are different.

Assuming it’s the first one. I don’t know the full process for PowerBI or Excel. However see my answers in the thread you linked to. I would:

a) try connecting to the server with something simple like curl to make sure your API key / everything else works outside of Power BI / Excel. See almost any post I’ve made about this (or read the Companies House documentation). The most basic request is likely:

curl -v -u your-api-key: "https://api.company-information.service.gov.uk/company/05187659/registered-office-address"

Replace your-api-key with your API key. I’ve just picked a known company number here.

b) having made the simplest possible request and got a response using curl you now:
either know that you have the correct key, your server / environment can reach Companies House servers, Companies House servers are allowing you through etc.
OR you have an error which can help you and others understand what the system is having a problem with.
(Doing this is important otherwise you’ll likely waste time trying to understand this in Excel / PowerBI and they likely won’t give you helpful information).

c) If you can’t get started with curl or are not sure about the above read the Companies House documentation again or find a basic curl example on the forum! There really isn’t much documentation to read.

d) If you get stuck at this point then post exactly what curl command you’re using and what response you get here. It might be worth posting your server IP if you’re getting a 429 / 403 http code response. Do not post your own API key here (and remove / alter references to the authentication if posting the output from curl -v) - there should be no need for it.

Note that the answer for the last person was:

Did you check that? (Hint - use curl!)

thanks for the response :+1:t5: