The most efficient algorithm for finding the highest valid number for an API


I have many API endpoints that take IDs that are constantly increasing. I want an algorithm to find the highest number in the least amount of requests. I need to do this without knowing what the previous highest number was. I am thinking something like binary search would work but would it be the most efficient? I also don’t know what the maximum would be.