Air travel – How do I find the cheapest k stops between two airports for a specific date or time period?

Let’s say I’m in a city x on May 5 and z in another city on May 12. I would like to visit another city y on or around May 8th to May 12th, but I have no strong preference as to which city y it is.

How do I find the cheapest flight (and preferably the k cheapest flights) via x-> y -> z, where y is selected based on the price? In other words, how can I find the cheapest stopover between two airports for a specific date or time period?


I tried to use Kiwi.com as shown in the screenshot below, but with such a search there is no guarantee that the first "Africa" ​​will be the same as the second "Africa" ​​(and in practice not usually).

Enter the image description here