/advanced-search/companies responds with 500 after 10000 items

it’s not an error, I ran into the same issue and now having to rebuild my logic to suit the API

The issue here is that your query returns lets say 20,000 results, the API request returns the first 5,000 of the 20,000 and your start_index is for the 5,000 results that the API returns not for the entire 20,000 matches.

You are basically telling the API to order your results from number 10,000 with only 5,000 results returned thus the 500 error.

What you should be doing is making sure that your query returns 5000 results or less and do not use the start_index as it’s only for the starting point in your returned results and not the total results that meet your parameters.

Hope this helped