Host not resolved

I keep getting the following message
curl: (6) Could not resolve host: api.companieshouse.gov.uk
when I use command curl -u MyapiKey: https://api.companieshouse.gov.uk/search/companies

Any ideas how I fix this?

sounds like you have a DNS or internet issue.
Have you tried accessing

from a browser and
https://api.companieshouse.gov.uk/search/companies
from a browser?
Are you familiar with nslookup and ping ?

Thanks Mark - Yes I figured that out just before you replied.
That is the case and I am working out how to get around it.
Many thanks
Ajay