I’m not from Companies House, just another user … but these almost always involve some “invalid” form of a URL / parameters being sent. If you’ve searched this forum / read the specifications and not found anything you can see, if you want any further help with this you could try posting the following (some is just basic information, likely not relevant but having more context is always helpful):
Is your application set to be test (sandbox) or live? For almost all purposes it’s best to just create a live application not a test one.
Are you calling from a fixed IP address (server) or is this an AJAX call (e.g. browser-based)? Nothing here should give you a 500 error but have you checked that your IP / domain was registered with Companies House for your application?
Post the exact URL you’re requesting:
e.g. https://api.company-information.service.gov.uk/company/08730224
If you’re using a language / function / library / app to do this, can you check to see the actual URL / http headers that are being sent (some libraries / tools can show you this)? That usually shows up what is going wrong. When doing so don’t post your whole API key - however sometimes the first few bytes are useful to show if e.g. the http Basic header is being composed correctly.
Obviously include any parameters you’re passing e.g. if you’re calling search the q parameter etc. Again useful if you can find out the actual data which is being sent to Companies House (perhaps the URL encoding of parameter data is incorrect etc.)
If you’re using a language / library / application to do this list what that is. If you have a (simplified, minimal) code example / a snapshot of the dialog boxes if using an app that can be helpful.
Good luck.