When querying https://api.companieshouse.gov.uk/search it returns a list of results. These appear to be nicely sorted by how close the company name is to my search parameter. Let’s call these results search_results.
When using the items_per_page parameter and setting it to 1, I would expect to get back the same result as index zero of search_results. However it’s a different company.
Why is this the case? What’s the logic behind the ordering of companies?
Short: don’t set items_per_page=1 without also specifying start_index (e.g. start_index=0)
Long-standing bug - see my notes at:
…it looks like someone changed the behaviour here because even further back you would get no results at all if you did this (although the fields would suggest there were).
I just tried this and indeed this issue is still occurring as described:
All as expected for e.g. items_per_page=2 (and up)