Design url for search

I’m a frontend dev and new to designing applications where the url is the base.

I want to implement a search page similar to and I just don’t know what is a good url design for this functionality. Here is an examples from the above sites.



From what I understand above, Expedia is using query params and Kayak is using dynamic segments. Some ember articles say that query params are for state information like sorting. So expedia’s url feels wrong.

Is using dynamic segments the right choice or is there a better design? I could use some opinions from you experienced devs.