Unable to connect to the API


Since the last week, our application cannot connect to the API using the same credentials and binaries as before.

This is a text of exception thrown by the network library:

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

Are there any issues with the API servers or network connectivity? Is it online?

On 11th November our services moved to cloud servers.
If you are accessing our services based on IP address, they will be incorrect.
Please use name based addresses.
Is your IP address? as I cannot find it in our logs.

The application is configured to access the API by the following URL: https://api.companieshouse.gov.uk.

I suppose, the IP address in the error message is a target host (API server) which is resolved by the domain name api.companieshouse.gov.uk.

The api has been working great but yesterday noticed the same issue as @Andrew_.
I have an Azure WebApp and it fails to connect to “https://api.companieshouse.gov.uk” although tested it locally with the same settings and it works. My CompaniesHouse application doesn’t have an ip restriction and also I don’t seem to have any firewall restriction in my Azure WebApp.
I was wondering if you are noticing any issue on your side.

If you do an nslookup on api.companieshouse.gov.uk
you should get back 3 addresses
Currently they are :-

Can you perform an nslookup from your server that is running your application and ensure that your application is actually attempting to connect to us?

@MArkWilliams my app is trying to connect to

@ian_cox Ian Are you using Azure to host your application, because we have found that we have exactly the same issue when accessing companies house api from the azure hosts.

@mark_hargreaves yes I am, but I have tried 2 different hosts with the same rest call and one works and the one I mention above doesn’t.

@MArkWilliams Could you check if there an issue between Azure and the Amazon Cloud (where you are hosting the api). Or have the Azure IP’s been firewalled? We are having similar issues to @ian_cox, see http://forum.aws.chdev.org/t/api-timed-out-from-azure-vm/1518

A number of IP address have been banned from accessing our services as they were ignoring our fair use policy.
If you would like to provide me with the IP addresses of your servers that cannot connect, I will check to see if they have been banned.

@MArkWilliams should be this one
Is this a temporary ban or effective?

I have emailed you directly.

Thanks @MArkWilliams

Hi @MArkWilliams, having the same issues as the guys above, would you have a contact email to get in touch directly?

@MArkWilliams the outbound IPs of the application are the following:,,,,,,,,,,

For those, who want to check their IPs, do not mix a virtual IP which can be used for DNS configuration and outbound IPs for cases like this (How do I determine the outbound IP addresses of my Azure App Service).

I also tried to issue some request to the API from my local computer with the same configuration and they were processed without any issues. Two application instances on Azure in different regions still experience the same problem.

all 51.140 addresses were unbanned this morning at approx 10:30am.

1 Like


On doing nslookup from our server we are getting 3 below IP’s;;

Do we have any other IP’s to be whitelisted from our side to connect to this service?

Thanks and Regards,

Hi @MArkWilliams We are currently integrating with Companies House and getting very similar errors from our development environment, but are able to make successful calls from other environments.
IT support on our side has advised that we should not have a firewall blocking the connection on our side.
Is it please possible to check if the address has been banned from making calls?