Hi,
I am new here about companies house Please tell me how to access to JSON file of companies House API to know the parameter value of very endpoints to test the output?
For Example:
https://developer-specs.company-information.service.gov.uk/companies-house-public-data-api/reference
The above link is only the structure or schema of every endPoints that provides companies house official webSite.
Advance Thanks
Welcome to the forum. This is a good question because Companies House provide a couple of forms of documentation but don’t have examples with it:
-
Documentation (with input parameters) as you’ve noted.
-
an OpenAPI JSON Schema. Unfortunately at time of writing this still has incorrect URIs e.g. you’ll have to manually substitute the correct host where they’ve listed a local IP host (“http://127.0.0.1:31008/”) - see other posts about this on this forum.
So mostly the documentation doesn’t have examples of JSON returned. (I believe that it would be possible to do this if they wanted using the OpenAPI specification). Examples would be helpful since there have been places where the documentation was missing information, potentially confusing or just inaccurate.
As far as I know there are 3 places you can find “example” JSON data:
-
By trying it out. There used to be a “try it out” button at the bottom of the documentation but that seems to have gone. However you can just start using the API e.g. making requests and inspecting what you get back. That’s how we started. There are plenty of tools for this e.g. your favourite language / script, Postman, curl etc. For help on where to start searching see later.
-
By browsing this forum. If you get stuck this forum has a large collection of questions about various aspects of the API and posts often give example data. Of course this may have been manually edited / made up!
-
For some - but not all - of the data sets there are examples online from Companies House. Note - some of these are “bulk” data e.g. rather large and / or are not exactly the format you will get back from the API but will certainly illustrate the range of values in the actual data.
On the last, you can look at:
-
Bulk PSC (Persons with Significant Control) datasets: Companies House
-
You can request access to a bulk listing of officer data by posting on the following thread: Can we bulk download Officer/Director Data? - #145 by pierre_wilmot
Finally - there’s the monthly companies data dump - this has a different format AND a different selection of data to e.g. the Company end-point, but you will be able to see the range of data in parts of that data set. If nothing else it will give you a range of valid company numbers that you can then query using the API to see what you get back: Companies House
If you have a query about a specific part of the API try searching the forum and ask if the info isn’t there.