Api python script help

Hi Guys

Im relatively new to the API field. I need to run an API to fetch all companies that have overdue accounts and or voluntary dissolution suspended.

I would like to run this script in Python as I have downloaded vs 3.

Thank you

For “get all the companies…” queries Companies House steer people towards the Companies Bulk dataset. Large CSV files which you can download then process to get the data you need.

For your first query you can probably get what you need from the Accounts NextDueDate and the LastMadeUpDate. (Their documentation for these files is here - for more info on actual content perhaps search this forum).

The second I’m less clear on what exactly you’d be looking for but there is a CompanyStatus (current status) and perhaps DissolutionDate you can use there? The API docs for Company Profile list company status values - I can’t remember if they’re exactly the same in the bulk data but should be equivalent. You might need to check if one of those (or some other condition) can identify what you need.

The API isn’t particularly complex to work with (as they go) but if you’re “new to the API field” then I would also say that suggests just working with data files will be more fruitful. Unnless you particularly want to learn/practice e.g. using a REST API in your chosen language/environment. If you do - lots of example Python code on this forum in various questions / replies. There may be even a library or several somewhere that someone’s written - I don’t know but you could google.

The API is apparently for quite targetted, limited queries. There is a rate limit on numbers of queries you can send, and some requests are hard-limited on the number of results you can ever get. There are search facilities though. If you wanted to test out the kind of search you can do / results you can expect to get (inc. limits) you can test this out on their web page e.g. Search / Advanced search.

Good luck.