# Company search endpoint returning no results

**URL:** <http://forum.companieshouse.gov.uk/t/company-search-endpoint-returning-no-results/11929>\
**Category:** API Issues\
**Created:** [August 4, 2025, 10:23am UTC](http://forum.companieshouse.gov.uk/t/company-search-endpoint-returning-no-results/11929 "2025-08-04T10:23:35Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![voracityemail](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/v/b77776/32.png) [@voracityemail](http://forum.companieshouse.gov.uk/u/voracityemail)\
**Post date:** [August 4, 2025, 10:04pm UTC](http://forum.companieshouse.gov.uk/t/company-search-endpoint-returning-no-results/11929/5 "2025-08-04T22:04:23Z")

</div>

(Reply to @glenn - not related to the original issue I think)

Ah - you may have run into the “trailing ‘/’ issue” here.

This has been working for me just fine, but it doesn’t work if I use your URL. However with a tiny modification it works. Your version (I’ve rearranged the curl command / get curl to calculate the header):

```auto
 curl -u MY_API_KEY: 'https://api.companieshouse.gov.uk/search/companies/?q=test&items_per_page=50'
(Gives a 404 and no results)

 curl -u MY_API_KEY: 'https://api.companieshouse.gov.uk/search/companies?q=test&items_per_page=50'
{"items":[{"kind":"searchresults#company",...

```

If you remove the trailing “/” after companies this should work, as in my example.

This is a known issue in _some_ places in the API.

> [@PSC resource - trailing / causing GET requests to error](https://forum.companieshouse.gov.uk/t/psc-resource-trailing-causing-get-requests-to-error/8238):
>
> PSC resource - trailing / causing GET requests to error. We are aware of an issue with the PSC resource which is causing API requests containing a trailing / to be rejected, and we are currently working on a fix. In the meantime, removing any trailing / will allow requests to be made successfully.

> [@API update release date question for trailing / bug fix](https://forum.companieshouse.gov.uk/t/api-update-release-date-question-for-trailing-bug-fix/8472):
>
> So my company does bi-weekly releases every Tuesday. We have done one today(17/09/2024), with the last being on the 03/09/2024. We had one bug appear today where if you do a request as such: [https://api.company-information.service.gov.uk/company/123122312/](https://api.company-information.service.gov.uk/company/123122312/) Companies house returns a 500 status code. The fix is to remove the trailing / so [https://api.company-information.service.gov.uk/company/123122312](https://api.company-information.service.gov.uk/company/123122312) This is fine, and an oversight by us however we are trying to ascertain when exactly this c…

BTW I believe the preferred hostname is now:  
[https://api.company-information.service.gov.uk](https://api.company-information.service.gov.uk)

And not:  
[https://api.companieshouse.gov.uk](https://api.companieshouse.gov.uk)

… but both still work.

---

_[View the full topic](http://forum.companieshouse.gov.uk/t/company-search-endpoint-returning-no-results/11929)._
