I understand that you realized how to search and use the categoryId filter.
If you did not, look here for the categoryId parameter.
The Foursquare categories have an hierarchy (tree), you can get all categories here.
When you search for a top level node in the tree, all its child categories are also returned by foursquare.
So for example, searching for the top level Food category, will return all kind of restaurants, so if I want all restaurants in a specific radius, I can use that filter.
If I want all restaurants except for 'sushi', I think the best way would be following the example asking for all with the top level category and then doing the filter yourself, because otherwise you may hit the problem you described above, where the URL is too large.
If the above does not satisfy, another option would be splitting the search into two different requests. Not sure its the best practice, but my solution sometimes runs 7 different searches on the same location at once to get all the possible results (remember there is also a 50 results limit on response).