I Am unable to integrate this api

Hi I am just integrate the api for agent so that they can access available property and their details using zoopla .I am creating an application regarding this. But My application status either disable or in waiting stage.So Please provide the proper solution so that I can integrate this .Have I buy membership to achieve this or any thing.What I have to do .I have no any idea please help me.

1 Like

The Companies House APIs are free to use. I think you might need to provide some more details of the API call you want to make.

This is is my code to filter the properties near oxford but I am unable to get any response.

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, “http://api.companieshouse.gov.uk/search?q=oxford&items_per_page=10&start_index=0”);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, “GET”);

curl_setopt($ch, CURLOPT_USERPWD, “2aXMJllzG5I6M7n0H1n5-F0EGO8b-4ufh3jqu34c” . “:” . “”);

$result = curl_exec($ch);
if (curl_errno($ch)) {
echo ‘Error:’ . curl_error($ch);
}
curl_close ($ch);
print_r($result);exit;

There is an example showing how to use an API key in the documentation here: https://developer.companieshouse.gov.uk/api/docs/index/gettingStarted/apikey_authorisation.html

This says ‘the Companies House API takes the username as the API key and ignores the password’. Does that help?

In your post you mention looking for properties near Oxford. Companies House stores data about companies, so if you want a general property search Companies House my not be the best source of this information

When I am using curl command ------->
curl -XGET -u 2aXMJllzG5I6M7n0H1n5-F0EGO8b-4ufh3jqu34c: https://api.companieshouse.gov.uk/company/00000006
it is show the proper result
but in case of php script ------>

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, “https://api.companieshouse.gov.uk/company/00000006”);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, “GET”);

curl_setopt($ch, CURLOPT_USERPWD, “2aXMJllzG5I6M7n0H1n5-F0EGO8b-4ufh3jqu34c” . “:” . “”);

$result = curl_exec($ch);
if (curl_errno($ch)) {
echo ‘Error:’ . curl_error($ch);
}
curl_close ($ch);

response is like—
Error:Failed to connect to api.companieshouse.gov.uk port 80: Connection timed out

The API is running and I can reach it, so is server where your PHP script is running able to make network requests to the API URL?

Hi Deepak,

Your PHP code works for me. I did notice however, in your error output that it was trying to connect to port 80. Could it be that you tried this original snippet against https?

Thanks
Kevin

Have you problem in API integration? I would recommend the best api solution provider for you.