API Charge Search Limit

Using GET https://api.companieshouse.gov.uk/company/{company_number}/charges to retrieve the charges for a company, only the 25 most recent unsatisfied charges are returned.

I assume that this is the limit and not that there is an issue? Ideally this would return all charges as I have encountered several instances of companies having 50+ outstanding and being unable to return details of these.

Is there any scope to increase this limit with the API being in Beta?

(I can’t fix the issue for you but am curious). What GET URI are you using exactly, and do you mean “I can only get 25 … in one request”? Do you mean “could there be an option to just return unsatisfied charges” in the same way as you can pass a paramenter to filter filing history by category or the officers by role (although only for register view)? I’d like that too!

I can see more than 25 - although this may need multiple requests and to just list “all unsatified charges” means collecting the whole data set and filtering the responses. (So a parameter to request the type of charge would be very helpful). For example I can list all the following charges using the API (links for reference):

209 charges registered
138 outstanding, 71 satisfied, 0 part satisfied

80 charges registered
78 outstanding, 2 satisfied, 0 part satisfied

51 charges registered
6 outstanding, 45 satisfied, 0 part satisfied

The GET URI being used is as the first line of my original post.

Using GET https://api.companieshouse.gov.uk/company/03034606/charges only returns the most recent 25 charges. I was initially mistaken in thinking this was only unsatisfied charges however it is actually the 25 most recent regardless of status.

Therefore 03034606 - EASYJET AIRLINE COMPANY LIMITED as I am not interested in satisfied charges, only 16 are returned opposed to the 138 actual outstanding. My query was to simply find out if, as it appears only the 25 most recent charges are available via the api or if there was a way to get them all.

I don’t quite follow - you’re just calling the api with https://api.companieshouse.gov.uk/company/03034606/charges yes? In which case as you’ve said you’ll get back some subset of the charges (e.g. 25 if that’s what you find, ordered most - least recent). Charge list is one of the “paged lists” where you may need to call repeatedly setting the start_index and items_per_page parameters as appropriate (note *).

The charge list documentation doesn’t guarantee that it will return all the charges, or a particular category (satisfied / unsatisfied) (although I wish it would…) or that it’ll give you them in any particular order. Along with any charge items it returns it should give you three fields:

  • total_count
  • part_satisfied_count
  • satisfied_count

So (forgive labouring the point) in the case of 03034606 - EASYJET AIRLINE COMPANY LIMITED if I get back 25 charge items from calling the API and I see that total_count is 209 I’ll call again but setting e.g. start_index to 25 (and items_per_page to 25) to get the next set of results. If you just want the outstanding ones, keep a count of them and as soon as it matches ( total_count - part_satisfied_count - satisfied_count ) you’re done.

Managing these paged lists:

Note *: if you’re searching with start_index > 300 you might not get the expected response: Search company officers returns HTTP 416 when start_index over 300